lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 9 Jul 2020 12:07:44 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Dmitry Osipenko <digetx@...il.com>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Laxman Dewangan <ldewangan@...dia.com>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 3/6] gpio: max77620: Don't set of_node

On Thu, Jul 9, 2020 at 12:44 AM Dmitry Osipenko <digetx@...il.com> wrote:
> 08.07.2020 23:57, Andy Shevchenko пишет:
> > On Wednesday, July 8, 2020, Dmitry Osipenko <digetx@...il.com
> > <mailto:digetx@...il.com>> wrote:

...

> > I gave a second look and I think my suggestion is wrong. Here is an
> > interesting propagation of the parent device node to its grand son,
> > leaving son’s one untouched. Original code has intentions to do that way.
>
> The [1] says that gpio_chip.parent should point at the "device providing
> the GPIOs".

Yes, physical device I believe.

> That's the pdev->dev.parent in the case of this driver.
> MAX77620 is an MFD PMIC device that has virtual sub-devices like GPIO
> controller, PINCTRL and RTC. The MFD is the parent device that provides
> the GPIOs [2].
>
> [1]
> https://elixir.bootlin.com/linux/v5.8-rc3/source/include/linux/gpio/driver.h#L276
>
> [2]
> https://elixir.bootlin.com/linux/v5.8-rc3/source/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi#L48
>
> I think the old code was wrong and this patch is correct, please correct
> me if I'm missing something.

Hmm... I have checked through GPIO drivers I have knowledge of / care
about and PMIC ones do like you suggested in this patch, the rest
(which are instantiated from MFD) take a virtual platform device.

Looking at DT excerpt I think you're rather right than wrong, so I
leave it to you and maintainers.
Thanks!

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ