All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Karthik S" <karthik.s@oss.qualcomm.com>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 2/3] pinctrl: qcom: Add qcs615 lpass lpi pinctrl driver
Date: Tue, 17 Nov 2026 08:11:48 +0000	[thread overview]
Message-ID: <sashiko-outbox-218397@kernel.org> (raw)
In-Reply-To: <20261117075100.272535-3-karthik.s@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] pinctrl: qcom: missing LPI_FUNCTION(gpio) in qcs615_functions
- [Low] pinctrl: qcom: i2s2 functions in qcs615_functions mismatch DT
  binding
--

commit 90c734ca8b12506dd8f24f8affa76e931746bc81
Author: Karthik S <karthik.s@oss.qualcomm.com>

pinctrl: qcom: Add qcs615 lpass lpi pinctrl driver

This commit adds the LPASS LPI pinctrl driver for the Qualcomm QCS615
platform.

> diff --git a/drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c
> new file mode 100644
> index 0000000000000..0da85f69d9b04
> --- /dev/null
> +++ b/drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c
> @@ -0,0 +1,161 @@

[ ... ]

> +enum lpass_lpi_functions {
> +	LPI_MUX_i2s1_clk,
> +	LPI_MUX_i2s1_ws,
> +	LPI_MUX_i2s1_data,
> +	LPI_MUX_spkr_i2s_mclk_a,
> +	LPI_MUX_i2s2_clk,
> +	LPI_MUX_i2s2_ws,
> +	LPI_MUX_i2s2_data,
> +	LPI_MUX_dmic1_clk,
> +	LPI_MUX_dmic1_data,
> +	LPI_MUX_dmic2_clk,
> +	LPI_MUX_dmic2_data,
> +	LPI_MUX_gpio,
> +	LPI_MUX__,
> +};

[ ... ]

> +static const char * const i2s1_clk_groups[] = { "gpio8" };
> +static const char * const i2s1_ws_groups[] = { "gpio9" };
> +static const char * const i2s1_data_groups[] = { "gpio10", "gpio11" };
> +static const char * const spkr_i2s_mclk_a_groups[] = { "gpio19" };
> +static const char * const i2s2_clk_groups[] = { "gpio23" };
> +static const char * const i2s2_ws_groups[] = { "gpio24" };
> +static const char * const i2s2_data_groups[] = { "gpio25", "gpio26", "gpio27", "gpio28" };
> +static const char * const dmic1_clk_groups[] = { "gpio26" };
> +static const char * const dmic1_data_groups[] = { "gpio27" };
> +static const char * const dmic2_clk_groups[] = { "gpio28" };
> +static const char * const dmic2_data_groups[] = { "gpio29" };
> +
> +static const struct lpi_pingroup qcs615_groups[] = {
> +	LPI_PINGROUP(0,  LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(1,  LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(2,  LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(3,  LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(4,  LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(5,  LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(6,  LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(7,  LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(8,  LPI_NO_SLEW, _, _, i2s1_clk, _),
> +	LPI_PINGROUP(9,  LPI_NO_SLEW, _, _, i2s1_ws, _),
> +	LPI_PINGROUP(10, LPI_NO_SLEW, _, _, _, i2s1_data),
> +	LPI_PINGROUP(11, LPI_NO_SLEW, _, i2s1_data, _, _),
> +	LPI_PINGROUP(12, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(13, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(14, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(15, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(16, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(17, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(18, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(19, LPI_NO_SLEW, spkr_i2s_mclk_a, _, _, _),
> +	LPI_PINGROUP(20, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(21, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(22, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(23, LPI_NO_SLEW, _, _, i2s2_clk, _),
> +	LPI_PINGROUP(24, LPI_NO_SLEW, i2s2_ws, _, _, _),
> +	LPI_PINGROUP(25, LPI_NO_SLEW, i2s2_data, _, _, _),
> +	LPI_PINGROUP(26, LPI_NO_SLEW, dmic1_clk, i2s2_data, _, _),
> +	LPI_PINGROUP(27, LPI_NO_SLEW, dmic1_data, i2s2_data, _, _),
> +	LPI_PINGROUP(28, LPI_NO_SLEW, dmic2_clk, i2s2_data, _, _),
> +	LPI_PINGROUP(29, LPI_NO_SLEW, dmic2_data, _, _, _),
> +	LPI_PINGROUP(30, LPI_NO_SLEW, _, _, _, _),
> +	LPI_PINGROUP(31, LPI_NO_SLEW, _, _, _, _),
> +};

[Severity: Low]
Are i2s2_clk, i2s2_ws and i2s2_data valid functions on QCS615 LPASS LPI?

The driver exposes them on gpio23 through gpio28 and in qcs615_functions[],
but Documentation/devicetree/bindings/pinctrl/qcom,qcs615-lpass-lpi-pinctrl.yaml
only allows dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, gpio, i2s1_clk,
i2s1_data, i2s1_ws and spkr_i2s_mclk_a, so any Device Tree node using i2s2
will fail dtbs_check.

> +
> +static const struct lpi_function qcs615_functions[] = {
> +	LPI_FUNCTION(i2s1_clk),
> +	LPI_FUNCTION(i2s1_ws),
> +	LPI_FUNCTION(i2s1_data),
> +	LPI_FUNCTION(spkr_i2s_mclk_a),
> +	LPI_FUNCTION(i2s2_clk),
> +	LPI_FUNCTION(i2s2_ws),
> +	LPI_FUNCTION(i2s2_data),
> +	LPI_FUNCTION(dmic1_clk),
> +	LPI_FUNCTION(dmic1_data),
> +	LPI_FUNCTION(dmic2_clk),
> +	LPI_FUNCTION(dmic2_data),
> +};

[Severity: Medium]
Should qcs615_functions[] also include LPI_FUNCTION(gpio) with a matching
gpio_groups[] array?

LPI_MUX_gpio is defined in enum lpass_lpi_functions and placed in .funcs[0]
by LPI_PINGROUP() for all 32 pins (21 of which have no other function), and
the DT binding permits function = "gpio".  Without LPI_FUNCTION(gpio) in
qcs615_functions[], pinmux_func_name_to_selector() rejects function = "gpio"
with -EINVAL, and lpi_gpio_set_mux() can never select GPIO_FUNC because
lpi_gpio_pinmux_ops does not implement .gpio_request_enable.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117075100.272535-1-karthik.s@oss.qualcomm.com?part=2

  reply	other threads:[~2026-11-17  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  7:50 [PATCH v2 0/3] pinctrl: qcom: Add QCS615 LPASS LPI pinctrl support Karthik S
2026-11-17  7:50 ` [PATCH v2 1/3] dt-bindings: pinctrl: qcom: Add QCS615 LPASS LPI pinctrl bindings Karthik S
2026-11-17 10:21   ` Krzysztof Kozlowski
2026-11-17  7:50 ` [PATCH v2 2/3] pinctrl: qcom: Add qcs615 lpass lpi pinctrl driver Karthik S
2026-11-17  8:11   ` sashiko-bot [this message]
2026-11-17 10:14   ` Krzysztof Kozlowski
2026-11-17  7:51 ` [PATCH v2 3/3] arm64: defconfig: Enable QCS615 LPASS LPI pinctrl Karthik S
2026-11-17 10:16   ` Krzysztof Kozlowski

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=sashiko-outbox-218397@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=karthik.s@oss.qualcomm.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.