Skip to content

Commit 80a4ce0

Browse files
committed
npm1300: rename npm1300 to npm13xx
Rename relevant occurrences of npm1300 to npm13xx in device tree and config files, sample code, etc. Signed-off-by: Sergei Ovchinnikov <[email protected]>
1 parent 3276f46 commit 80a4ce0

File tree

15 files changed

+40
-40
lines changed

15 files changed

+40
-40
lines changed

boards/nordic/thingy91x/Kconfig.defconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ if !IS_BOOTLOADER_IMG
1212
config REGULATOR
1313
default y
1414

15-
# nPM6001 must be initialized after it is powered from nPM1300 (REGULATOR_NPM1300_INIT_PRIORITY)
15+
# nPM6001 must be initialized after it is powered from nPM1300 (REGULATOR_NPM13XX_INIT_PRIORITY)
1616
config MFD_NPM6001_INIT_PRIORITY
1717
default 87
1818
config REGULATOR_NPM6001_INIT_PRIORITY
1919
default 88
2020
config WIFI_INIT_PRIORITY
2121
default 89
2222

23-
# GPIO hogs must be initialized after nPM1300 (GPIO_NPM1300_INIT_PRIORITY)
23+
# GPIO hogs must be initialized after nPM1300 (GPIO_NPM13XX_INIT_PRIORITY)
2424
config GPIO_HOGS_INIT_PRIORITY
2525
default 86
2626

boards/nordic/thingy91x/Kconfig.defconfig.nrf9151

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ config I2C
101101
config GPIO_HOGS
102102
default n
103103

104-
config GPIO_NPM1300
104+
config GPIO_NPM13XX
105105
default n
106106

107107
endif # IS_BOOTLOADER_IMG

boards/nordic/thingy91x/thingy91x_common.dtsi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
44
*/
55

6-
#include <dt-bindings/regulator/npm1300.h>
6+
#include <dt-bindings/regulator/npm13xx.h>
77
#include <dt-bindings/regulator/npm6001.h>
88

99
&i2c2 {
@@ -64,14 +64,14 @@
6464
};
6565
/* LDO1 is used as a load switch pulling the nPM6001 enable line to VSYS */
6666
ldsw_nPM6001_en: LDO1 {
67-
regulator-initial-mode = <NPM1300_LDSW_MODE_LDSW>;
68-
regulator-allowed-modes = <NPM1300_LDSW_MODE_LDSW>;
67+
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDSW>;
68+
regulator-allowed-modes = <NPM13XX_LDSW_MODE_LDSW>;
6969
regulator-boot-off;
7070
};
7171
/* LDO2 is used as a load switch for sensor power supply */
7272
ldsw_sensors: LDO2 {
73-
regulator-initial-mode = <NPM1300_LDSW_MODE_LDSW>;
74-
regulator-allowed-modes = <NPM1300_LDSW_MODE_LDSW>;
73+
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDSW>;
74+
regulator-allowed-modes = <NPM13XX_LDSW_MODE_LDSW>;
7575
regulator-boot-on;
7676
};
7777
};

samples/pmic/native/npm1300_fuel_gauge/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
#include <dt-bindings/regulator/npm1300.h>
7+
#include <dt-bindings/regulator/npm13xx.h>
88

99
&i2c130_default {
1010
group1 {

samples/pmic/native/npm1300_fuel_gauge/src/fuel_gauge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <zephyr/kernel.h>
99
#include <zephyr/device.h>
1010
#include <zephyr/drivers/sensor.h>
11-
#include <zephyr/drivers/sensor/npm1300_charger.h>
11+
#include <zephyr/drivers/sensor/npm13xx_charger.h>
1212
#include <zephyr/sys/printk.h>
1313
#include <zephyr/sys/util.h>
1414

@@ -46,7 +46,7 @@ static int read_sensors(const struct device *charger, float *voltage, float *cur
4646
sensor_channel_get(charger, SENSOR_CHAN_GAUGE_AVG_CURRENT, &value);
4747
*current = (float)value.val1 + ((float)value.val2 / 1000000);
4848

49-
sensor_channel_get(charger, SENSOR_CHAN_NPM1300_CHARGER_STATUS, &value);
49+
sensor_channel_get(charger, SENSOR_CHAN_NPM13XX_CHARGER_STATUS, &value);
5050
*chg_status = value.val1;
5151

5252
return 0;

samples/pmic/native/npm1300_fuel_gauge/src/main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <zephyr/kernel.h>
99
#include <zephyr/device.h>
1010
#include <zephyr/drivers/gpio.h>
11-
#include <zephyr/drivers/mfd/npm1300.h>
11+
#include <zephyr/drivers/mfd/npm13xx.h>
1212
#include <zephyr/drivers/sensor.h>
1313
#include <zephyr/sys/printk.h>
1414

@@ -22,12 +22,12 @@ static volatile bool vbus_connected;
2222

2323
static void event_callback(const struct device *dev, struct gpio_callback *cb, uint32_t pins)
2424
{
25-
if (pins & BIT(NPM1300_EVENT_VBUS_DETECTED)) {
25+
if (pins & BIT(NPM13XX_EVENT_VBUS_DETECTED)) {
2626
printk("Vbus connected\n");
2727
vbus_connected = true;
2828
}
2929

30-
if (pins & BIT(NPM1300_EVENT_VBUS_REMOVED)) {
30+
if (pins & BIT(NPM13XX_EVENT_VBUS_REMOVED)) {
3131
printk("Vbus removed\n");
3232
vbus_connected = false;
3333
}
@@ -55,10 +55,10 @@ int main(void)
5555
static struct gpio_callback event_cb;
5656

5757
gpio_init_callback(&event_cb, event_callback,
58-
BIT(NPM1300_EVENT_VBUS_DETECTED) |
59-
BIT(NPM1300_EVENT_VBUS_REMOVED));
58+
BIT(NPM13XX_EVENT_VBUS_DETECTED) |
59+
BIT(NPM13XX_EVENT_VBUS_REMOVED));
6060

61-
err = mfd_npm1300_add_callback(pmic, &event_cb);
61+
err = mfd_npm13xx_add_callback(pmic, &event_cb);
6262
if (err) {
6363
printk("Failed to add pmic callback.\n");
6464
return 0;

samples/pmic/native/npm1300_one_button/nrf52840dk_nrf52840.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
#include <dt-bindings/regulator/npm1300.h>
7+
#include <dt-bindings/regulator/npm13xx.h>
88

99
&i2c0_default {
1010
group1 {
@@ -13,7 +13,7 @@
1313
};
1414

1515
&npm1300_ek_ldo1 {
16-
regulator-initial-mode = <NPM1300_LDSW_MODE_LDSW>;
16+
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDSW>;
1717
};
1818

1919
&npm1300_ek_pmic {

samples/pmic/native/npm1300_one_button/nrf52dk_nrf52832.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
#include <dt-bindings/regulator/npm1300.h>
7+
#include <dt-bindings/regulator/npm13xx.h>
88

99
&i2c0_default {
1010
group1 {
@@ -13,7 +13,7 @@
1313
};
1414

1515
&npm1300_ek_ldo1 {
16-
regulator-initial-mode = <NPM1300_LDSW_MODE_LDSW>;
16+
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDSW>;
1717
};
1818

1919
&npm1300_ek_pmic {

samples/pmic/native/npm1300_one_button/nrf5340dk_nrf5340_cpuapp.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
#include <dt-bindings/regulator/npm1300.h>
7+
#include <dt-bindings/regulator/npm13xx.h>
88

99
&i2c1_default {
1010
group1 {
@@ -13,7 +13,7 @@
1313
};
1414

1515
&npm1300_ek_ldo1 {
16-
regulator-initial-mode = <NPM1300_LDSW_MODE_LDSW>;
16+
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDSW>;
1717
};
1818

1919
&npm1300_ek_pmic {

samples/pmic/native/npm1300_one_button/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
#include <dt-bindings/regulator/npm1300.h>
7+
#include <dt-bindings/regulator/npm13xx.h>
88

99
&i2c130_default {
1010
group1 {
@@ -21,7 +21,7 @@
2121
};
2222

2323
&npm1300_ek_ldo1 {
24-
regulator-initial-mode = <NPM1300_LDSW_MODE_LDSW>;
24+
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDSW>;
2525
};
2626

2727
&npm1300_ek_pmic {

0 commit comments

Comments
 (0)