mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
suspend: not do suspend action under freeze mode [1/1]
PD#TV-4213 Problem: can't wake up by gpio/adc key when suspend into freeze mode Solution: not suspend gpio/adc when freeze Verify: X301 Change-Id: I32ff27aafebe35d8deb6e9b4d3daee686bbf90bc Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <linux/iio/buffer.h>
|
||||
#include <linux/iio/kfifo_buf.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/amlogic/pm.h>
|
||||
|
||||
#define MESON_SAR_ADC_REG0 0x00
|
||||
#define MESON_SAR_ADC_REG0_PANEL_DETECT BIT(31)
|
||||
@@ -1667,6 +1668,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)
|
||||
@@ -1685,6 +1689,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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -343,6 +343,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));
|
||||
@@ -354,6 +357,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),
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user