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: <a98ea2bd-cf6c-1ff6-8333-9056931924f2@axentia.se>
Date:   Wed, 8 Dec 2021 17:09:01 +0100
From:   Peter Rosin <peda@...ntia.se>
To:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Ludovic Desroches <ludovic.desroches@...rochip.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: at91: allow use of of gpio-line-names property

On 2021-12-08 13:33, Alexander Dahl wrote:
> Hello Peter,
> 
> Am Tue, Dec 07, 2021 at 12:32:03AM +0100 schrieb Peter Rosin:
>> If no line name is given (by not having a gpio-line-names property,
>> or by having empty "" strings for some lines), fall back to the
>> existing pioC12-style line name scheme.
>>
>> It is useful to be able to explicitly name lines from the schematics
>> or its function, rather than having the MCU names forced upon every
>> user.
> 
> +1 from me. 
> 
> I asked about this some months ago, but I saw no clear
> direction in the discussion. So for reference:
> 
> https://lore.kernel.org/linux-gpio/946021874.11132.1615900079722@seven.thorsis.com/
> 
> HTH & Greets
> Alex

Hi!

The last thing that was said was this, and it was left uncontended.

On 2021-03-20 12:20, Linus Walleij wrote:
> I don't think it's a big deal to change these names.

So, let's focus on that! :-)

It does indeed simplify and clarify userspace to request gpio lines
through some kind of abstraction. It makes it so much easier to
manage userspace across different generations of hardware, where
the HW designers for various reasons move things around. I guess
that makes me guilty of treating the dtb names as ABI (on other
boards), but the take-away is that it is so useful that I even
bothered to write a patch for the boards we are using but where
that scheme did not work.

Sure, I could NIH this abstraction and implement something on my
own, but it does seems like a waste to not make good use of the
gpio-lines-names information.

To me, it seems the risk is low that someone has both added
non-working gpio-line-names properties to gpio controller nodes, and
are then depending on the pioC12 style names. But then again, maybe
I'm just naïve.

Cheers,
Peter

>> Signed-off-by: Peter Rosin <peda@...ntia.se>
>> ---
>>  drivers/pinctrl/pinctrl-at91.c | 13 ++++++++++---
>>  1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> I don't know if it's sane to fall back to the pioC12-style on empty
>> strings, or if someone adding a gpio-line-names property should be
>> responsible for filling in those names "by hand". I generally don't
>> care what "unused" pins are named, so either is fine by me...
>>
>> Cheers,
>> Peter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ