From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Robert Marko <robert.marko@sartura.hr>
Cc: kory.maincent@bootlin.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
luka.perkov@sartura.hr
Subject: Re: [PATCH net-next 2/2] net: pse-pd: pd692x0: support disabling disable ports GPIO
Date: Fri, 8 May 2026 14:05:31 +0200 [thread overview]
Message-ID: <af3RiyMRM56b3DJM@pengutronix.de> (raw)
In-Reply-To: <20260507104720.262641-2-robert.marko@sartura.hr>
On Thu, May 07, 2026 at 12:46:55PM +0200, Robert Marko wrote:
> Microchip PSE controllers have a dedicated disable ports input that like it
> name says disables PoE on all ports.
>
> 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.
>
> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> ---
> drivers/net/pse-pd/pd692x0.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c
> index 44cf9f97be67..670656abd16f 100644
> --- a/drivers/net/pse-pd/pd692x0.c
> +++ b/drivers/net/pse-pd/pd692x0.c
> @@ -7,6 +7,7 @@
>
> #include <linux/delay.h>
> #include <linux/firmware.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/i2c.h>
> #include <linux/module.h>
> #include <linux/of.h>
> @@ -1781,6 +1782,7 @@ static int pd692x0_i2c_probe(struct i2c_client *client)
> static const char * const regulators[] = { "vdd", "vdda" };
> struct pd692x0_msg msg, buf = {0}, zero = {0};
> struct device *dev = &client->dev;
> + struct gpio_desc *disable_ports;
> struct pd692x0_msg_ver ver;
> struct pd692x0_priv *priv;
> struct fw_upload *fwl;
> @@ -1808,6 +1810,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);
I guess this signal is active low. Since gpio framework operates with
logical values, more natural would be here to use GPIOD_OUT_LOW to
signal that disable-ports mode is disabled. And in the devicetree use
GPIO_ACTIVE_LOW.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2026-05-08 12:05 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 [this message]
2026-05-09 12:14 ` Robert Marko
2026-05-08 17:14 ` sashiko-bot
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=af3RiyMRM56b3DJM@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=kory.maincent@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luka.perkov@sartura.hr \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robert.marko@sartura.hr \
--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