From c4fc0a51539a96a25104eb586142c573ce16bf33 Mon Sep 17 00:00:00 2001 From: Qiqi Zhang Date: Mon, 9 Jan 2023 18:04:50 +0800 Subject: [PATCH] input: rockchip_pwm_remotectl: workaround rk3528 IR code reading issue Change-Id: Ic1cf95c7347324fd5b87e97b8084b7fb2a3d6708 Signed-off-by: Qiqi Zhang --- drivers/input/remotectl/rockchip_pwm_remotectl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/input/remotectl/rockchip_pwm_remotectl.c b/drivers/input/remotectl/rockchip_pwm_remotectl.c index f24ba9edf08b..fa3d7650d8ff 100644 --- a/drivers/input/remotectl/rockchip_pwm_remotectl.c +++ b/drivers/input/remotectl/rockchip_pwm_remotectl.c @@ -335,9 +335,12 @@ static irqreturn_t rockchip_pwm_irq(int irq, void *dev_id) return IRQ_NONE; if ((val & PWM_CH_POL(id)) == 0) { temp_hpr = readl_relaxed(ddata->base + PWM_REG_HPR); - DBG("hpr=%d\n", temp_hpr); + writel_relaxed(0, ddata->base + PWM_REG_HPR); temp_lpr = readl_relaxed(ddata->base + PWM_REG_LPR); + writel_relaxed(0, ddata->base + PWM_REG_LPR); + DBG("hpr=%d\n", temp_hpr); DBG("lpr=%d\n", temp_lpr); + temp_period = ddata->pwm_freq_nstime * temp_lpr / 1000; if (temp_period > RK_PWM_TIME_BIT0_MIN) { ddata->period = ddata->temp_period