Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2] arm64: dts: qcom: sda660-inforce-ifc6560: fix ADV7535 interrupt pin
Date: Mon, 19 Oct 2026 15:33:18 +0000	[thread overview]
Message-ID: <sashiko-outbox-177755@kernel.org> (raw)
In-Reply-To: <20261019-ifc6560-adv-v2-1-ade625df3fe3@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: qcom: missing output-disable in adv7533_int_default
--

commit 18e53f95f5fe825b6b2171c0f9241c69a999af55
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

arm64: dts: qcom: sda660-inforce-ifc6560: fix ADV7535 interrupt pin

This commit adds a default pinctrl state for the ADV7535 HDMI bridge on the
Inforce IFC6560 board to configure PM660L GPIO11 as a digital input with
internal bias disabled.

> diff --git a/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts b/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts
> index 9e14f53b552eb..10b454cc4218a 100644
> --- a/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts
> +++ b/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts

[ ... ]

> @@ -285,6 +288,16 @@ sw_ctrl_default: sw-ctrl-default-state {
>  	};
>  };
>  
> +&pm660l_gpios {
> +	adv7533_int_default: adv7533-int-default-state {
> +		pins = "gpio11";
> +		function = "normal";
> +		input-enable;
> +		/* pull-up on board */
> +		bias-disable;
> +	};
> +};
> +

[Severity: High]
Does adv7533-int-default-state also need output-disable?

When the bootloader leaves the pin in PMIC_GPIO_MODE_DIGITAL_OUTPUT,
pmic_gpio_populate() in drivers/pinctrl/qcom/pinctrl-spmi-gpio.c sets
pad->output_enabled = true:

	case PMIC_GPIO_MODE_DIGITAL_OUTPUT:
		pad->input_enabled = false;
		pad->output_enabled = true;
		break;

In pmic_gpio_config_set(), PIN_CONFIG_INPUT_ENABLE only updates
pad->input_enabled and leaves pad->output_enabled untouched unless
PIN_CONFIG_OUTPUT_ENABLE (output-disable) is also passed:

		case PIN_CONFIG_INPUT_ENABLE:
			pad->input_enabled = arg ? true : false;
			break;
		case PIN_CONFIG_OUTPUT_ENABLE:
			pad->output_enabled = arg ? true : false;
			break;

With both flags true, pmic_gpio_config_set() programs the mode to
PMIC_GPIO_MODE_DIGITAL_INPUT_OUTPUT rather than PMIC_GPIO_MODE_DIGITAL_INPUT:

	if (pad->analog_pass)
		val = PMIC_GPIO_MODE_ANALOG_PASS_THRU;
	else if (pad->output_enabled && pad->input_enabled)
		val = PMIC_GPIO_MODE_DIGITAL_INPUT_OUTPUT;
	else if (pad->output_enabled)
		val = PMIC_GPIO_MODE_DIGITAL_OUTPUT;
	else
		val = PMIC_GPIO_MODE_DIGITAL_INPUT;

Additionally, since commit 19fc4240358b ("pinctrl: qcom: spmi-gpio: make
direction changes exclusive"), pmic_gpio_get_direction() checks
pad->output_enabled:

	return pad->output_enabled ? GPIO_LINE_DIRECTION_OUT : GPIO_LINE_DIRECTION_IN;

Without output-disable to clear pad->output_enabled, won't the PMIC output
buffer remain active on the open-drain interrupt line and cause
pmic_gpio_get_direction() to still report GPIO_LINE_DIRECTION_OUT to
gpiochip_lock_as_irq()?

>  &qusb2phy0 {
>  	status = "okay";
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261019-ifc6560-adv-v2-1-ade625df3fe3@oss.qualcomm.com?part=1

  reply	other threads:[~2026-10-19 15:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 14:30 [PATCH v2] arm64: dts: qcom: sda660-inforce-ifc6560: fix ADV7535 interrupt pin Dmitry Baryshkov
2026-10-19 15:33 ` sashiko-bot [this message]
2026-10-19 21:09   ` Dmitry Baryshkov
2026-10-19 22:23 ` Dmitry Baryshkov
2026-10-20  7:01 ` Konrad Dybcio

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-177755@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox