lkml.org 
[lkml]   [2020]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 1/2] gpio: max77620: Initialize interrupts state
On Wed, Jul 8, 2020 at 6:58 PM 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

despite 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

but the bootloader

As a result

> may be left ON at a boot time. Let's mask all GPIO interrupts at the
> driver's initialization time in order to resolve the issue.

...

> mgpio->gpio_chip.ngpio = MAX77620_GPIO_NR;
> mgpio->gpio_chip.can_sleep = 1;
> mgpio->gpio_chip.base = -1;
> + mgpio->gpio_chip.irq.init_hw = max77620_gpio_irq_init_hw,

Now this seems a bit awkward. Perhaps you need first to switch to use
GPIO IRQ chip structure?
It's also in the TODO of the GPIO subsystem ;-)

...

> #ifdef CONFIG_OF_GPIO
> mgpio->gpio_chip.of_node = pdev->dev.parent->of_node;
> #endif

This seems to be done by GPIO library.

Also point to improve: don't shadow error from platform_get_irq().

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-07-08 18:59    [W:0.057 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site