From 76897edeb832d0771a49eee4ce5da0b824158658 Mon Sep 17 00:00:00 2001 From: Guohai Wang Date: Tue, 25 Jun 2019 15:27:58 +0800 Subject: [PATCH] input: Add IR decode driver Change-Id: I7e6f36b70fd1f5356ad64cad9a0b9f2aab18c2b1 Signed-off-by: Guohai Wang Reviewed-by: Zhangbin Tong --- drivers/input/Kconfig | 2 ++ drivers/input/Makefile | 2 ++ drivers/input/remotectl/rockchip_pwm_remotectl.c | 8 +++----- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index c5992cd195a1..849d54c4c9da 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -198,6 +198,8 @@ source "drivers/input/touchscreen/Kconfig" source "drivers/input/misc/Kconfig" +source "drivers/input/remotectl/Kconfig" + source "drivers/input/rmi4/Kconfig" endif diff --git a/drivers/input/Makefile b/drivers/input/Makefile index 40de6a7be641..268249852af6 100644 --- a/drivers/input/Makefile +++ b/drivers/input/Makefile @@ -28,4 +28,6 @@ obj-$(CONFIG_INPUT_MISC) += misc/ obj-$(CONFIG_INPUT_APMPOWER) += apm-power.o +obj-$(CONFIG_ROCKCHIP_REMOTECTL) += remotectl/ + obj-$(CONFIG_RMI4_CORE) += rmi4/ diff --git a/drivers/input/remotectl/rockchip_pwm_remotectl.c b/drivers/input/remotectl/rockchip_pwm_remotectl.c index 15b04e3c9e01..3322af9811a6 100644 --- a/drivers/input/remotectl/rockchip_pwm_remotectl.c +++ b/drivers/input/remotectl/rockchip_pwm_remotectl.c @@ -282,11 +282,10 @@ static void rk_pwm_remotectl_do_something(unsigned long data) } } -static void rk_pwm_remotectl_timer(unsigned long _data) +static void rk_pwm_remotectl_timer(struct timer_list *t) { - struct rkxx_remotectl_drvdata *ddata; + struct rkxx_remotectl_drvdata *ddata = from_timer(ddata, t, timer); - ddata = (struct rkxx_remotectl_drvdata *)_data; if (ddata->press != ddata->pre_press) { ddata->pre_press = 0; ddata->press = 0; @@ -513,8 +512,7 @@ static int rk_pwm_probe(struct platform_device *pdev) input_set_capability(input, EV_KEY, KEY_WAKEUP); device_init_wakeup(&pdev->dev, 1); enable_irq_wake(irq); - setup_timer(&ddata->timer, rk_pwm_remotectl_timer, - (unsigned long)ddata); + timer_setup(&ddata->timer, rk_pwm_remotectl_timer, 0); wake_lock_init(&ddata->remotectl_wake_lock, WAKE_LOCK_SUSPEND, "rockchip_pwm_remote"); cpumask_clear(&cpumask);