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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 4 Mar 2021 17:28:01 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Álvaro Fernández Rojas <noltari@...il.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Michael Walle <michael@...le.cc>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        bcm-kernel-feedback-list <bcm-kernel-feedback-list@...adcom.com>,
        Jonas Gorski <jonas.gorski@...il.com>,
        Necip Fazil Yildiran <fazilyildiran@...il.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v4 02/15] gpio: regmap: set gpio_chip of_node

On Thu, Mar 4, 2021 at 5:24 PM Álvaro Fernández Rojas <noltari@...il.com> wrote:
> > El 4 mar 2021, a las 16:17, Andy Shevchenko <andy.shevchenko@...il.com> escribió:
> > On Thu, Mar 4, 2021 at 5:06 PM Álvaro Fernández Rojas <noltari@...il.com> wrote:
> >>> El 4 mar 2021, a las 11:35, Andy Shevchenko <andy.shevchenko@...il.com> escribió:
> >>> On Thu, Mar 4, 2021 at 10:57 AM Álvaro Fernández Rojas
> >>> <noltari@...il.com> wrote:
> >
> >>>> + * @of_node:           (Optional) The device node
> >>>
> >>>> +       struct device_node *of_node;
> >>>
> >>> Can we use fwnode from day 1, please?
> >>
> >> Could you explain this? I haven’t dealt with fwnode never :$
> >> BTW, this is done to fix this check when parsing gpio ranges:
> >> https://github.com/torvalds/linux/blob/f69d02e37a85645aa90d18cacfff36dba370f797/drivers/gpio/gpiolib-of.c#L933-L934
> >
> > Use struct fwnode_handle pointer instead of OF-specific one.
>
> But is that compatible with the current gpiolib-of code? :$

Yes (after a bit of amendment I have sent today as v2:
https://lore.kernel.org/linux-gpio/20210304150215.80652-1-andriy.shevchenko@linux.intel.com/T/#u).

> > Also here is the question, why do you need to have that field in the
> > regmap config structure and can't simply use the parent's fwnode?
> > Also I'm puzzled why it's not working w/o this patch: GPIO library
> > effectively assigns parent's fwnode (okay, of_node right now).
>
> Because gpio regmap a child node of the pin controller, which is the one probed (gpio regmap is probed from the pin controller).
> Therefore the parent’s fwnode is useless, since the correct gpio_chip node is the child's one (we have pin-ranges declared in the child node, referencing the parent pinctrl node).

I see. Can you point me out to the code where we get the node and
where it's being retrieved / filled?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ