Skip to content

Commit 88a6967

Browse files
gmarullcarlescufi
authored andcommitted
drivers: use new PM macros
Port some drivers to the recently introduced macros to showcase its usage and be able to do some initial testing (nRF52840). Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent e2f33dd commit 88a6967

38 files changed

+123
-71
lines changed

drivers/display/display_st7735r.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,10 @@ static const struct display_driver_api st7735r_api = {
573573
.x_offset = DT_INST_PROP(inst, x_offset), \
574574
.y_offset = DT_INST_PROP(inst, y_offset), \
575575
}; \
576-
DEVICE_DT_INST_DEFINE(inst, st7735r_init, st7735r_pm_action, \
576+
\
577+
PM_DEVICE_DT_INST_DEFINE(inst, st7735r_pm_action); \
578+
\
579+
DEVICE_DT_INST_DEFINE(inst, st7735r_init, PM_DEVICE_DT_INST_REF(inst), \
577580
&st7735r_data_ ## inst, &st7735r_config_ ## inst, \
578581
POST_KERNEL, CONFIG_DISPLAY_INIT_PRIORITY, \
579582
&st7735r_api);

drivers/display/display_st7789v.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,8 @@ static struct st7789v_data st7789v_data = {
438438
.y_offset = DT_INST_PROP(0, y_offset),
439439
};
440440

441+
PM_DEVICE_DT_INST_DEFINE(0, st7789v_pm_action);
442+
441443
DEVICE_DT_INST_DEFINE(0, &st7789v_init,
442-
st7789v_pm_action, &st7789v_data, NULL, POST_KERNEL,
444+
PM_DEVICE_DT_INST_REF(0), &st7789v_data, NULL, POST_KERNEL,
443445
CONFIG_DISPLAY_INIT_PRIORITY, &st7789v_api);

drivers/entropy/entropy_cc13xx_cc26xx.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,11 @@ static struct entropy_cc13xx_cc26xx_data entropy_cc13xx_cc26xx_data = {
349349
.sync = Z_SEM_INITIALIZER(entropy_cc13xx_cc26xx_data.sync, 0, 1),
350350
};
351351

352+
PM_DEVICE_DT_INST_DEFINE(0, entropy_cc13xx_cc26xx_pm_action);
353+
352354
DEVICE_DT_INST_DEFINE(0,
353355
entropy_cc13xx_cc26xx_init,
354-
entropy_cc13xx_cc26xx_pm_action,
356+
PM_DEVICE_DT_INST_REF(0),
355357
&entropy_cc13xx_cc26xx_data, NULL,
356358
PRE_KERNEL_1, CONFIG_ENTROPY_INIT_PRIORITY,
357359
&entropy_cc13xx_cc26xx_driver_api);

drivers/entropy/entropy_neorv32_trng.c

+3-7
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,16 @@ static const struct entropy_driver_api neorv32_trng_driver_api = {
129129
.get_entropy_isr = neorv32_trng_get_entropy_isr,
130130
};
131131

132-
#ifdef CONFIG_PM_DEVICE
133-
#define NEORV32_TRNG_PM_ACTION_CB neorv32_trng_pm_action
134-
#else /* CONFIG_PM_DEVICE */
135-
#define NEORV32_TRNG_PM_ACTION_CB NULL
136-
#endif /* ! CONFIG_PM_DEVICE */
137-
138132
#define NEORV32_TRNG_INIT(n) \
139133
static const struct neorv32_trng_config neorv32_trng_##n##_config = { \
140134
.syscon = DEVICE_DT_GET(DT_INST_PHANDLE(n, syscon)), \
141135
.base = DT_INST_REG_ADDR(n), \
142136
}; \
143137
\
138+
PM_DEVICE_DT_INST_DEFINE(n, neorv32_trng_pm_action); \
139+
\
144140
DEVICE_DT_INST_DEFINE(n, &neorv32_trng_init, \
145-
NEORV32_TRNG_PM_ACTION_CB, \
141+
PM_DEVICE_DT_INST_REF(n), \
146142
NULL, \
147143
&neorv32_trng_##n##_config, \
148144
PRE_KERNEL_1, \

drivers/ethernet/eth_mcux.c

+4-7
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ static int eth_mcux_device_pm_action(const struct device *dev,
230230

231231
return ret;
232232
}
233-
234-
#define ETH_MCUX_PM_ACTION_CB eth_mcux_device_pm_action
235-
236-
#else
237-
#define ETH_MCUX_PM_ACTION_CB NULL
238233
#endif /* CONFIG_NET_POWER_MANAGEMENT */
239234

240235
#if ETH_MCUX_FIXED_LINK
@@ -1393,9 +1388,11 @@ static void eth_mcux_err_isr(const struct device *dev)
13931388
ETH_MCUX_PTP_FRAMEINFO(n) \
13941389
}; \
13951390
\
1396-
ETH_NET_DEVICE_DT_INST_DEFINE(n, \
1391+
PM_DEVICE_DT_INST_DEFINE(n, eth_mcux_device_pm_action); \
1392+
\
1393+
ETH_NET_DEVICE_DT_INST_DEFINE(n, \
13971394
eth_init, \
1398-
ETH_MCUX_PM_ACTION_CB, \
1395+
PM_DEVICE_DT_INST_REF(n), \
13991396
&eth##n##_context, \
14001397
&eth##n##_buffer_config, \
14011398
CONFIG_ETH_INIT_PRIORITY, \

drivers/flash/nrf_qspi_nor.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1139,8 +1139,6 @@ static int qspi_nor_pm_action(const struct device *dev,
11391139

11401140
return 0;
11411141
}
1142-
#else
1143-
#define qspi_nor_pm_action NULL
11441142
#endif /* CONFIG_PM_DEVICE */
11451143

11461144
static struct qspi_nor_data qspi_nor_dev_data = {
@@ -1196,7 +1194,9 @@ static const struct qspi_nor_config qspi_nor_dev_config = {
11961194
.id = DT_INST_PROP(0, jedec_id),
11971195
};
11981196

1199-
DEVICE_DT_INST_DEFINE(0, qspi_nor_init, qspi_nor_pm_action,
1197+
PM_DEVICE_DT_INST_DEFINE(0, qspi_nor_pm_action);
1198+
1199+
DEVICE_DT_INST_DEFINE(0, qspi_nor_init, PM_DEVICE_DT_INST_REF(0),
12001200
&qspi_nor_dev_data, &qspi_nor_dev_config,
12011201
POST_KERNEL, CONFIG_NORDIC_QSPI_NOR_INIT_PRIORITY,
12021202
&qspi_nor_api);

drivers/flash/spi_flash_at45.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,11 @@ static const struct flash_driver_api spi_flash_at45_api = {
699699
"Page size specified for instance " #idx " of " \
700700
"atmel,at45 is not compatible with its " \
701701
"total size");)) \
702+
\
703+
PM_DEVICE_DT_INST_DEFINE(idx, spi_flash_at45_pm_action); \
704+
\
702705
DEVICE_DT_INST_DEFINE(idx, \
703-
spi_flash_at45_init, spi_flash_at45_pm_action, \
706+
spi_flash_at45_init, PM_DEVICE_DT_INST_REF(idx), \
704707
&inst_##idx##_data, &inst_##idx##_config, \
705708
POST_KERNEL, CONFIG_SPI_FLASH_AT45_INIT_PRIORITY, \
706709
&spi_flash_at45_api);

drivers/gpio/gpio_dw.c

+12-4
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,10 @@ static struct gpio_dw_runtime gpio_0_runtime = {
534534
.base_addr = DT_INST_REG_ADDR(0),
535535
};
536536

537+
PM_DEVICE_DT_INST_DEFINE(0, gpio_dw_device_pm_action);
538+
537539
DEVICE_DT_INST_DEFINE(0,
538-
gpio_dw_initialize, gpio_dw_device_pm_action, &gpio_0_runtime,
540+
gpio_dw_initialize, PM_DEVICE_DT_INST_REF(0), &gpio_0_runtime,
539541
&gpio_config_0, POST_KERNEL, CONFIG_GPIO_INIT_PRIORITY,
540542
&api_funcs);
541543

@@ -596,8 +598,10 @@ static struct gpio_dw_runtime gpio_1_runtime = {
596598
.base_addr = DT_INST_REG_ADDR(1),
597599
};
598600

601+
PM_DEVICE_DT_INST_DEFINE(1, gpio_dw_device_pm_action);
602+
599603
DEVICE_DT_INST_DEFINE(1,
600-
gpio_dw_initialize, gpio_dw_device_pm_action, &gpio_1_runtime,
604+
gpio_dw_initialize, PM_DEVICE_DT_INST_REF(1), &gpio_1_runtime,
601605
&gpio_dw_config_1, POST_KERNEL, CONFIG_GPIO_INIT_PRIORITY,
602606
&api_funcs);
603607

@@ -657,8 +661,10 @@ static struct gpio_dw_runtime gpio_2_runtime = {
657661
.base_addr = DT_INST_REG_ADDR(2),
658662
};
659663

664+
PM_DEVICE_DT_INST_DEFINE(2, gpio_dw_device_pm_action);
665+
660666
DEVICE_DT_INST_DEFINE(2,
661-
gpio_dw_initialize, gpio_dw_device_pm_action, &gpio_2_runtime,
667+
gpio_dw_initialize, PM_DEVICE_DT_INST_REF(2), &gpio_2_runtime,
662668
&gpio_dw_config_2, POST_KERNEL, CONFIG_GPIO_INIT_PRIORITY,
663669
&api_funcs);
664670

@@ -718,8 +724,10 @@ static struct gpio_dw_runtime gpio_3_runtime = {
718724
.base_addr = DT_INST_REG_ADDR(3),
719725
};
720726

727+
PM_DEVICE_DT_INST_DEFINE(3, gpio_dw_device_pm_action);
728+
721729
DEVICE_DT_INST_DEFINE(3,
722-
gpio_dw_initialize, gpio_dw_device_pm_action, &gpio_3_runtime,
730+
gpio_dw_initialize, PM_DEVICE_DT_INST_REF(3), &gpio_3_runtime,
723731
&gpio_dw_config_3, POST_KERNEL, CONFIG_GPIO_INIT_PRIORITY,
724732
&api_funcs);
725733

drivers/gpio/gpio_emul.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,6 @@ static int gpio_emul_pm_device_pm_action(const struct device *dev,
672672

673673
return 0;
674674
}
675-
#else
676-
#define gpio_emul_pm_device_pm_action NULL
677675
#endif
678676

679677
/*
@@ -709,8 +707,10 @@ static int gpio_emul_pm_device_pm_action(const struct device *dev,
709707
.flags = gpio_emul_flags_##_num, \
710708
}; \
711709
\
710+
PM_DEVICE_DT_INST_DEFINE(_num, gpio_emul_pm_device_pm_action); \
711+
\
712712
DEVICE_DT_INST_DEFINE(_num, gpio_emul_init, \
713-
gpio_emul_pm_device_pm_action, \
713+
PM_DEVICE_DT_INST_REF(_num), \
714714
&gpio_emul_data_##_num, \
715715
&gpio_emul_config_##_num, POST_KERNEL, \
716716
CONFIG_GPIO_INIT_PRIORITY, \

drivers/gpio/gpio_stm32.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,10 @@ static int gpio_stm32_init(const struct device *dev)
630630
.pclken = { .bus = __bus, .enr = __cenr } \
631631
}; \
632632
static struct gpio_stm32_data gpio_stm32_data_## __suffix; \
633+
PM_DEVICE_DT_DEFINE(__node, gpio_stm32_pm_action); \
633634
DEVICE_DT_DEFINE(__node, \
634635
gpio_stm32_init, \
635-
gpio_stm32_pm_action, \
636+
PM_DEVICE_DT_REF(__node), \
636637
&gpio_stm32_data_## __suffix, \
637638
&gpio_stm32_cfg_## __suffix, \
638639
PRE_KERNEL_1, \

drivers/i2c/i2c_cc13xx_cc26xx.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,11 @@ static struct i2c_cc13xx_cc26xx_data i2c_cc13xx_cc26xx_data = {
435435
.error = I2C_MASTER_ERR_NONE
436436
};
437437

438+
PM_DEVICE_DT_INST_DEFINE(0, i2c_cc13xx_cc26xx_pm_action);
439+
438440
DEVICE_DT_INST_DEFINE(0,
439441
i2c_cc13xx_cc26xx_init,
440-
i2c_cc13xx_cc26xx_pm_action,
442+
PM_DEVICE_DT_INST_REF(0),
441443
&i2c_cc13xx_cc26xx_data, &i2c_cc13xx_cc26xx_config,
442444
POST_KERNEL, CONFIG_I2C_INIT_PRIORITY,
443445
&i2c_cc13xx_cc26xx_driver_api);

drivers/i2c/i2c_nrfx_twi.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,10 @@ static int twi_nrfx_pm_action(const struct device *dev,
285285
.frequency = I2C_FREQUENCY(idx), \
286286
} \
287287
}; \
288+
PM_DEVICE_DT_DEFINE(I2C(idx), twi_nrfx_pm_action); \
288289
DEVICE_DT_DEFINE(I2C(idx), \
289290
twi_##idx##_init, \
290-
twi_nrfx_pm_action, \
291+
PM_DEVICE_DT_REF(I2C(idx)), \
291292
&twi_##idx##_data, \
292293
&twi_##idx##z_config, \
293294
POST_KERNEL, \

drivers/i2c/i2c_nrfx_twim.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,10 @@ static int twim_nrfx_pm_action(const struct device *dev,
370370
.concat_buf_size = CONCAT_BUF_SIZE(idx), \
371371
.flash_buf_max_size = FLASH_BUF_MAX_SIZE(idx), \
372372
}; \
373+
PM_DEVICE_DT_DEFINE(I2C(idx), twim_nrfx_pm_action); \
373374
DEVICE_DT_DEFINE(I2C(idx), \
374375
twim_##idx##_init, \
375-
twim_nrfx_pm_action, \
376+
PM_DEVICE_DT_REF(I2C(idx)), \
376377
&twim_##idx##_data, \
377378
&twim_##idx##z_config, \
378379
POST_KERNEL, \

drivers/interrupt_controller/intc_ioapic.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -495,5 +495,7 @@ static void IoApicRedUpdateLo(unsigned int irq,
495495
ioApicRedSetLo(irq, (ioApicRedGetLo(irq) & ~mask) | (value & mask));
496496
}
497497

498-
DEVICE_DEFINE(ioapic, "ioapic", ioapic_init, ioapic_pm_action, NULL, NULL,
498+
PM_DEVICE_DEFINE(ioapic, ioapic_pm_action);
499+
500+
DEVICE_DEFINE(ioapic, "ioapic", ioapic_init, PM_DEVICE_REF(ioapic), NULL, NULL,
499501
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);

drivers/interrupt_controller/intc_loapic.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,9 @@ static int loapic_pm_action(const struct device *dev,
428428
}
429429
#endif /* CONFIG_PM_DEVICE */
430430

431-
DEVICE_DEFINE(loapic, "loapic", loapic_init, loapic_pm_action, NULL, NULL,
431+
PM_DEVICE_DEFINE(loapic, loapic_pm_action);
432+
433+
DEVICE_DEFINE(loapic, "loapic", loapic_init, PM_DEVICE_REF(loapic), NULL, NULL,
432434
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
433435

434436
#if CONFIG_LOAPIC_SPURIOUS_VECTOR

drivers/led/led_pwm.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,11 @@ static const struct led_pwm_config led_pwm_config_##id = { \
176176
.led = led_pwm_##id, \
177177
}; \
178178
\
179-
DEVICE_DT_INST_DEFINE(id, &led_pwm_init, led_pwm_pm_action, \
180-
NULL, &led_pwm_config_##id, POST_KERNEL, \
179+
PM_DEVICE_DT_INST_DEFINE(id, led_pwm_pm_action); \
180+
\
181+
DEVICE_DT_INST_DEFINE(id, &led_pwm_init, \
182+
PM_DEVICE_DT_INST_REF(id), NULL, \
183+
&led_pwm_config_##id, POST_KERNEL, \
181184
CONFIG_LED_INIT_PRIORITY, &led_pwm_api);
182185

183186
DT_INST_FOREACH_STATUS_OKAY(LED_PWM_DEVICE)

drivers/pwm/pwm_nrfx.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,9 @@ static int pwm_nrfx_pm_action(const struct device *dev,
368368
.seq.values.p_raw = pwm_nrfx_##idx##_data.current, \
369369
.seq.length = NRF_PWM_CHANNEL_COUNT \
370370
}; \
371+
PM_DEVICE_DT_DEFINE(PWM(idx), pwm_nrfx_pm_action); \
371372
DEVICE_DT_DEFINE(PWM(idx), \
372-
pwm_nrfx_init, pwm_nrfx_pm_action, \
373+
pwm_nrfx_init, PM_DEVICE_DT_REF(PWM(idx)), \
373374
&pwm_nrfx_##idx##_data, \
374375
&pwm_nrfx_##idx##config, \
375376
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \

drivers/sensor/apds9960/apds9960.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,8 @@ static const struct apds9960_config apds9960_config = {
534534

535535
static struct apds9960_data apds9960_data;
536536

537+
PM_DEVICE_DT_INST_DEFINE(0, apds9960_pm_action);
538+
537539
DEVICE_DT_INST_DEFINE(0, apds9960_init,
538-
apds9960_pm_action, &apds9960_data, &apds9960_config,
540+
PM_DEVICE_DT_INST_REF(0), &apds9960_data, &apds9960_config,
539541
POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &apds9960_driver_api);

drivers/sensor/bme280/bme280.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,12 @@ static int bme280_pm_action(const struct device *dev,
447447
COND_CODE_1(DT_INST_ON_BUS(inst, spi), \
448448
(BME280_CONFIG_SPI(inst)), \
449449
(BME280_CONFIG_I2C(inst))); \
450+
\
451+
PM_DEVICE_DT_INST_DEFINE(inst, bme280_pm_action); \
452+
\
450453
DEVICE_DT_INST_DEFINE(inst, \
451454
bme280_chip_init, \
452-
bme280_pm_action, \
455+
PM_DEVICE_DT_INST_REF(inst), \
453456
&bme280_data_##inst, \
454457
&bme280_config_##inst, \
455458
POST_KERNEL, \

drivers/sensor/bmp388/bmp388.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,11 @@ static int bmp388_init(const struct device *dev)
720720
BMP388_INT_CFG(inst) \
721721
.iir_filter = DT_INST_ENUM_IDX(inst, iir_filter), \
722722
}; \
723+
PM_DEVICE_DT_INST_DEFINE(inst, bmp388_pm_action); \
723724
DEVICE_DT_INST_DEFINE( \
724725
inst, \
725726
bmp388_init, \
726-
bmp388_pm_action, \
727+
PM_DEVICE_DT_INST_REF(inst), \
727728
&bmp388_data_##inst, \
728729
&bmp388_config_##inst, \
729730
POST_KERNEL, \

drivers/sensor/bq274xx/bq274xx.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,10 @@ static const struct sensor_driver_api bq274xx_battery_driver_api = {
773773
.terminate_voltage = DT_INST_PROP(index, terminate_voltage), \
774774
}; \
775775
\
776-
DEVICE_DT_INST_DEFINE(index, &bq274xx_gauge_init, bq274xx_pm_action, \
776+
PM_DEVICE_DT_INST_DEFINE(index, bq274xx_pm_action); \
777+
\
778+
DEVICE_DT_INST_DEFINE(index, &bq274xx_gauge_init, \
779+
PM_DEVICE_DT_INST_REF(index), \
777780
&bq274xx_driver_##index, \
778781
&bq274xx_config_##index, POST_KERNEL, \
779782
CONFIG_SENSOR_INIT_PRIORITY, \

drivers/sensor/fdc2x1x/fdc2x1x.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1025,9 +1025,11 @@ static int fdc2x1x_init(const struct device *dev)
10251025
FDC2X1X_INTB(n) \
10261026
}; \
10271027
\
1028+
PM_DEVICE_DT_INST_DEFINE(n, fdc2x1x_device_pm_action); \
1029+
\
10281030
DEVICE_DT_INST_DEFINE(n, \
10291031
fdc2x1x_init, \
1030-
fdc2x1x_device_pm_action, \
1032+
PM_DEVICE_DT_INST_REF(n), \
10311033
&fdc2x1x_data_##n, \
10321034
&fdc2x1x_config_##n, \
10331035
POST_KERNEL, \

drivers/sensor/ina219/ina219.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,11 @@ static const struct sensor_driver_api ina219_api = {
302302
.mode = INA219_MODE_NORMAL \
303303
}; \
304304
\
305+
PM_DEVICE_DT_INST_DEFINE(n, ina219_pm_action); \
306+
\
305307
DEVICE_DT_INST_DEFINE(n, \
306308
ina219_init, \
307-
ina219_pm_action, \
309+
PM_DEVICE_DT_INST_REF(n), \
308310
&ina219_data_##n, \
309311
&ina219_config_##n, \
310312
POST_KERNEL, \

drivers/sensor/lis2mdl/lis2mdl.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,11 @@ static int lis2mdl_pm_action(const struct device *dev,
488488
*/
489489

490490
#define LIS2MDL_DEVICE_INIT(inst) \
491+
PM_DEVICE_DT_INST_DEFINE(inst, lis2mdl_pm_action); \
492+
\
491493
DEVICE_DT_INST_DEFINE(inst, \
492494
lis2mdl_init, \
493-
lis2mdl_pm_action, \
495+
PM_DEVICE_DT_INST_REF(inst), \
494496
&lis2mdl_data_##inst, \
495497
&lis2mdl_config_##inst, \
496498
POST_KERNEL, \

drivers/sensor/lm77/lm77.c

+3-7
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,6 @@ static int lm77_pm_action(const struct device *dev,
395395
#define LM77_INT_GPIO_INIT(n)
396396
#endif /* ! LM77_TRIGGER_SUPPORT */
397397

398-
#ifdef CONFIG_PM_DEVICE
399-
#define LM77_PM_ACTION_CB lm77_pm_action
400-
#else /* CONFIG_PM_DEVICE */
401-
#define LM77_PM_ACTION_CB NULL
402-
#endif /* ! CONFIG_PM_DEVICE */
403-
404398
#define LM77_INIT(n) \
405399
static struct lm77_data lm77_data_##n; \
406400
\
@@ -417,8 +411,10 @@ static int lm77_pm_action(const struct device *dev,
417411
LM77_INT_GPIO_INIT(n) \
418412
}; \
419413
\
414+
PM_DEVICE_DT_INST_DEFINE(n, lm77_pm_action); \
415+
\
420416
DEVICE_DT_INST_DEFINE(n, lm77_init, \
421-
LM77_PM_ACTION_CB, \
417+
PM_DEVICE_DT_INST_REF(n), \
422418
&lm77_data_##n, \
423419
&lm77_config_##n, POST_KERNEL, \
424420
CONFIG_SENSOR_INIT_PRIORITY, \

0 commit comments

Comments
 (0)