All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Josua Mayer <josua@solid-run.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>,
	"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 <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Alexandru Tachici <alexandru.tachici@analog.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Jon Nettleton <jon@solid-run.com>,
	Yazan Shhady <yazan.shhady@solid-run.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2 1/2] dt-bindings: net: adin: add property for link-status pin polarity
Date: Sun, 21 Apr 2024 19:54:36 +0200	[thread overview]
Message-ID: <ac8fba1b-93ef-4120-a03b-f91772ecb5df@lunn.ch> (raw)
In-Reply-To: <1fe2dce3-972e-420e-b4e1-f07e15b6b35f@solid-run.com>

> I merely don't like the idea that this makes no sense for the other
> possible pin functions.
> Once somebody uses this pin for different use-case, they will need
> to solve it again.

There are not too many different uses of this pin. The data sheet
indicates you can connect it to the MAC to indicate link. You might
also be able to use it with an external PTP stamper, using the start
of frame indication.

I don't know of any bindings for such use case, but something will be
needed to describe how the pin is connected to the other device. And
at that point, the active low property could be used.

> >> This kind of configuration is much more like pinctrl than led.
> >  
> > So what is the pinctrl way of describing this? You should not be
> > inventing something new if there is an existing mechanism to describe
> > it. We want consistency, not 42 different ways of doing one thing.
> I am mostly familiar with the
> #define PIN_FUNCTION magic-numbers
> pins = <PIN_FUNCTION more-magic-numbers>;
> 
> But on Marvell platforms there is:
> marvell,pins =  "mpp1";
> marvell,function = "gpio";
> 
> I also found more generic???:
> Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml
> Documentation/devicetree/bindings/pinctrl/pinmux-node.yaml
> which have output-high/output-low, function, pin.

So that is probably your alternative if you want to not use the LED
binding.

> 
> Interestingly LED_0 supports some non-led functions, too:
> - collision detection
> - carrier sense
> - tx/rx start
> - tx error
> so polarity is also relevant to non-led usage of LED_0 pin.

Collision detection is an LED usage, you just don't see it very often
since half duplex is pretty unusual this century. Carrier sense is
also similar age, from when Ethernet was CSMA/CD.

Since they are not really used any more we don't have them in the LED
framework, but i think we could implement them if somebody actually
wanted them. My intention was to keep the LED framework KISS, since
vendors tend to implement all sorts of odd LED blink reasons. But if
nobody wants them, nobody has a good end user use case for them, why
support them?

       Andrew

  reply	other threads:[~2024-04-21 17:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20 11:22 [PATCH net-next v2 0/2] net: phy: adin: add support for setting led-, link-status-pin polarity Josua Mayer
2024-04-20 11:23 ` [PATCH net-next v2 1/2] dt-bindings: net: adin: add property for link-status pin polarity Josua Mayer
2024-04-20 16:10   ` Andrew Lunn
2024-04-20 16:56     ` Josua Mayer
2024-04-20 17:09       ` Andrew Lunn
2024-04-21  9:07         ` Josua Mayer
2024-04-21 17:54           ` Andrew Lunn [this message]
2024-04-29  9:54             ` Josua Mayer
2024-04-20 11:23 ` [PATCH net-next v2 2/2] net: phy: adin: add support for setting link-status-pin polarity Josua Mayer

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=ac8fba1b-93ef-4120-a03b-f91772ecb5df@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandru.tachici@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jon@solid-run.com \
    --cc=josua@solid-run.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michael.hennerich@analog.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=yazan.shhady@solid-run.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.