Message ID | 20230323122910.991148-1-d-gole@ti.com |
---|---|
State | Superseded |
Headers | show |
Series | [RFC,1/2] gpio: davinci: Do not clear the bank intr enable bit in save_context | expand |
On Thu, Mar 23, 2023 at 1:29 PM Dhruva Gole <d-gole@ti.com> wrote: > The interrupt enable bits might be set if we want to use the GPIO as > wakeup source. Clearing this will mean disabling of interrupts in the GPIO > banks that we may want to wakeup from. > Thus remove the line that was clearing this bit from the driver's save > context function. > > Fixes: 0651a730924b ("gpio: davinci: Add support for system suspend/resume PM") > Cc: Devarsh Thakkar <devarsht@ti.com> > Signed-off-by: Dhruva Gole <d-gole@ti.com> Looks like the right solution to me. I'm a bit surprised given how long we have had this driver. I suppose people have used out-of-tree patches for suspend/resume. :( Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On 3/28/2023 6:59 PM, Linus Walleij wrote: > On Thu, Mar 23, 2023 at 1:29 PM Dhruva Gole <d-gole@ti.com> wrote: > >> The interrupt enable bits might be set if we want to use the GPIO as >> wakeup source. Clearing this will mean disabling of interrupts in the GPIO >> banks that we may want to wakeup from. >> Thus remove the line that was clearing this bit from the driver's save >> context function. >> >> Fixes: 0651a730924b ("gpio: davinci: Add support for system suspend/resume PM") >> Cc: Devarsh Thakkar <devarsht@ti.com> >> Signed-off-by: Dhruva Gole <d-gole@ti.com> > > Looks like the right solution to me. > I'm a bit surprised given how long we have had this driver. > I suppose people have used out-of-tree patches for suspend/resume. :( > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Keerthy <j-keerthy@ti.com> > > Yours, > Linus Walleij
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 7fc83057990a..d7595b39e8c4 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -639,9 +639,6 @@ static void davinci_gpio_save_context(struct davinci_gpio_controller *chips, context->set_falling = readl_relaxed(&g->set_falling); } - /* Clear Bank interrupt enable bit */ - writel_relaxed(0, base + BINTEN); - /* Clear all interrupt status registers */ writel_relaxed(GENMASK(31, 0), &g->intstat); }
The interrupt enable bits might be set if we want to use the GPIO as wakeup source. Clearing this will mean disabling of interrupts in the GPIO banks that we may want to wakeup from. Thus remove the line that was clearing this bit from the driver's save context function. Fixes: 0651a730924b ("gpio: davinci: Add support for system suspend/resume PM") Cc: Devarsh Thakkar <devarsht@ti.com> Signed-off-by: Dhruva Gole <d-gole@ti.com> --- drivers/gpio/gpio-davinci.c | 3 --- 1 file changed, 3 deletions(-)