lkml.org 
[lkml]   [2020]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/2] gpio: max77620: Initialize interrupts state
From
Date
08.07.2020 19:58, Andy Shevchenko пишет:
> 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

Thanks!

>> 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 ;-)

Alright, I'll try to switch it to use the GPIO IRQ chip struct in v3!

> ...
>
>> #ifdef CONFIG_OF_GPIO
>> mgpio->gpio_chip.of_node = pdev->dev.parent->of_node;
>> #endif
>
> This seems to be done by GPIO library.

Indeed!

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

Good catch!

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