All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Lei Xue <lei.xue@mediatek.com>
Cc: Sean Wang <sean.wang@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	yong.mao@mediatek.com, qingliang.li@mediatek.com,
	Fred-WY.Chen@mediatek.com, ot_cathy.xu@mediatek.com,
	ot_shunxi.zhang@mediatek.com, ot_yaoy.wang@mediatek.com,
	ot_ye.wang@mediatek.com
Subject: Re: [PATCH 1/3] pinctrl: mediatek: Add gpio-range record in pinctrl driver
Date: Wed, 26 Nov 2025 19:06:47 +0100	[thread overview]
Message-ID: <aSdBt937C6Cjj_8s@black.igk.intel.com> (raw)
In-Reply-To: <20251125023639.2416546-2-lei.xue@mediatek.com>

On Tue, Nov 25, 2025 at 10:36:34AM +0800, Lei Xue wrote:
> Kernel GPIO subsystem mapping hardware pin number to a different
> range of gpio number. Add gpio-range structure to hold
> the mapped gpio range in pinctrl driver. That enables the kernel
> to search a range of mapped gpio range against a pinctrl device.

...

>  static int mtk_build_gpiochip(struct mtk_pinctrl *hw)
>  {
>  	struct gpio_chip *chip = &hw->chip;

>  	if (ret < 0)
>  		return ret;
>  
> +	mtk_pinctrl_gpio_range_init(hw, chip);
> +
>  	return 0;

We have a callback for that in struct gpio_chip. Any reason not to use it?

>  }

...

> +	pinctrl_add_gpio_range(hw->pctrl, &hw->range);

Not sure if this is needed.

-- 
With Best Regards,
Andy Shevchenko




  reply	other threads:[~2025-11-26 18:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25  2:36 [PATCH 0/3] Add pinctrl and GPIO support for MediaTek MT8901 Lei Xue
2025-11-25  2:36 ` [PATCH 1/3] pinctrl: mediatek: Add gpio-range record in pinctrl driver Lei Xue
2025-11-26 18:06   ` Andy Shevchenko [this message]
2026-03-26 12:33     ` Fred-WY Chen (陳威宇)
2026-03-27 13:33       ` Deep Pani
2026-04-17  6:02         ` Deep Pani
2026-04-17  6:36           ` andriy.shevchenko
2026-04-17  6:35         ` andriy.shevchenko
2025-11-25  2:36 ` [PATCH 2/3] pinctrl: mediatek: Add acpi support Lei Xue
2025-11-26  9:10   ` Linus Walleij
2025-11-26 16:52     ` Lorenzo Pieralisi
2025-11-26 18:06       ` Andy Shevchenko
2025-11-27 10:06         ` Lorenzo Pieralisi
2025-11-27 14:29           ` Andy Shevchenko
2025-11-27 15:53             ` Lorenzo Pieralisi
2026-04-17  6:26               ` Andy Shevchenko
2026-04-23  9:08                 ` Lorenzo Pieralisi
2025-11-25  2:36 ` [PATCH 3/3] pinctrl: mediatek: mt8901: Add pinctrl driver for MT8901 Lei Xue
2025-11-25  9:56   ` AngeloGioacchino Del Regno
2026-03-26 12:36     ` Fred-WY Chen (陳威宇)
2026-03-27 13:41       ` Deep Pani
2026-04-17  6:04         ` Deep Pani

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=aSdBt937C6Cjj_8s@black.igk.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=Fred-WY.Chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=lei.xue@mediatek.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=ot_cathy.xu@mediatek.com \
    --cc=ot_shunxi.zhang@mediatek.com \
    --cc=ot_yaoy.wang@mediatek.com \
    --cc=ot_ye.wang@mediatek.com \
    --cc=qingliang.li@mediatek.com \
    --cc=sean.wang@kernel.org \
    --cc=yong.mao@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.