[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZ4BoZzX7pVw4HYBzSMvhnyu_oVNoiiLk3ME05nnG1T3Q@mail.gmail.com>
Date: Tue, 25 Jun 2019 10:58:45 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Neeraj Upadhyay <neeraju@...eaurora.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>,
Stephen Boyd <sboyd@...eaurora.org>,
Timur Tabi <timur@...eaurora.org>,
MSM <linux-arm-msm@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Srinivas Ramana <sramana@...eaurora.org>
Subject: Re: [PATCH v2] pinctrl: qcom: Add irq_enable callback for msm gpio
On Mon, Jun 17, 2019 at 11:35 AM Neeraj Upadhyay <neeraju@...eaurora.org> wrote:
> From: Srinivas Ramana <sramana@...eaurora.org>
>
> Introduce the irq_enable callback which will be same as irq_unmask
> except that it will also clear the status bit before unmask.
>
> This will help in clearing any erroneous interrupts that would
> have got latched when the interrupt is not in use.
>
> There may be devices like UART which can use the same gpio line
> for data rx as well as a wakeup gpio when in suspend. The data that
> was flowing on the line may latch the interrupt and when we enable
> the interrupt before going to suspend, this would trigger the
> unexpected interrupt. This change helps clearing the interrupt
> so that these unexpected interrupts gets cleared.
>
> Signed-off-by: Srinivas Ramana <sramana@...eaurora.org>
> Signed-off-by: Neeraj Upadhyay <neeraju@...eaurora.org>
Overall this looks good to me, waiting for Bjorn's review.
> Changes since v1:
> - Extracted common code into __msm_gpio_irq_unmask().
Please don't name functions __like __that.
> -static void msm_gpio_irq_unmask(struct irq_data *d)
> +static void __msm_gpio_irq_unmask(struct irq_data *d, bool status_clear)
Instead of __unclear __underscore __semantic use something
really descriptive like
static void msm_gpio_irq_clear_irq()
That is what it does, right?
Other than that it looks fine.
Yours,
Linus Walleij
Powered by blists - more mailing lists