Skip to content

Commit 24bd45b

Browse files
nashifgalak
authored andcommitted
pm: do not use deprecate Kconfig
CONFIG_DEVICE_POWER_MANAGEMENT is deprecated, use CONFIG_PM_DEVICE instead. Signed-off-by: Anas Nashif <[email protected]>
1 parent adae515 commit 24bd45b

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

drivers/display/display_st7735r.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct st7735r_data {
6767
const struct device *reset_dev;
6868
uint16_t x_offset;
6969
uint16_t y_offset;
70-
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
70+
#ifdef CONFIG_PM_DEVICE
7171
uint32_t pm_state;
7272
#endif
7373
};
@@ -475,7 +475,7 @@ static int st7735r_init(const struct device *dev)
475475
}
476476
}
477477

478-
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
478+
#ifdef CONFIG_PM_DEVICE
479479
data->pm_state = PM_DEVICE_STATE_ACTIVE;
480480
#endif
481481

@@ -513,7 +513,7 @@ static int st7735r_init(const struct device *dev)
513513
return 0;
514514
}
515515

516-
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
516+
#ifdef CONFIG_PM_DEVICE
517517
static int st7735r_enter_sleep(struct st7735r_data *data)
518518
{
519519
return st7735r_transmit(data, ST7735R_CMD_SLEEP_IN, NULL, 0);
@@ -558,7 +558,7 @@ static int st7735r_pm_control(const struct device *dev, uint32_t ctrl_command,
558558

559559
return ret;
560560
}
561-
#endif /* CONFIG_DEVICE_POWER_MANAGEMENT */
561+
#endif /* CONFIG_PM_DEVICE */
562562

563563
static const struct display_driver_api st7735r_api = {
564564
.blanking_on = st7735r_blanking_on,

drivers/sensor/bmp388/bmp388.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static int bmp388_attr_set(const struct device *dev,
310310
{
311311
int ret;
312312

313-
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
313+
#ifdef CONFIG_PM_DEVICE
314314
struct bmp388_data *data = DEV_DATA(dev);
315315

316316
if (data->device_power_state != PM_DEVICE_STATE_ACTIVE) {
@@ -347,7 +347,7 @@ static int bmp388_sample_fetch(const struct device *dev,
347347

348348
__ASSERT_NO_MSG(chan == SENSOR_CHAN_ALL);
349349

350-
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
350+
#ifdef CONFIG_PM_DEVICE
351351
if (bmp388->device_power_state != PM_DEVICE_STATE_ACTIVE) {
352352
return -EBUSY;
353353
}
@@ -544,7 +544,7 @@ static int bmp388_get_calibration_data(const struct device *dev)
544544
return 0;
545545
}
546546

547-
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
547+
#ifdef CONFIG_PM_DEVICE
548548
static int bmp388_set_power_state(const struct device *dev,
549549
uint32_t power_state)
550550
{
@@ -606,7 +606,7 @@ static int bmp388_device_ctrl(
606606
}
607607
return ret;
608608
}
609-
#endif /* CONFIG_DEVICE_POWER_MANAGEMENT */
609+
#endif /* CONFIG_PM_DEVICE */
610610

611611
static const struct sensor_driver_api bmp388_api = {
612612
.attr_set = bmp388_attr_set,
@@ -671,7 +671,7 @@ static int bmp388_init(const struct device *dev)
671671
return -ENODEV;
672672
}
673673

674-
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
674+
#ifdef CONFIG_PM_DEVICE
675675
bmp388->device_power_state = PM_DEVICE_STATE_ACTIVE;
676676
#endif
677677

drivers/sensor/bmp388/bmp388.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ struct bmp388_data {
163163
uint8_t osr_temp;
164164
struct bmp388_cal_data cal;
165165

166-
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
166+
#ifdef CONFIG_PM_DEVICE
167167
uint32_t device_power_state;
168168
#endif
169169

drivers/sensor/bmp388/bmp388_trigger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ int bmp388_trigger_set(
9191
{
9292
struct bmp388_data *data = DEV_DATA(dev);
9393

94-
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
94+
#ifdef CONFIG_PM_DEVICE
9595
if (data->device_power_state != PM_DEVICE_STATE_ACTIVE) {
9696
return -EBUSY;
9797
}

0 commit comments

Comments
 (0)