diff mbox series

[v3,5/6] Input: edt-ft5x06 - use pm core to enable/disable the wake irq

Message ID 20200108111050.19001-6-m.felsch@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series EDT-FT5x06 improvements | expand

Commit Message

Marco Felsch Jan. 8, 2020, 11:10 a.m. UTC
We do not have to handle the wake-irq within the driver because the pm
core can handle this for us. The only use case for the suspend/resume
callbacks was to handle the wake-irq so we can remove the callbacks.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
v3:
- new patch to drop enable/disable_irq_wake() calls
---
 drivers/input/touchscreen/edt-ft5x06.c | 24 ------------------------
 1 file changed, 24 deletions(-)

Comments

Dmitry Torokhov Jan. 10, 2020, 1:07 a.m. UTC | #1
On Wed, Jan 08, 2020 at 12:10:49PM +0100, Marco Felsch wrote:
> We do not have to handle the wake-irq within the driver because the pm
> core can handle this for us. The only use case for the suspend/resume
> callbacks was to handle the wake-irq so we can remove the callbacks.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Applied, thank you.

> ---
> v3:
> - new patch to drop enable/disable_irq_wake() calls
> ---
>  drivers/input/touchscreen/edt-ft5x06.c | 24 ------------------------
>  1 file changed, 24 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> index c781952c3409..d2587724c52a 100644
> --- a/drivers/input/touchscreen/edt-ft5x06.c
> +++ b/drivers/input/touchscreen/edt-ft5x06.c
> @@ -1227,29 +1227,6 @@ static int edt_ft5x06_ts_remove(struct i2c_client *client)
>  	return 0;
>  }
>  
> -static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev)
> -{
> -	struct i2c_client *client = to_i2c_client(dev);
> -
> -	if (device_may_wakeup(dev))
> -		enable_irq_wake(client->irq);
> -
> -	return 0;
> -}
> -
> -static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev)
> -{
> -	struct i2c_client *client = to_i2c_client(dev);
> -
> -	if (device_may_wakeup(dev))
> -		disable_irq_wake(client->irq);
> -
> -	return 0;
> -}
> -
> -static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops,
> -			 edt_ft5x06_ts_suspend, edt_ft5x06_ts_resume);
> -
>  static const struct edt_i2c_chip_data edt_ft5x06_data = {
>  	.max_support_points = 5,
>  };
> @@ -1288,7 +1265,6 @@ static struct i2c_driver edt_ft5x06_ts_driver = {
>  	.driver = {
>  		.name = "edt_ft5x06",
>  		.of_match_table = edt_ft5x06_of_match,
> -		.pm = &edt_ft5x06_ts_pm_ops,
>  	},
>  	.id_table = edt_ft5x06_ts_id,
>  	.probe    = edt_ft5x06_ts_probe,
> -- 
> 2.20.1
>
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index c781952c3409..d2587724c52a 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -1227,29 +1227,6 @@  static int edt_ft5x06_ts_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev)
-{
-	struct i2c_client *client = to_i2c_client(dev);
-
-	if (device_may_wakeup(dev))
-		enable_irq_wake(client->irq);
-
-	return 0;
-}
-
-static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev)
-{
-	struct i2c_client *client = to_i2c_client(dev);
-
-	if (device_may_wakeup(dev))
-		disable_irq_wake(client->irq);
-
-	return 0;
-}
-
-static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops,
-			 edt_ft5x06_ts_suspend, edt_ft5x06_ts_resume);
-
 static const struct edt_i2c_chip_data edt_ft5x06_data = {
 	.max_support_points = 5,
 };
@@ -1288,7 +1265,6 @@  static struct i2c_driver edt_ft5x06_ts_driver = {
 	.driver = {
 		.name = "edt_ft5x06",
 		.of_match_table = edt_ft5x06_of_match,
-		.pm = &edt_ft5x06_ts_pm_ops,
 	},
 	.id_table = edt_ft5x06_ts_id,
 	.probe    = edt_ft5x06_ts_probe,