From: Andrew Lunn <andrew@lunn.ch>
To: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [net-next RFC PATCH 1/2] drivers: net: dsa: qca8k: add support for led config
Date: Mon, 20 Sep 2021 20:55:48 +0200 [thread overview]
Message-ID: <YUjZNA1Swo6Bv3/Q@lunn.ch> (raw)
In-Reply-To: <20210920180851.30762-1-ansuelsmth@gmail.com>
On Mon, Sep 20, 2021 at 08:08:50PM +0200, Ansuel Smith wrote:
> Add support for led control and led toggle.
> qca8337 and qca8327 switch have various reg to control port leds.
> The current implementation permit to toggle them on/off and to declare
> their blink rules based on the entry in the dts.
> They can also be declared in userspace by the "control_rule" entry in
> the led sysfs. When hw_mode is active (set by default) the leds blink
> based on the control_rule. There are 6 total control rule.
> Control rule that applies to phy0-3 commonly used for lan port.
> Control rule that applies to phy4 commonly used for wan port.
> Each phy port (5 in total) can have a maximum of 3 different leds
> attached. Each led can be turned off, blink at 4hz, off or set to
> hw_mode and follow their respecitve control rule. The hw_mode can be
> toggled using the sysfs entry and will be disabled on brightness or
> blink set.
Hi Ansuel
It is great you are using the LED subsystem for this. But we need to
split the code up into a generic part which can shared by any
switch/PHY and a driver specific part.
There has been a lot of discussion on the list about this. Maybe you
can help get us to a generic solution which can be used by everybody.
Andrew
next prev parent reply other threads:[~2021-09-20 18:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-20 18:08 [net-next RFC PATCH 1/2] drivers: net: dsa: qca8k: add support for led config Ansuel Smith
2021-09-20 18:08 ` [net-next RFC PATCH 2/2] Documentation: devicetree: net: dsa: qca8k: document configurable led support Ansuel Smith
2021-09-23 17:15 ` Rob Herring
2021-09-20 18:55 ` Andrew Lunn [this message]
2021-09-20 19:02 ` [net-next RFC PATCH 1/2] drivers: net: dsa: qca8k: add support for led config Ansuel Smith
2021-09-20 19:19 ` Andrew Lunn
2021-09-20 20:11 ` Ansuel Smith
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=YUjZNA1Swo6Bv3/Q@lunn.ch \
--to=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=robh+dt@kernel.org \
--cc=vivien.didelot@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).