linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-tegra@vger.kernel.org,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] gpio: max77620: Initialize interrupts state
Date: Wed, 8 Jul 2020 20:35:54 +0300	[thread overview]
Message-ID: <2f61f759-81fc-c429-8181-508368c4f091@gmail.com> (raw)
In-Reply-To: <CAHp75VcFG3oK7C8Y7RZKoEvwPo9+hKMMucnDhtpqLDmLGoPmJw@mail.gmail.com>

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!

  reply	other threads:[~2020-07-08 17:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 15:58 [PATCH v2 0/2] Improvements for MAX77620 GPIO driver Dmitry Osipenko
2020-07-08 15:58 ` [PATCH v2 1/2] gpio: max77620: Initialize interrupts state Dmitry Osipenko
2020-07-08 16:58   ` Andy Shevchenko
2020-07-08 17:35     ` Dmitry Osipenko [this message]
2020-07-08 15:58 ` [PATCH v2 2/2] gpio: max77620: Replace 8 with MAX77620_GPIO_NR Dmitry Osipenko
2020-07-08 16:45   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f61f759-81fc-c429-8181-508368c4f091@gmail.com \
    --to=digetx@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).