Linux-GPIO Archive on lore.kernel.org
 help / color / Atom feed
From: Drew Fustini <drew@beagleboard.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] gpiolib: Allow name duplicates of "" and "NC"
Date: Wed, 16 Dec 2020 11:53:57 -0800
Message-ID: <20201216195357.GA2583366@x1> (raw)
In-Reply-To: <20201215170308.2037624-1-bjorn.andersson@linaro.org>

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@linaro.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).

Thanks,
Drew



  parent reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 17:03 Bjorn Andersson
2020-12-15 17:42 ` Bartosz Golaszewski
2020-12-15 17:59   ` Bjorn Andersson
2020-12-16 12:46 ` Linus Walleij
2020-12-16 18:40   ` Bjorn Andersson
2020-12-16 20:50     ` Linus Walleij
2020-12-16 19:53 ` Drew Fustini [this message]
2020-12-16 20:38   ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201216195357.GA2583366@x1 \
    --to=drew@beagleboard.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-GPIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-gpio/0 linux-gpio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-gpio linux-gpio/ https://lore.kernel.org/linux-gpio \
		linux-gpio@vger.kernel.org
	public-inbox-index linux-gpio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-gpio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git