Messages in this thread | | | From | Andy Shevchenko <> | Date | Wed, 8 Jul 2020 11:51:06 +0300 | Subject | Re: [PATCH v1 1/5] gpio: max77620: Initialize interrupts state |
| |
On Wed, Jul 8, 2020 at 11:29 AM Dmitry Osipenko <digetx@gmail.com> wrote: > > I noticed on Nexus 7 that after rebooting from downstream kernel to > upstream, the GPIO interrupt is triggering non-stop despite of interrupts > being disabled for all of GPIOs. This happens because Nexus 7 uses a > soft-reboot, meaning that bootloader should take care of resetting > hardware, but bootloader doesn't do it well. In a result, GPIO interrupt > may be left ON at a boot time. Let's mask all GPIO interrupts at the > driver's probe time in order to resolve the issue.
...
> + err = regmap_update_bits(mgpio->rmap, GPIO_REG_ADDR(i), > + MAX77620_CNFG_GPIO_INT_MASK, 0); > + if (err < 0)
Does ' < 0' meaningful here?
> + dev_err(mgpio->dev, "failed to disable interrupt: %d\n", > + err);
One line.
...
> + max77620_gpio_initialize(mgpio);
I guess we have special callback for that, i.e. https://elixir.bootlin.com/linux/v5.8-rc3/C/ident/init_hw.
-- With Best Regards, Andy Shevchenko
| |