netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Marek Behún" <kabel@kernel.org>,
	linux-leds@vger.kernel.org, netdev@vger.kernel.org,
	"Pavel Machek" <pavel@ucw.cz>, "Dan Murphy" <dmurphy@ti.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Matthias Schiffer" <matthias.schiffer@ew.tq-group.com>,
	"Jacek Anaszewski" <jacek.anaszewski@gmail.com>,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>
Subject: Re: [PATCH leds v2 00/10] Add support for offloading netdev trigger to HW + example implementation for Turris Omnia
Date: Wed, 5 Nov 2025 17:52:32 +0000	[thread overview]
Message-ID: <CA+V-a8v_1u2jGVRRKQCS7ZvvjKORrHjEBdTthjAF91LYEhvYYQ@mail.gmail.com> (raw)
In-Reply-To: <b7454a3f-fac8-4789-a3ef-baf341aea8f0@lunn.ch>

Hi Andrew,

On Wed, Nov 5, 2025 at 3:49 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> > Sorry for the delayed response.
> >
> > I started investigating adding PHY leds. In page 53 section "4.2.27
> > LED Behavior" [0] we have an option for LED0/1 combine feature
> > disable. For this is it OK to add a new DT property?
>
> Why do you need a new property?
>
> You just need to set this bit depending on what has been selected via
> /sys/class/led.
>
Ahh I get you now. When I trigger the sysfs file I get the below files:

# ls
brightness  device  device_name  full_duplex  half_duplex  interval
link  link_10  link_100  max_brightness  offloaded  power  rx  rx_err
subsystem  trigger  tx  tx_err  uevent

As per HW manual [0] we have,
0: Combine enabled (link/activity, duplex/collision).
1: Disable combination (link only, duplex only).

# Combine DISABLED (link + duplex only)
echo netdev > trigger
echo 1 > link
echo 1 > full_duplex  # or half_duplex
echo 0 > rx
echo 0 > tx

# Combine ENABLED (link + activity + duplex + collision)
echo netdev > trigger
echo 1 > link
echo 1 > rx
echo 1 > tx

So to Enable/Disable LEDx combine feature we just need to write as
above. Is my understanding correct?

[0] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/VMDS-10513_VSC8541-02_VSC8541-05_Datasheet.pdf

> And if the user asks for a mode which the hardware does not supported,
> the core will fall back to use on/off and blink the LED itself.
>
Ok.

> PHY LEDs are the wild west. Every vendor has its own idea what is
> important, and adds features which other vendors don't have. But that
> does not mean we need to support all the features in Linux. So the
> core has a reasonable set of features which we expect most PHYs can
> support. I don't want to add more features unless you have a big
> business case it is needed, and other PHY also have the same feature.
>
Agreed.

Cheers,
Prabhakar

  reply	other threads:[~2025-11-05 17:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  0:51 [PATCH leds v2 00/10] Add support for offloading netdev trigger to HW + example implementation for Turris Omnia Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 01/10] leds: trigger: netdev: don't explicitly zero kzalloced data Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 02/10] leds: trigger: add API for HW offloading of triggers Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 03/10] leds: trigger: netdev: move trigger data structure to global include dir Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 04/10] leds: trigger: netdev: support HW offloading Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 05/10] leds: trigger: netdev: change spinlock to mutex Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 06/10] leds: core: inform trigger that it's deactivation is due to LED removal Marek Behún
2021-06-01 21:12   ` Andrew Lunn
2021-06-02 12:44     ` Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 07/10] leds: turris-omnia: refactor sw mode setting code into separate function Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 08/10] leds: turris-omnia: refactor brightness setting function Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 09/10] leds: turris-omnia: initialize each multicolor LED to white color Marek Behún
2021-06-01  0:51 ` [PATCH leds v2 10/10] leds: turris-omnia: support offloading netdev trigger for WAN LED Marek Behún
2021-06-01  1:44   ` Marek Behún
2021-06-01 21:19   ` Andrew Lunn
2025-10-16 11:43 ` [PATCH leds v2 00/10] Add support for offloading netdev trigger to HW + example implementation for Turris Omnia Lad, Prabhakar
2025-10-16 13:14   ` Andrew Lunn
2025-10-16 18:53     ` Lad, Prabhakar
2025-10-16 19:11       ` Andrew Lunn
2025-10-16 19:25         ` Lad, Prabhakar
2025-10-16 19:44           ` Andrew Lunn
2025-10-17 15:23             ` Lad, Prabhakar
2025-10-21 10:50               ` Lee Jones
2025-11-05 13:32               ` Lad, Prabhakar
2025-11-05 15:48                 ` Andrew Lunn
2025-11-05 17:52                   ` Lad, Prabhakar [this message]
2025-11-05 18:35                     ` Andrew Lunn

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=CA+V-a8v_1u2jGVRRKQCS7ZvvjKORrHjEBdTthjAF91LYEhvYYQ@mail.gmail.com \
    --to=prabhakar.csengg@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=kabel@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=matthias.schiffer@ew.tq-group.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).