linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Lukas Wunner <lukas@wunner.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	Nicolas Saenz Julienne <nsaenz@kernel.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	linux-gpio@vger.kernel.org,
	Lino Sanfilippo <LinoSanfilippo@gmx.de>,
	Philipp Rosenberger <p.rosenberger@kunbus.com>,
	linux-rpi-kernel@lists.infradead.org
Subject: Re: [PATCH] pinctrl: bcm2835: Use bcm2835 gpio_chip label for bcm2711
Date: Tue, 15 Feb 2022 13:00:47 +0100	[thread overview]
Message-ID: <c1e31ad4-3a65-9370-3a5c-ffde723a04aa@i2se.com> (raw)
In-Reply-To: <c399da9deab3ede9b0c4d4680d8ac508707aa8c3.1644903104.git.lukas@wunner.de>

Hi Lukas,

Am 15.02.22 um 06:52 schrieb Lukas Wunner:
> Commit b1d84a3d0a26 ("pinctrl: bcm2835: Add support for all GPIOs on
> BCM2711") used a different label for the bcm2711 gpio_chip vis-à-vis
> the bcm2835.
>
> That breaks compatibility for GPIO_LOOKUP_IDX() and GPIO_HOG() clauses
> when porting from older Raspberry Pi Compute Modules to the CM4 or CM4S.

i've some questions:

could you explain the breakage more in detail, is it kernel or user space?

A little bit off topic, but what is this CM4S? Is it special version of
the CM4? Can you provide a link or something?

>
> The name change seems unwarranted given it's essentially the same
> hardware, so use the old name instead.

I disagree at this point. The pinctrl of bcm2835 and bcm2711 are
different. For example the bcm2835 has only 54 GPIOs while the bcm2711
has 58.

Best regards

>
> For consistency, modify the pinctrl_desc and pinctrl_gpio_range names
> as well.  (It looks like they're only used by debugfs.)
>
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> Cc: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  drivers/pinctrl/bcm/pinctrl-bcm2835.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 47e433e09c5c..41d0f32b9d66 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -375,7 +375,7 @@ static const struct gpio_chip bcm2835_gpio_chip = {
>  };
>  
>  static const struct gpio_chip bcm2711_gpio_chip = {
> -	.label = "pinctrl-bcm2711",
> +	.label = MODULE_NAME,
>  	.owner = THIS_MODULE,
>  	.request = gpiochip_generic_request,
>  	.free = gpiochip_generic_free,
> @@ -1134,7 +1134,7 @@ static const struct pinctrl_desc bcm2835_pinctrl_desc = {
>  };
>  
>  static const struct pinctrl_desc bcm2711_pinctrl_desc = {
> -	.name = "pinctrl-bcm2711",
> +	.name = MODULE_NAME,
>  	.pins = bcm2835_gpio_pins,
>  	.npins = BCM2711_NUM_GPIOS,
>  	.pctlops = &bcm2835_pctl_ops,
> @@ -1149,7 +1149,7 @@ static const struct pinctrl_gpio_range bcm2835_pinctrl_gpio_range = {
>  };
>  
>  static const struct pinctrl_gpio_range bcm2711_pinctrl_gpio_range = {
> -	.name = "pinctrl-bcm2711",
> +	.name = MODULE_NAME,
>  	.npins = BCM2711_NUM_GPIOS,
>  };
>  


  reply	other threads:[~2022-02-15 12:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15  5:52 [PATCH] pinctrl: bcm2835: Use bcm2835 gpio_chip label for bcm2711 Lukas Wunner
2022-02-15 12:00 ` Stefan Wahren [this message]
2022-02-15 14:44   ` Lukas Wunner
2022-02-15 16:56     ` Stefan Wahren
2022-02-15 17:17       ` Florian Fainelli
2022-02-16 10:05         ` Lukas Wunner

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=c1e31ad4-3a65-9370-3a5c-ffde723a04aa@i2se.com \
    --to=stefan.wahren@i2se.com \
    --cc=LinoSanfilippo@gmx.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=lukas@wunner.de \
    --cc=nsaenz@kernel.org \
    --cc=p.rosenberger@kunbus.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.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 NNTP newsgroup(s).