Re: [PATCH net-next v2 2/2] net: pse-pd: pd692x0: support disabling disable ports GPIO

From: Jakub Kicinski

Date: Tue May 19 2026 - 20:47:51 EST


This is an AI-generated review of your patch. The human sending this
email says "nit picks but why not.."
---
net: pse-pd: pd692x0: support disabling disable ports GPIO

This commit adds support for parsing the disable ports GPIO on Microchip
PSE controllers and configuring its default state to enable PoE during probe.

> So lets support parsing that GPIO and using the GPIO flags to set it to
> output high by default and enable PoE on all ports during probe.

Does the commit message contradict the implementation?

The message mentions setting the GPIO to "output high by default", but the
code below uses GPIOD_OUT_LOW.

While setting a "disable-ports" pin low to enable PoE makes logical sense,
could the commit message be updated to accurately reflect the code's behavior?

> diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c
> index 4a3c852780f58..6c5c5a26bbaa6 100644
> --- 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_LOW);
> + if (IS_ERR(disable_ports))
> + return dev_err_probe(&client->dev, PTR_ERR(disable_ports),
> + "Failed to get disable ports GPIO\n");

This isn't a bug, but should this use the local 'dev' variable instead of
dereferencing '&client->dev' again?

The 'dev' variable is used in the devm_gpiod_get_optional() call just above
this line.
--
pw-bot: cr