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]
Message-ID: <CAMhs-H_pomsvKXuerkVsNQva+B+tPr2xRZAU2R7oyjZ+GaQpqQ@mail.gmail.com>
Date:   Fri, 2 Jul 2021 13:30:59 +0200
From:   Sergio Paracuellos <sergio.paracuellos@...il.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        John Thomson <git@...nthomson.fastmail.com.au>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        NeilBrown <neil@...wn.name>,
        René van Dorst <opensource@...rst.com>,
        Nicholas Mc Guire <hofrat@...dl.org>
Subject: Re: [PATCH v2] gpio: mt7621: support gpio-line-names property

Hi Linus,

On Fri, Jul 2, 2021 at 12:18 PM Linus Walleij <linus.walleij@...aro.org> wrote:
>
> On Fri, Jul 2, 2021 at 11:40 AM Sergio Paracuellos
> <sergio.paracuellos@...il.com> wrote:
> > On Fri, Jul 2, 2021 at 11:27 AM Andy Shevchenko
> > <andy.shevchenko@...il.com> wrote:
>
> > > > There are no child nodes, all the stuff is in the same parent node
> > > > and, as I said, belongs to the same device but internally uses three
> > > > gpiochips.
> > >
> > > And it can't be split into three children in the overlay?
> >
> > Original code before this being mainlined was using three children and
> > I was told in the review that three children were not allowed:
> >
> > See https://patchwork.ozlabs.org/project/linux-gpio/patch/1527924610-13135-3-git-send-email-sergio.paracuellos@gmail.com/#1932827
>
> Yeah this is one of those unfortunate cases where the DT representation
> (or ACPI for that matter) of the device and the Linux internal representation
> differs.
>
> > > Let's assume it can't, then the GPIO library function should be
> > > refactored in a way that it takes parameters like base index for the
> > > names and tries to satisfy the caller.
> >
> > Bartosz, Linus, any thoughts on this?
>
> This would be ideal, is there a reasonably simple way to get to this helper?
>
> In gpiolib.c devprop_gpiochip_set_names() need to be refactored to
> take a base number, devprop_gpiochip_set_names_base() that
> function exposed in <linux/gpio/driver.h> and then the old function
> devprop_gpiochip_set_names() wrapped in the new
> one so all old users continue to work without modification.
> Sprinkle some kerneldoc on top so we do not make mistakes
> in the future.
>
> This should work I think.
>
> Any similar drivers (several gpio_chip per FW node) that want to
> set line names need to do the same thing.

Thanks for the advices. I'll try to make a bit of time to try to
handle this in the way you are pointing out here.

Best regards,
    Sergio Paracuellos

>
> Sorry that you ran into this, I hate it when I'm first at hairy stuff
> like this.
>
> Yours,
> Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ