From: Alexander Wilhelm <alexander.wilhelm@westermo.com>
To: "Marek Behún" <kabel@kernel.org>
Cc: Pavel Machek <pavel@ucw.cz>,
Ivan Mikhaylov <i.mikhaylov@yadro.com>,
linux-leds@vger.kernel.org,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Rob Herring <robh+dt@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
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: [PATCH 0/2] Add LED mode behavior/select properties and handle
Date: Tue, 12 Nov 2024 10:10:41 +0100 [thread overview]
Message-ID: <ZzMbkVbPu9I6sLby@FUE-ALEWI-WINX> (raw)
In-Reply-To: <fuk5stahnpinahhyixdgeepchucvfbha3ikqagewxhxlh5337x@zuo46w4enzp4>
Am Tue, Nov 12, 2024 at 09:49:03AM +0100 schrieb Marek Behún:
> On Tue, Nov 12, 2024 at 09:19:59AM +0100, Alexander Wilhelm wrote:
> > Am Wed, Dec 16, 2020 at 11:41:19PM +0100 schrieb Pavel Machek:
> > > Hi!
> > >
> > > > In KSZ9131 PHY it is possible to control LEDs blink behavior via
> > > > LED mode behavior and select registers. Add DTS properties plus handles
> > > > of them inside micrel PHY driver.
> > > >
> > > > I've some concerns about passing raw register values into LED mode
> > > > select and behavior. It can be passed via array like in microchip
> > > > driver(Documentation/devicetree/bindings/net/microchip,lan78xx.txt).
> > > > There is the problem in this particular driver - there is a lot of other PHYs
> > > > and led mode behavior/select states may intersect, that's the reason why
> > > > I did it this way. Is there any good ways to make it look more
> > > > properly?
> > >
> > > Lets... not do this?
> > >
> > > We have a LED subsystem which should probably control the LEDs... so
> > > user can specify behaviours at run-time, instead of them being
> > > hard-coded in the device tree.
> > >
> > > Plus, LED subsystem will use same interface for networks LEDs as for
> > > ... other LEDs.
> >
> > Hi Pavel,
> >
> > I would also like to control the LEDs via subsystem interface, but how I can
> > configure those to be visible in 'sys/class/leds'? My LEDs are connected
> > directly to KSZ9131RNX phy device and not to any of GPIO available on the CPU.
> > Am I missing some DTS entries therefore?
>
> The KSZ9131RNX driver needs to implement some LED methods, like
> .led_brightness_set(), .led_blink_set(), .led_hw_is_supported(),
> .led_hw_control_set(), .led_hw_control_get().
>
> Look for example at marvell.c driver, or broadcom.c.
>
> Regarding DTS, look at linux/arch/arm/boot/dts/marvell/armada-370-rd.dts.
> The ethernet-phy@0 node has leds subnode, describing the LEDs.
>
> Marek
Hi Marek,
thank you a lot. I think I got the main idea how the LED interface intended to
work. The current linux master does not implement those callbacks for the micrel
phy. I will look into implementing these functions if I am given enough time to
do so.
Best regards
Alexander Wilhelm
prev parent reply other threads:[~2024-11-12 9:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 14:04 [PATCH 0/2] Add LED mode behavior/select properties and handle Ivan Mikhaylov
2020-12-09 14:05 ` [PATCH 1/2] net: phy: micrel: add LED control on KSZ9131 Ivan Mikhaylov
2020-12-09 14:05 ` [PATCH 2/2] dt-bindings: net: phy: micrel: add LED mode behavior and select properties Ivan Mikhaylov
2020-12-09 23:05 ` [PATCH 0/2] Add LED mode behavior/select properties and handle Andrew Lunn
2020-12-16 22:41 ` Pavel Machek
2024-11-12 8:10 ` Alexander Wilhelm
2024-11-12 8:19 ` Alexander Wilhelm
2024-11-12 8:49 ` Marek Behún
2024-11-12 9:10 ` Alexander Wilhelm [this message]
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=ZzMbkVbPu9I6sLby@FUE-ALEWI-WINX \
--to=alexander.wilhelm@westermo.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=i.mikhaylov@yadro.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pavel@ucw.cz \
--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