pm: device: remove ctrl_command callback argument

The ctrl_command is not used anymore, so remove it from the callback
signature.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
diff --git a/drivers/display/display_st7735r.c b/drivers/display/display_st7735r.c
index 467621d..7f2d0f0 100644
--- a/drivers/display/display_st7735r.c
+++ b/drivers/display/display_st7735r.c
@@ -499,7 +499,7 @@
 	return st7735r_transmit(data, ST7735R_CMD_SLEEP_IN, NULL, 0);
 }
 
-static int st7735r_pm_control(const struct device *dev, uint32_t ctrl_command,
+static int st7735r_pm_control(const struct device *dev,
 			      enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/display/display_st7789v.c b/drivers/display/display_st7789v.c
index 6cf6da4..fe6f1c4 100644
--- a/drivers/display/display_st7789v.c
+++ b/drivers/display/display_st7789v.c
@@ -401,8 +401,8 @@
 	st7789v_transmit(data, ST7789V_CMD_SLEEP_IN, NULL, 0);
 }
 
-static int st7789v_pm_control(const struct device *dev, uint32_t ctrl_command,
-				 enum pm_device_state *state)
+static int st7789v_pm_control(const struct device *dev,
+			      enum pm_device_state *state)
 {
 	struct st7789v_data *data = (struct st7789v_data *)dev->data;
 
diff --git a/drivers/entropy/entropy_cc13xx_cc26xx.c b/drivers/entropy/entropy_cc13xx_cc26xx.c
index 4095823..a6311d4 100644
--- a/drivers/entropy/entropy_cc13xx_cc26xx.c
+++ b/drivers/entropy/entropy_cc13xx_cc26xx.c
@@ -291,7 +291,6 @@
 }
 
 static int entropy_cc13xx_cc26xx_pm_control(const struct device *dev,
-					    uint32_t ctrl_command,
 					    enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/ethernet/eth_mcux.c b/drivers/ethernet/eth_mcux.c
index b779a06..bec0d6f 100644
--- a/drivers/ethernet/eth_mcux.c
+++ b/drivers/ethernet/eth_mcux.c
@@ -185,7 +185,6 @@
 void eth_mcux_phy_stop(struct eth_context *context);
 
 static int eth_mcux_device_pm_control(const struct device *dev,
-				      uint32_t command,
 				      enum pm_device_state *state)
 {
 	struct eth_context *eth_ctx = (struct eth_context *)dev->data;
diff --git a/drivers/flash/spi_flash_at45.c b/drivers/flash/spi_flash_at45.c
index 9dd107d..3c63f1d 100644
--- a/drivers/flash/spi_flash_at45.c
+++ b/drivers/flash/spi_flash_at45.c
@@ -625,7 +625,6 @@
 
 #if IS_ENABLED(CONFIG_PM_DEVICE)
 static int spi_flash_at45_pm_control(const struct device *dev,
-				     uint32_t ctrl_command,
 				     enum pm_device_state *state)
 {
 	const struct spi_flash_at45_config *dev_config = get_dev_config(dev);
diff --git a/drivers/gpio/gpio_dw.c b/drivers/gpio/gpio_dw.c
index 931757d..be3b920 100644
--- a/drivers/gpio/gpio_dw.c
+++ b/drivers/gpio/gpio_dw.c
@@ -442,7 +442,6 @@
 * the *context may include IN data or/and OUT data
 */
 static int gpio_dw_device_ctrl(const struct device *port,
-			       uint32_t ctrl_command,
 			       enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/gpio/gpio_stm32.c b/drivers/gpio/gpio_stm32.c
index 29f095e..9510a94 100644
--- a/drivers/gpio/gpio_stm32.c
+++ b/drivers/gpio/gpio_stm32.c
@@ -595,7 +595,6 @@
 }
 
 static int gpio_stm32_pm_device_ctrl(const struct device *dev,
-				     uint32_t ctrl_command,
 				     enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/i2c/i2c_cc13xx_cc26xx.c b/drivers/i2c/i2c_cc13xx_cc26xx.c
index 4326bc9..46f9528 100644
--- a/drivers/i2c/i2c_cc13xx_cc26xx.c
+++ b/drivers/i2c/i2c_cc13xx_cc26xx.c
@@ -365,7 +365,6 @@
 }
 
 static int i2c_cc13xx_cc26xx_pm_control(const struct device *dev,
-					uint32_t ctrl_command,
 					enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/i2c/i2c_nrfx_twi.c b/drivers/i2c/i2c_nrfx_twi.c
index efa0cf1..7a89740 100644
--- a/drivers/i2c/i2c_nrfx_twi.c
+++ b/drivers/i2c/i2c_nrfx_twi.c
@@ -217,8 +217,7 @@
 
 #ifdef CONFIG_PM_DEVICE
 static int twi_nrfx_pm_control(const struct device *dev,
-				uint32_t ctrl_command,
-				enum pm_device_state *state)
+			       enum pm_device_state *state)
 {
 	int ret = 0;
 	enum pm_device_state curr_state;
diff --git a/drivers/i2c/i2c_nrfx_twim.c b/drivers/i2c/i2c_nrfx_twim.c
index dcb6b03..2e8bcbc 100644
--- a/drivers/i2c/i2c_nrfx_twim.c
+++ b/drivers/i2c/i2c_nrfx_twim.c
@@ -255,7 +255,6 @@
 
 #ifdef CONFIG_PM_DEVICE
 static int twim_nrfx_pm_control(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/interrupt_controller/intc_arcv2_irq_unit.c b/drivers/interrupt_controller/intc_arcv2_irq_unit.c
index 5df1dc7..4c02ad5 100644
--- a/drivers/interrupt_controller/intc_arcv2_irq_unit.c
+++ b/drivers/interrupt_controller/intc_arcv2_irq_unit.c
@@ -175,7 +175,6 @@
  * @return operation result
  */
 static int arc_v2_irq_unit_device_ctrl(const struct device *dev,
-				       uint32_t ctrl_command,
 				       enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/interrupt_controller/intc_ioapic.c b/drivers/interrupt_controller/intc_ioapic.c
index 31cd89b..ec2d219 100644
--- a/drivers/interrupt_controller/intc_ioapic.c
+++ b/drivers/interrupt_controller/intc_ioapic.c
@@ -310,7 +310,6 @@
 */
 __pinned_func
 static int ioapic_device_ctrl(const struct device *dev,
-			      uint32_t ctrl_command,
 			      enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/interrupt_controller/intc_loapic.c b/drivers/interrupt_controller/intc_loapic.c
index 7809e07..7c03ab5 100644
--- a/drivers/interrupt_controller/intc_loapic.c
+++ b/drivers/interrupt_controller/intc_loapic.c
@@ -409,7 +409,6 @@
 */
 __pinned_func
 static int loapic_device_ctrl(const struct device *port,
-			      uint32_t ctrl_command,
 			      enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/led/led_pwm.c b/drivers/led/led_pwm.c
index 4fbad06..465dfe2 100644
--- a/drivers/led/led_pwm.c
+++ b/drivers/led/led_pwm.c
@@ -142,7 +142,7 @@
 	return 0;
 }
 
-static int led_pwm_pm_control(const struct device *dev, uint32_t ctrl_command,
+static int led_pwm_pm_control(const struct device *dev,
 			      enum pm_device_state *state)
 {
 	return led_pwm_pm_set_state(dev, *state);
diff --git a/drivers/pwm/pwm_nrfx.c b/drivers/pwm/pwm_nrfx.c
index e8b9db0..2a9b215 100644
--- a/drivers/pwm/pwm_nrfx.c
+++ b/drivers/pwm/pwm_nrfx.c
@@ -318,7 +318,6 @@
 }
 
 static int pwm_nrfx_pm_control(const struct device *dev,
-			       uint32_t ctrl_command,
 			       enum pm_device_state *state)
 {
 	int err = 0;
@@ -334,10 +333,9 @@
 
 #define PWM_NRFX_PM_CONTROL(idx)					       \
 	static int pwm_##idx##_nrfx_pm_control(const struct device *dev,       \
-					       uint32_t ctrl_command,	       \
 					       enum pm_device_state *state)    \
 	{								       \
-		return pwm_nrfx_pm_control(dev, ctrl_command, state)	       \
+		return pwm_nrfx_pm_control(dev, state)			       \
 	}
 #else
 
diff --git a/drivers/sensor/apds9960/apds9960.c b/drivers/sensor/apds9960/apds9960.c
index 32d4d4b..95defc1 100644
--- a/drivers/sensor/apds9960/apds9960.c
+++ b/drivers/sensor/apds9960/apds9960.c
@@ -409,7 +409,6 @@
 
 #ifdef CONFIG_PM_DEVICE
 static int apds9960_device_ctrl(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	const struct apds9960_config *config = dev->config;
diff --git a/drivers/sensor/bme280/bme280.c b/drivers/sensor/bme280/bme280.c
index faa439f..49d4f79 100644
--- a/drivers/sensor/bme280/bme280.c
+++ b/drivers/sensor/bme280/bme280.c
@@ -410,8 +410,7 @@
 }
 
 #ifdef CONFIG_PM_DEVICE
-int bme280_pm_ctrl(const struct device *dev, uint32_t ctrl_command,
-		   enum pm_device_state *state)
+int bme280_pm_ctrl(const struct device *dev, enum pm_device_state *state)
 {
 	int ret = 0;
 	enum pm_device_state curr_state;
diff --git a/drivers/sensor/bmp388/bmp388.c b/drivers/sensor/bmp388/bmp388.c
index eab0041..f35b690 100644
--- a/drivers/sensor/bmp388/bmp388.c
+++ b/drivers/sensor/bmp388/bmp388.c
@@ -583,7 +583,6 @@
 
 static int bmp388_device_ctrl(
 	const struct device *dev,
-	uint32_t ctrl_command,
 	enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/sensor/bq274xx/bq274xx.c b/drivers/sensor/bq274xx/bq274xx.c
index e3dc76a..5fd2932 100644
--- a/drivers/sensor/bq274xx/bq274xx.c
+++ b/drivers/sensor/bq274xx/bq274xx.c
@@ -731,8 +731,8 @@
 	return 0;
 }
 
-static int bq274xx_pm_control(const struct device *dev, uint32_t ctrl_command,
-				  enum pm_device_state *state)
+static int bq274xx_pm_control(const struct device *dev,
+			      enum pm_device_state *state)
 {
 	int ret = 0;
 	struct bq274xx_data *data = dev->data;
diff --git a/drivers/sensor/fdc2x1x/fdc2x1x.c b/drivers/sensor/fdc2x1x/fdc2x1x.c
index 34eff52..c7f710f 100644
--- a/drivers/sensor/fdc2x1x/fdc2x1x.c
+++ b/drivers/sensor/fdc2x1x/fdc2x1x.c
@@ -535,7 +535,6 @@
 }
 
 static int fdc2x1x_device_pm_ctrl(const struct device *dev,
-				  uint32_t ctrl_command,
 				  enum pm_device_state *state)
 {
 	struct fdc2x1x_data *data = dev->data;
diff --git a/drivers/sensor/lis2mdl/lis2mdl.c b/drivers/sensor/lis2mdl/lis2mdl.c
index 64af656..7da0500 100644
--- a/drivers/sensor/lis2mdl/lis2mdl.c
+++ b/drivers/sensor/lis2mdl/lis2mdl.c
@@ -475,8 +475,8 @@
 	return status;
 }
 
-static int lis2mdl_pm_control(const struct device *dev, uint32_t ctrl_command,
-				enum pm_device_state *state)
+static int lis2mdl_pm_control(const struct device *dev,
+			      enum pm_device_state *state)
 {
 	struct lis2mdl_data *lis2mdl = dev->data;
 	const struct lis2mdl_config *const config = dev->config;
diff --git a/drivers/sensor/qdec_nrfx/qdec_nrfx.c b/drivers/sensor/qdec_nrfx/qdec_nrfx.c
index 01be74e..09c9598 100644
--- a/drivers/sensor/qdec_nrfx/qdec_nrfx.c
+++ b/drivers/sensor/qdec_nrfx/qdec_nrfx.c
@@ -240,7 +240,6 @@
 }
 
 static int qdec_nrfx_pm_control(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	struct qdec_nrfx_data *data = &qdec_nrfx_data;
diff --git a/drivers/sensor/sgp40/sgp40.c b/drivers/sensor/sgp40/sgp40.c
index 55c803c..7e9c5ce 100644
--- a/drivers/sensor/sgp40/sgp40.c
+++ b/drivers/sensor/sgp40/sgp40.c
@@ -218,9 +218,7 @@
 	return 0;
 }
 
-static int sgp40_pm_ctrl(const struct device *dev,
-	uint32_t ctrl_command,
-	enum pm_device_state *state)
+static int sgp40_pm_ctrl(const struct device *dev, enum pm_device_state *state)
 {
 	return sgp40_set_power_state(dev, *state);
 }
diff --git a/drivers/sensor/vcnl4040/vcnl4040.c b/drivers/sensor/vcnl4040/vcnl4040.c
index 199d630..96d34dd 100644
--- a/drivers/sensor/vcnl4040/vcnl4040.c
+++ b/drivers/sensor/vcnl4040/vcnl4040.c
@@ -219,7 +219,6 @@
 
 #ifdef CONFIG_PM_DEVICE
 static int vcnl4040_device_ctrl(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/serial/uart_cc13xx_cc26xx.c b/drivers/serial/uart_cc13xx_cc26xx.c
index c442616..a4d81e8 100644
--- a/drivers/serial/uart_cc13xx_cc26xx.c
+++ b/drivers/serial/uart_cc13xx_cc26xx.c
@@ -441,7 +441,6 @@
 }
 
 static int uart_cc13xx_cc26xx_pm_control(const struct device *dev,
-					 uint32_t ctrl_command,
 					 enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/serial/uart_npcx.c b/drivers/serial/uart_npcx.c
index e8b9849..b3b8a91 100644
--- a/drivers/serial/uart_npcx.c
+++ b/drivers/serial/uart_npcx.c
@@ -457,8 +457,8 @@
 }
 
 /* Implements the device power management control functionality */
-static int uart_npcx_pm_control(const struct device *dev, uint32_t ctrl_command,
-				 enum pm_device_state *state)
+static int uart_npcx_pm_control(const struct device *dev,
+				enum pm_device_state *state)
 {
 	return uart_npcx_set_power_state(dev, *state);
 }
diff --git a/drivers/serial/uart_nrfx_uart.c b/drivers/serial/uart_nrfx_uart.c
index 150296a..4486d70 100644
--- a/drivers/serial/uart_nrfx_uart.c
+++ b/drivers/serial/uart_nrfx_uart.c
@@ -1159,7 +1159,6 @@
 }
 
 static int uart_nrfx_pm_control(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	enum pm_device_state current_state;
diff --git a/drivers/serial/uart_nrfx_uarte.c b/drivers/serial/uart_nrfx_uarte.c
index b9349d4..474c586 100644
--- a/drivers/serial/uart_nrfx_uarte.c
+++ b/drivers/serial/uart_nrfx_uarte.c
@@ -1922,7 +1922,6 @@
 }
 
 static int uarte_nrfx_pm_control(const struct device *dev,
-				 uint32_t ctrl_command,
 				 enum pm_device_state *state)
 {
 	enum pm_device_state curr_state;
diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c
index 02e013b..7d65a76 100644
--- a/drivers/serial/uart_stm32.c
+++ b/drivers/serial/uart_stm32.c
@@ -1460,8 +1460,7 @@
  * @return 0
  */
 static int uart_stm32_pm_control(const struct device *dev,
-					 uint32_t ctrl_command,
-					 enum pm_device_state *state)
+				 enum pm_device_state *state)
 {
 	enum pm_device_state curr_state;
 
diff --git a/drivers/spi/spi_cc13xx_cc26xx.c b/drivers/spi/spi_cc13xx_cc26xx.c
index aececb7..ede932e 100644
--- a/drivers/spi/spi_cc13xx_cc26xx.c
+++ b/drivers/spi/spi_cc13xx_cc26xx.c
@@ -248,7 +248,6 @@
 }
 
 static int spi_cc13xx_cc26xx_pm_control(const struct device *dev,
-					uint32_t ctrl_command,
 					enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/spi/spi_nrfx_spi.c b/drivers/spi/spi_nrfx_spi.c
index 07ffe2e..d87bfaf 100644
--- a/drivers/spi/spi_nrfx_spi.c
+++ b/drivers/spi/spi_nrfx_spi.c
@@ -278,8 +278,7 @@
 
 #ifdef CONFIG_PM_DEVICE
 static int spi_nrfx_pm_control(const struct device *dev,
-				uint32_t ctrl_command,
-				enum pm_device_state *state)
+			       enum pm_device_state *state)
 {
 	int ret = 0;
 	struct spi_nrfx_data *data = get_dev_data(dev);
diff --git a/drivers/spi/spi_nrfx_spim.c b/drivers/spi/spi_nrfx_spim.c
index a8f966f..0695a31 100644
--- a/drivers/spi/spi_nrfx_spim.c
+++ b/drivers/spi/spi_nrfx_spim.c
@@ -325,7 +325,6 @@
 
 #ifdef CONFIG_PM_DEVICE
 static int spim_nrfx_pm_control(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	int ret = 0;
diff --git a/drivers/timer/sys_clock_init.c b/drivers/timer/sys_clock_init.c
index 8bbdef7..7e892e0 100644
--- a/drivers/timer/sys_clock_init.c
+++ b/drivers/timer/sys_clock_init.c
@@ -31,7 +31,6 @@
 }
 
 int __weak sys_clock_device_ctrl(const struct device *dev,
-				 uint32_t ctrl_command,
 				 enum pm_device_state *state)
 {
 	return -ENOSYS;
diff --git a/include/device.h b/include/device.h
index 6c69afd..de8ac09 100644
--- a/include/device.h
+++ b/include/device.h
@@ -384,7 +384,7 @@
 	const device_handle_t *const handles;
 #ifdef CONFIG_PM_DEVICE
 	/** Power Management function */
-	int (*pm_control)(const struct device *dev, uint32_t command,
+	int (*pm_control)(const struct device *dev,
 			  enum pm_device_state *state);
 	/** Pointer to device instance power management data */
 	struct pm_device * const pm;
diff --git a/include/drivers/timer/system_timer.h b/include/drivers/timer/system_timer.h
index 4ec4944..61b7a24 100644
--- a/include/drivers/timer/system_timer.h
+++ b/include/drivers/timer/system_timer.h
@@ -46,7 +46,7 @@
  * management.  It is a weak symbol that will be implemented as a noop
  * if undefined in the clock driver.
  */
-extern int clock_device_ctrl(const struct device *dev, uint32_t ctrl_command,
+extern int clock_device_ctrl(const struct device *dev,
 			     enum pm_device_state *state);
 
 /**
diff --git a/include/pm/device.h b/include/pm/device.h
index eec9d26..313e00f 100644
--- a/include/pm/device.h
+++ b/include/pm/device.h
@@ -62,11 +62,6 @@
 	PM_DEVICE_STATE_SUSPENDING,
 };
 
-/** Device PM set state control command. */
-#define PM_DEVICE_STATE_SET 0
-/** Device PM get state control command. */
-#define PM_DEVICE_STATE_GET 1
-
 /** @brief Device PM flags. */
 enum pm_device_flag {
 	/** Indicate if the device is busy or not. */
diff --git a/samples/subsys/pm/device_pm/src/dummy_driver.c b/samples/subsys/pm/device_pm/src/dummy_driver.c
index 16bd3fa..8e2f461 100644
--- a/samples/subsys/pm/device_pm/src/dummy_driver.c
+++ b/samples/subsys/pm/device_pm/src/dummy_driver.c
@@ -87,7 +87,6 @@
 }
 
 static int dummy_device_pm_ctrl(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	if (*state == PM_DEVICE_STATE_ACTIVE) {
diff --git a/samples/subsys/pm/device_pm/src/dummy_parent.c b/samples/subsys/pm/device_pm/src/dummy_parent.c
index 16368c6..8a9f57d 100644
--- a/samples/subsys/pm/device_pm/src/dummy_parent.c
+++ b/samples/subsys/pm/device_pm/src/dummy_parent.c
@@ -25,7 +25,6 @@
 }
 
 static int dummy_parent_pm_ctrl(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	if (*state == PM_DEVICE_STATE_ACTIVE) {
diff --git a/subsys/pm/device.c b/subsys/pm/device.c
index 80b34b9..936541a 100644
--- a/subsys/pm/device.c
+++ b/subsys/pm/device.c
@@ -137,7 +137,7 @@
 		return -ENOSYS;
 	}
 
-	ret = dev->pm_control(dev, PM_DEVICE_STATE_SET, &device_power_state);
+	ret = dev->pm_control(dev, &device_power_state);
 	if (ret < 0) {
 		return ret;
 	}
diff --git a/tests/net/pm/src/main.c b/tests/net/pm/src/main.c
index 7cb46a9..9abb81c 100644
--- a/tests/net/pm/src/main.c
+++ b/tests/net/pm/src/main.c
@@ -21,7 +21,7 @@
 	struct net_if *iface;
 };
 
-static int fake_dev_pm_control(const struct device *dev, uint32_t command,
+static int fake_dev_pm_control(const struct device *dev,
 			       enum pm_device_state *state)
 {
 	struct fake_dev_context *ctx = dev->data;
diff --git a/tests/subsys/pm/device_runtime/src/dummy_driver.c b/tests/subsys/pm/device_runtime/src/dummy_driver.c
index af7a808..b91c10c 100644
--- a/tests/subsys/pm/device_runtime/src/dummy_driver.c
+++ b/tests/subsys/pm/device_runtime/src/dummy_driver.c
@@ -35,7 +35,6 @@
 }
 
 static int dummy_device_pm_ctrl(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	return 0;
diff --git a/tests/subsys/pm/power_mgmt/src/dummy_driver.c b/tests/subsys/pm/power_mgmt/src/dummy_driver.c
index ecb3605..7b37346 100644
--- a/tests/subsys/pm/power_mgmt/src/dummy_driver.c
+++ b/tests/subsys/pm/power_mgmt/src/dummy_driver.c
@@ -20,7 +20,6 @@
 }
 
 static int dummy_device_pm_ctrl(const struct device *dev,
-				uint32_t ctrl_command,
 				enum pm_device_state *state)
 {
 	return 0;