diff --git a/drivers/amlogic/iio/adc/meson_saradc.c b/drivers/amlogic/iio/adc/meson_saradc.c index ca764dd3cc4e..9b4ab35f53f2 100644 --- a/drivers/amlogic/iio/adc/meson_saradc.c +++ b/drivers/amlogic/iio/adc/meson_saradc.c @@ -38,6 +38,7 @@ #include #include #include +#include #define MESON_SAR_ADC_REG0 0x00 #define MESON_SAR_ADC_REG0_PANEL_DETECT BIT(31) @@ -1702,6 +1703,9 @@ static int __maybe_unused meson_sar_adc_suspend(struct device *dev) struct iio_dev *indio_dev = dev_get_drvdata(dev); int ret; + if (is_pm_freeze_mode()) + return 0; + if (iio_buffer_enabled(indio_dev)) { ret = meson_sar_adc_buffer_predisable(indio_dev); if (ret) @@ -1720,6 +1724,9 @@ static int __maybe_unused meson_sar_adc_resume(struct device *dev) struct iio_dev *indio_dev = dev_get_drvdata(dev); int ret; + if (is_pm_freeze_mode()) + return 0; + ret = meson_sar_adc_hw_enable(indio_dev); if (ret) return ret; diff --git a/drivers/amlogic/input/keyboard/adc_keypad.c b/drivers/amlogic/input/keyboard/adc_keypad.c index 7182e595ab89..c1ad72014e22 100644 --- a/drivers/amlogic/input/keyboard/adc_keypad.c +++ b/drivers/amlogic/input/keyboard/adc_keypad.c @@ -576,6 +576,8 @@ static int meson_adc_kp_remove(struct platform_device *pdev) static int meson_adc_kp_suspend(struct platform_device *pdev, pm_message_t state) { + if (is_pm_freeze_mode()) + return 0; return 0; } @@ -584,6 +586,9 @@ static int meson_adc_kp_resume(struct platform_device *pdev) struct adc_key *key; struct meson_adc_kp *kp = platform_get_drvdata(pdev); + if (is_pm_freeze_mode()) + return 0; + if (get_resume_method() == POWER_KEY_WAKEUP) { list_for_each_entry(key, &kp->adckey_head, list) { if (key->code == KEY_POWER) { diff --git a/drivers/amlogic/input/keyboard/gpio_keypad.c b/drivers/amlogic/input/keyboard/gpio_keypad.c index 33abc17b92b0..92c50f1a60e3 100644 --- a/drivers/amlogic/input/keyboard/gpio_keypad.c +++ b/drivers/amlogic/input/keyboard/gpio_keypad.c @@ -280,6 +280,9 @@ static int meson_gpio_kp_suspend(struct platform_device *dev, { struct gpio_keypad *pdata; + if (is_pm_freeze_mode()) + return 0; + pdata = (struct gpio_keypad *)platform_get_drvdata(dev); if (!pdata->use_irq) del_timer(&(pdata->polling_timer)); @@ -291,6 +294,9 @@ static int meson_gpio_kp_resume(struct platform_device *dev) int i; struct gpio_keypad *pdata; + if (is_pm_freeze_mode()) + return 0; + pdata = (struct gpio_keypad *)platform_get_drvdata(dev); if (!pdata->use_irq) mod_timer(&(pdata->polling_timer), diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index 3664f81655ca..3dad3a24f115 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c @@ -30,7 +30,7 @@ static void input_polldev_queue_work(struct input_polled_dev *dev) if (delay >= HZ) delay = round_jiffies_relative(delay); - queue_delayed_work(system_freezable_wq, &dev->work, delay); + queue_delayed_work(system_wq, &dev->work, delay); } static void input_polled_device_work(struct work_struct *work)