Linux-GPIO Archive mirror
 help / color / mirror / Atom feed
From: Phil Elwell <phil@raspberrypi.com>
To: Florian Fainelli <florian.fainelli@broadcom.com>,
	Doug Berger <opendmb@gmail.com>,
	 linux-gpio@vger.kernel.org
Subject: Advice on using gpio-brcmstb with gpio-ranges
Date: Thu, 18 Apr 2024 12:36:52 +0100	[thread overview]
Message-ID: <CAMEGJJ3y_A1vtTV1x8836+AMOHs6NnWx_EsLTJMgaR5Fb9fgtQ@mail.gmail.com> (raw)

Hello,

I'm having difficulty using the gpio-brcmstb driver with the
gpio-ranges property. gpio-brcmstb allows multiple banks of up to 32
GPIO lines to be declared using a single DT node. However, if you do
that, any declared gpio-ranges get applied to all banks without any
kind of filtering or adjustment. This is because the gpio-brcmstb
makes use of gpio-mmio, which requires one gpio_chip per bank. These
gpio_chips have the same DT node, hence the same ranges, but are
unaware that only a subset applies to them.

The GPIO<->pinctrl mapping can be configured in driver code, but this
is deprecated (as is forcing global GPIO base numbers to start at
zero, but the driver does it anyway).

What is the best way forward? Does one have to say that in
gpio-brcmstb, gpio-ranges and multiple banks are mutually
incompatible?

Thanks,

Phil

             reply	other threads:[~2024-04-18 11:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 11:36 Phil Elwell [this message]
2024-04-19  3:59 ` Advice on using gpio-brcmstb with gpio-ranges Florian Fainelli
2024-04-19  8:36   ` Phil Elwell

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=CAMEGJJ3y_A1vtTV1x8836+AMOHs6NnWx_EsLTJMgaR5Fb9fgtQ@mail.gmail.com \
    --to=phil@raspberrypi.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=opendmb@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).