Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Robert Marko" <robert.marko@sartura.hr>
Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: pse-pd: pd692x0: support disabling disable ports GPIO
Date: Fri, 08 May 2026 17:14:51 +0000	[thread overview]
Message-ID: <20260508171452.5C08DC2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260507104720.262641-2-robert.marko@sartura.hr>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The driver requests the 'disable-ports' GPIO with `GPIOD_OUT_HIGH`, which logically asserts the disable signal, contradicting the goal of enabling PoE.
--

commit bef0e9b8a1213b027391963a1e52c45fae73be60
Author: Robert Marko <robert.marko@sartura.hr>

net: pse-pd: pd692x0: support disabling disable ports GPIO

This commit adds support for parsing a disable-ports GPIO in the
Microchip PSE controller driver. It attempts to set this GPIO to output
high by default to enable PoE on all ports during probe.

> diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c
> --- a/drivers/net/pse-pd/pd692x0.c
> +++ b/drivers/net/pse-pd/pd692x0.c

[ ... ]

> @@ -1780,6 +1782,11 @@ static int pd692x0_i2c_probe(struct i2c_client *client)
>  	priv->client = client;
>  	i2c_set_clientdata(client, priv);
>  
> +	disable_ports = devm_gpiod_get_optional(dev, "disable-ports", GPIOD_OUT_HIGH);

Will requesting this GPIO with GPIOD_OUT_HIGH actually disable the ports
instead of enabling them?

The gpiod API operates on logical states rather than physical voltage levels.
By requesting a GPIO named disable-ports with GPIOD_OUT_HIGH, the disable
signal is logically asserted.

This activates the disable condition and turns off PoE on the ports.

To de-assert the disable signal and enable PoE as intended, should this be
requested with GPIOD_OUT_LOW instead?

> +	if (IS_ERR(disable_ports))
> +		return dev_err_probe(&client->dev, PTR_ERR(disable_ports),
> +				     "Failed to get disable ports GPIO\n");
> +
>  	ret = i2c_master_recv(client, (u8 *)&buf, sizeof(buf));

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260507104720.262641-1-robert.marko@sartura.hr?part=2

      parent reply	other threads:[~2026-05-08 17:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 10:46 [PATCH net-next 1/2] dt-bindings: net: pse-pd: microchip,pd692x0: add port disable GPIO Robert Marko
2026-05-07 10:46 ` [PATCH net-next 2/2] net: pse-pd: pd692x0: support disabling disable ports GPIO Robert Marko
2026-05-08 12:05   ` Oleksij Rempel
2026-05-09 12:14     ` Robert Marko
2026-05-08 17:14   ` sashiko-bot [this message]

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=20260508171452.5C08DC2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=robert.marko@sartura.hr \
    --cc=robh@kernel.org \
    --cc=sashiko@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