Skip to content

Commit d41dadc

Browse files
gmarullnashif
authored andcommitted
pm: rename PM_DEVICE_STATE_SUSPEND to PM_DEVICE_STATE_SUSPENDED
The verb tense for the suspended state was not consistent with other states. The likely reason: state was being used as a command/action. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 56a35e5 commit d41dadc

File tree

32 files changed

+61
-61
lines changed

32 files changed

+61
-61
lines changed

doc/reference/power_management/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,20 +248,20 @@ The four device power states:
248248

249249
Device context is preserved by the HW and need not be restored by the driver.
250250

251-
:code:`PM_DEVICE_STATE_SUSPEND`
251+
:code:`PM_DEVICE_STATE_SUSPENDED`
252252

253253
Most device context is lost by the hardware. Device drivers must save and
254254
restore or reinitialize any context lost by the hardware.
255255

256256
:code:`PM_DEVICE_STATE_SUSPENDING`
257257

258258
Device is currently transitioning from :c:macro:`PM_DEVICE_STATE_ACTIVE` to
259-
:c:macro:`PM_DEVICE_STATE_SUSPEND`.
259+
:c:macro:`PM_DEVICE_STATE_SUSPENDED`.
260260

261261
:code:`PM_DEVICE_STATE_RESUMING`
262262

263-
Device is currently transitioning from :c:macro:`PM_DEVICE_STATE_SUSPEND` to
264-
:c:macro:`PM_DEVICE_STATE_ACTIVE`.
263+
Device is currently transitioning from :c:macro:`PM_DEVICE_STATE_SUSPENDED`
264+
to :c:macro:`PM_DEVICE_STATE_ACTIVE`.
265265

266266
:code:`PM_DEVICE_STATE_OFF`
267267

drivers/ethernet/eth_mcux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static int eth_mcux_device_pm_control(const struct device *dev,
197197
goto out;
198198
}
199199

200-
if (state == PM_DEVICE_STATE_SUSPEND) {
200+
if (state == PM_DEVICE_STATE_SUSPENDED) {
201201
LOG_DBG("Suspending");
202202

203203
ret = net_if_suspend(eth_ctx->iface);

drivers/flash/spi_flash_at45.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ static int spi_flash_at45_pm_control(const struct device *dev,
636636
release(dev);
637637
break;
638638

639-
case PM_DEVICE_STATE_SUSPEND:
639+
case PM_DEVICE_STATE_SUSPENDED:
640640
case PM_DEVICE_STATE_OFF:
641641
acquire(dev);
642642
power_down_op(dev,

drivers/flash/spi_nor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ LOG_MODULE_REGISTER(spi_nor, CONFIG_FLASH_LOG_LEVEL);
3838
*
3939
* When mapped to the Zephyr Device Power Management states:
4040
* * PM_DEVICE_STATE_ACTIVE covers both active and standby modes;
41-
* * PM_DEVICE_STATE_SUSPEND, and PM_DEVICE_STATE_OFF all correspond
42-
* to deep-power-down mode.
41+
* * PM_DEVICE_STATE_SUSPENDED, and PM_DEVICE_STATE_OFF all correspond to
42+
* deep-power-down mode.
4343
*/
4444

4545
#define SPI_NOR_MAX_ADDR_WIDTH 4

drivers/gpio/gpio_dw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ static int gpio_dw_device_ctrl(const struct device *port,
446446
{
447447
int ret = 0;
448448

449-
if (state == PM_DEVICE_STATE_SUSPEND) {
449+
if (state == PM_DEVICE_STATE_SUSPENDED) {
450450
ret = gpio_dw_suspend_port(port);
451451
} else if (state == PM_DEVICE_STATE_ACTIVE) {
452452
ret = gpio_dw_resume_from_suspend_port(port);

drivers/gpio/gpio_stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ static int gpio_stm32_set_power_state(const struct device *dev,
581581

582582
if (state == PM_DEVICE_STATE_ACTIVE) {
583583
ret = gpio_stm32_clock_request(dev, true);
584-
} else if (state == PM_DEVICE_STATE_SUSPEND) {
584+
} else if (state == PM_DEVICE_STATE_SUSPENDED) {
585585
ret = gpio_stm32_clock_request(dev, false);
586586
}
587587

drivers/i2c/i2c_nrfx_twi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static int twi_nrfx_pm_control(const struct device *dev,
230230
}
231231
break;
232232

233-
case PM_DEVICE_STATE_SUSPEND:
233+
case PM_DEVICE_STATE_SUSPENDED:
234234
case PM_DEVICE_STATE_OFF:
235235
nrfx_twi_uninit(&get_dev_config(dev)->twi);
236236
break;

drivers/i2c/i2c_nrfx_twim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static int twim_nrfx_pm_control(const struct device *dev,
268268
}
269269
break;
270270

271-
case PM_DEVICE_STATE_SUSPEND:
271+
case PM_DEVICE_STATE_SUSPENDED:
272272
case PM_DEVICE_STATE_OFF:
273273
nrfx_twim_uninit(&get_dev_config(dev)->twim);
274274
break;

drivers/interrupt_controller/intc_arcv2_irq_unit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int arc_v2_irq_unit_device_ctrl(const struct device *dev,
180180
int ret = 0;
181181
unsigned int key = arch_irq_lock();
182182

183-
if (state == PM_DEVICE_STATE_SUSPEND) {
183+
if (state == PM_DEVICE_STATE_SUSPENDED) {
184184
ret = arc_v2_irq_unit_suspend(dev);
185185
} else if (state == PM_DEVICE_STATE_ACTIVE) {
186186
ret = arc_v2_irq_unit_resume(dev);

drivers/interrupt_controller/intc_ioapic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ static int ioapic_device_ctrl(const struct device *dev,
318318
case PM_DEVICE_STATE_ACTIVE:
319319
ret = ioapic_resume_from_suspend(dev);
320320
break;
321-
case PM_DEVICE_STATE_SUSPEND:
321+
case PM_DEVICE_STATE_SUSPENDED:
322322
case PM_DEVICE_STATE_OFF:
323323
ret = ioapic_suspend(dev);
324324
break;

0 commit comments

Comments
 (0)