input: Add IR decode driver

Change-Id: I7e6f36b70fd1f5356ad64cad9a0b9f2aab18c2b1
Signed-off-by: Guohai Wang <alex.wang@rock-chips.com>
Reviewed-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
This commit is contained in:
Guohai Wang 2019-06-25 15:27:58 +08:00 committed by Tao Huang
commit 76897edeb8
3 changed files with 7 additions and 5 deletions

View file

@ -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

View file

@ -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/

View file

@ -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);