From: Andrew Lunn <andrew@lunn.ch>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [net-next PATCH 1/2] dt-bindings: Document QCA808x PHYs
Date: Mon, 11 Dec 2023 18:49:02 +0100 [thread overview]
Message-ID: <2698eda5-af84-494f-844b-2ea87aa510d2@lunn.ch> (raw)
In-Reply-To: <657744b5.050a0220.dfa0d.11a4@mx.google.com>
On Mon, Dec 11, 2023 at 06:19:46PM +0100, Christian Marangi wrote:
> On Mon, Dec 11, 2023 at 04:54:12PM +0100, Andrew Lunn wrote:
> > > Mhhh with a generic property and LED core or phylib handling it... How
> > > it would work applying that setting on PHY side?
> >
> > Add a .led_set_polarity callback to the PHY driver structure?
> >
> > Take a look at other LED drivers. Does anything similar already exist?
> > It is unlikely that PHYs are the only sort of LED to have a polarity.
> >
>
> Interesting topic... With a quick grep on Documentation for polarity of
> high, I can't find any use of it...
As i said, active-high is the default. So there is no need to specify
it. But if you look in Documentation/devicetree/binding/leds for
'active-low' you will find a few examples.
> Also main problem is that the thing is controlled globally and not per
> LED. (can be handled internally to the driver with some priv and check
> magic)
Ah, missed that. Marvell PHYs have polarity per LED.
It would be better to describe this correctly, so one property at a
higher level. We can then in the future add an 'active-low' property
per PHY.
> Is it worth to impemement the additional API to control this? And I
> guess a egenric binding should be added to ethernet-phy? Or should it be
> added to LEDs?
Since it is above individual LEDs, i would not add it to the generic
LED binding. But it could go inside the leds object of
ethernet-phy.yaml.
leds {
#address-cells = <1>;
#size-cells = <0>;
active-low;
led@0 {
reg = <0>;
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
Andrew
next prev parent reply other threads:[~2023-12-11 17:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-09 1:48 Christian Marangi
2023-12-09 1:48 ` [net-next PATCH 2/2] net: phy: at803x: add LED support for qca808x Christian Marangi
2023-12-09 12:38 ` kernel test robot
2023-12-09 12:44 ` Christian Marangi
2023-12-11 15:50 ` Andrew Lunn
2023-12-09 18:24 ` kernel test robot
2023-12-11 10:19 ` [net-next PATCH 1/2] dt-bindings: Document QCA808x PHYs Krzysztof Kozlowski
2023-12-11 12:18 ` Christian Marangi
2023-12-11 16:01 ` Krzysztof Kozlowski
2023-12-11 15:44 ` Andrew Lunn
2023-12-11 15:48 ` Christian Marangi
2023-12-11 15:54 ` Andrew Lunn
2023-12-11 17:19 ` Christian Marangi
2023-12-11 17:49 ` Andrew Lunn [this message]
2023-12-11 17:57 ` Christian Marangi
2023-12-11 15:49 ` Christian Marangi
2023-12-11 15:51 ` Andrew Lunn
2023-12-11 15:57 ` Christian Marangi
2023-12-13 18:46 ` Rob Herring
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=2698eda5-af84-494f-844b-2ea87aa510d2@lunn.ch \
--to=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@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
all inboxes | Powered by JetHome®