Netdev List
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Arthur Crépin Leblond" <arthur@marmottus.net>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>
Cc: Netdev <netdev@vger.kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Subject: Re: [PATCH net-next v4 0/3] w5100: restore GPIO-based link detection
Date: Tue, 11 Aug 2026 15:01:26 +0200	[thread overview]
Message-ID: <9bf826bf-cef8-434c-8fe4-e8724c90a37b@app.fastmail.com> (raw)
In-Reply-To: <20260811-wiznet-link-gpio-v4-0-4d5f7da885a8@marmottus.net>

On Tue, Aug 11, 2026, at 14:34, Arthur Crépin Leblond wrote:
>
> In the previous version of the w5100 driver, the LINKLED pin could be
> wired to a GPIO to detect the link status changes via an interrupt.
> This only works on w5500 as it is the only one documenting its LINKLED
> pin to hold the link status (on w5100 the LINKLED pin is changing with
> RX/TX activity).
>
> This series of patches is bringing back the link status detection on
> w5500 using the Link Status bit of the PHY Configuration Register.
> Additionally, the LINKLED pin can also be wired to detect link status
> changes and read the register in the interrupt handler.
>
> Arthur Crépin Leblond
>
> Signed-off-by: Arthur Crépin Leblond <arthur@marmottus.net>
> ---
> Changes in v4:
> - Use directly an interrupt line instead of gpio -> irq
> - Update interrupts in DT bindings
> - Address sashiko reviews
>  - drop devm_ on request_threaded_irq to avoid use after free
>  - disable/enable the link_irq in the suspend/resume
>  - only call netif_carrier_on|off if the link interrupt is present
> - Link to v3: 
> https://patch.msgid.link/20260806-wiznet-link-gpio-v3-0-532d4a143805@marmottus.net

Hi Arthur,

This version looks good to me,

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

Krzystof said that he preferred these to be described as GPIOs
instead, but I think there were some other open questions with
your previous version. If you can come up with a version that
Krzystof likes better, I'm fine with that as well.

To me, the main benefit here is that describing it as a
interrupt instead of gpio means it can be connected to an
interrupt pin of a chip that is not also a gpio pin, but
this is another rare corner case, and the code will already
work just fine without the optional interrupt if someone
has a system with interrupt pins that are not also gpios.

      Arnd

  parent reply	other threads:[~2026-08-11 13:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 12:34 [PATCH net-next v4 0/3] w5100: restore GPIO-based link detection Arthur Crépin Leblond
2026-08-11 12:34 ` [PATCH net-next v4 1/3] dt-bindings: net: wiznet,w5100: convert to DT schema Arthur Crépin Leblond
2026-08-11 12:57   ` Arnd Bergmann
2026-08-11 14:14     ` Arthur Crépin Leblond
2026-08-11 14:25       ` Arnd Bergmann
2026-08-11 12:34 ` [PATCH net-next v4 2/3] dt-bindings: net: wiznet,w5100: add link status interrupt Arthur Crépin Leblond
2026-08-11 13:33   ` Rob Herring (Arm)
2026-08-11 13:36   ` Krzysztof Kozlowski
2026-08-11 14:02     ` Arthur Crépin Leblond
2026-08-11 12:34 ` [PATCH net-next v4 3/3] w5100: detect carrier state using link status bit and optional interrupt Arthur Crépin Leblond
2026-08-11 13:01 ` Arnd Bergmann [this message]
2026-08-11 13:37   ` [PATCH net-next v4 0/3] w5100: restore GPIO-based link detection 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=9bf826bf-cef8-434c-8fe4-e8724c90a37b@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=arthur@marmottus.net \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --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