devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yao Zi <ziyao@disroot.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, loongarch@lists.linux.dev,
	Mingcong Bai <jeffbai@aosc.io>,
	Kexy Biscuit <kexybiscuit@aosc.io>
Subject: Re: [PATCH 2/3] pinctrl: ls2k0300: Support Loongson 2K0300 SoC
Date: Thu, 14 Aug 2025 03:15:45 +0000	[thread overview]
Message-ID: <aJ1U4RdkyCy4bxyd@pie> (raw)
In-Reply-To: <20250811163749.47028-4-ziyao@disroot.org>

On Mon, Aug 11, 2025 at 04:37:49PM +0000, Yao Zi wrote:
> Support pin multiplexing and drive-strength setting for Loongson 2K0300
> SoC. Pin multiplexing could be done separately for each pin, while
> drive-strength could be only configured on function basis. This differs
> a lot from the driver for previous generation of Loongson SoC, where
> pinmux setting is based on group.
> 
> Pins are represented with pinmux properties in devicetrees, and we use
> the generic pinmux API for parsing. The common pinconf interface isn't
> used for drive-strength setting, since it handles pinconf settings at a
> unit of pin groups or smaller.
> 
> Instead, the driver configures drive-strength settings just after
> parsing the devicetree. The devicetree's structure ensures no conflicts
> could happen in drive-strength settings.
> 
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
>  MAINTAINERS                        |   1 +
>  drivers/pinctrl/Kconfig            |  14 +
>  drivers/pinctrl/Makefile           |   1 +
>  drivers/pinctrl/pinctrl-ls2k0300.c | 515 +++++++++++++++++++++++++++++
>  4 files changed, 531 insertions(+)
>  create mode 100644 drivers/pinctrl/pinctrl-ls2k0300.c

...

> diff --git a/drivers/pinctrl/pinctrl-ls2k0300.c b/drivers/pinctrl/pinctrl-ls2k0300.c
> new file mode 100644
> index 000000000000..11d448ba333d
> --- /dev/null
> +++ b/drivers/pinctrl/pinctrl-ls2k0300.c

...

> +static const struct pinmux_ops ls2k0300_pmux_ops = {
> +	.get_functions_count	= ls2k0300_pinmux_get_functions_count,
> +	.get_function_name	= ls2k0300_pinmux_get_function_name,
> +	.get_function_groups	= ls2k0300_pinmux_get_function_groups,
> +	.set_mux		= ls2k0300_pinmux_set_mux,
> +};

I forgot to enable strict mode for the pinmux operations. Will correct
this in v2. I'll wait a few days for more comments before sending it,
thanks for your time.

Best regards,
Yao Zi

  reply	other threads:[~2025-08-14  3:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 16:37 [PATCH 0/3] Support pinctrl for Loongson 2K0300 SoC Yao Zi
2025-08-11 16:37 ` [PATCH 1/3] dt-binding: pinctrl: Document Loongson 2K0300 pin controller Yao Zi
2025-08-18 17:58   ` Rob Herring
2025-08-19 11:37     ` Yao Zi
2025-09-12  8:42       ` Yao Zi
2025-10-10 22:05       ` Rob Herring
2025-10-13 22:48   ` Linus Walleij
2025-10-14  2:23     ` Yao Zi
2025-10-14 10:38       ` Linus Walleij
2025-08-11 16:37 ` [PATCH 2/3] pinctrl: ls2k0300: Support Loongson 2K0300 SoC Yao Zi
2025-08-14  3:15   ` Yao Zi [this message]
2025-08-19 10:02   ` Linus Walleij
2025-08-19 12:40     ` Yao Zi
2025-08-21 11:27       ` Linus Walleij
2025-08-11 16:37 ` [PATCH 3/3] LoongArch: dts: Add pinctrl configuration for Loongson 2K0300 Yao Zi

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=aJ1U4RdkyCy4bxyd@pie \
    --to=ziyao@disroot.org \
    --cc=chenhuacai@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jeffbai@aosc.io \
    --cc=kernel@xen0n.name \
    --cc=kexybiscuit@aosc.io \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=robh@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
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).