@@ -77,7 +77,7 @@ struct bme280_data {
7777
7878 uint8_t chip_id ;
7979
80- #ifdef CONFIG_DEVICE_POWER_MANAGEMENT
80+ #ifdef CONFIG_PM_DEVICE
8181 uint32_t pm_state ; /* Current power state */
8282#endif
8383};
@@ -322,7 +322,7 @@ static int bme280_sample_fetch(const struct device *dev,
322322
323323 __ASSERT_NO_MSG (chan == SENSOR_CHAN_ALL );
324324
325- #ifdef CONFIG_DEVICE_POWER_MANAGEMENT
325+ #ifdef CONFIG_PM_DEVICE
326326 /* Do not allow sample fetching from OFF state */
327327 if (data -> pm_state == DEVICE_PM_OFF_STATE )
328328 return - EIO ;
@@ -585,7 +585,7 @@ int bme280_init(const struct device *dev)
585585
586586 rc = 0 ;
587587
588- #ifdef CONFIG_DEVICE_POWER_MANAGEMENT
588+ #ifdef CONFIG_PM_DEVICE
589589 /* Set power state to ACTIVE */
590590 data -> pm_state = DEVICE_PM_ACTIVE_STATE ;
591591#endif
@@ -599,7 +599,7 @@ int bme280_init(const struct device *dev)
599599 return rc ;
600600}
601601
602- #ifdef CONFIG_DEVICE_POWER_MANAGEMENT
602+ #ifdef CONFIG_PM_DEVICE
603603int bme280_pm_ctrl (const struct device * dev , uint32_t ctrl_command ,
604604 void * context , device_pm_cb cb , void * arg )
605605{
@@ -649,7 +649,7 @@ int bme280_pm_ctrl(const struct device *dev, uint32_t ctrl_command,
649649
650650 return ret ;
651651}
652- #endif /* CONFIG_DEVICE_POWER_MANAGEMENT */
652+ #endif /* CONFIG_PM_DEVICE */
653653
654654
655655/*
0 commit comments