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: <X9pwML9OLalPI0O4@builder.lan>
Date:   Wed, 16 Dec 2020 14:38:08 -0600
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Drew Fustini <drew@...gleboard.org>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH] gpiolib: Allow name duplicates of "" and "NC"

On Wed 16 Dec 13:53 CST 2020, Drew Fustini wrote:

> On Tue, Dec 15, 2020 at 09:03:08AM -0800, Bjorn Andersson wrote:
> > Not all GPIO pins are exposed to the world and this is typically
> > described by not giving these lines particular names, commonly "" or
> > "NC".
> > 
> > With the recent introduction of '2cd64ae98f35 ("gpiolib: Disallow
> > identical line names in the same chip")' any gpiochip with multiple such
> > pins will refuse to probe.
> > 
> > Fix this by treating "" and "NC" as "no name specified" in
> > gpio_name_to_desc()
> > 
> > Fixes: 2cd64ae98f35 ("gpiolib: Disallow identical line names in the same chip")
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> > ---
> > 
> > The introduction of 2cd64ae98f35 breaks pretty much all Qualcomm boards and
> > grepping the DT tree indicates that other vendors will have the same problem.
> > 
> > In addition to this the am335x-* boards will also needs "[NC]", "[ethernet]",
> > "[emmc"], "[i2c0]", "[SYSBOOT]" and "[JTAG]" added to this list to allow
> > booting v5.11 with the past and present dtb/dts files.
> 
> I am the one who added the gpio line names to the am335x dts board
> files, and I am happy to change them if it will make unique line name
> logic simpler.
> 
> I used the notation of "[<non-gpio-functionality>]" to make it easy for
> the user to realize that the corresponding gpiolines could not be used
> on these boards (BeagleBone and PocketBeagle) for actual GPIO.  I used
> generic names like "[ethernet]" because I didn't think it made sense
> to confuse the user by using the precise name of the non-gpio function
> (such as "[gmii1_rxd0]").  I could post a patch for the dts files that
> restores unique names for "[ethernet]", "[emmc"], "[i2c0]",
> "[SYSBOOT]" and "[JTAG]".
> 
> As for "[NC]", the BGA balls corresponding to these gpio lines are
> simply not connected to any circuits on the board.  I happy to change
> that to whatever name people prefer for a non-connected pin ("", "NC",
> etc).
> 

I think this is the right thing to do, but we can't have gpiolib refuse
to probe existing DTBs - at least not until some grace period has
expired.

Regards,
Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ