[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36ab1cd6-65fa-4124-b9a0-f4082936e04f@lunn.ch>
Date: Sat, 5 Apr 2025 21:52:43 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Aleksander Jan Bajkowski <olek2@...pl>
Cc: lxu@...linear.com, hkallweit1@...il.com, linux@...linux.org.uk,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, lee@...nel.org,
linux-leds@...r.kernel.org, Daniel Golle <daniel@...rotopia.org>
Subject: Re: [PATCH net-next,v2 2/2] net: phy: mxl-gpy: add LED dimming
support
On Sat, Apr 05, 2025 at 09:09:54PM +0200, Aleksander Jan Bajkowski wrote:
> Some PHYs support LED dimming. The use case is a router that dims LEDs
> at night. In the GPY2xx series, the PWM control register is common to
> all LEDs. To avoid confusing users, only the first LED used has
> brightness control enabled.
I don't know the LED subsystem very well. But struct led_classdev has:
/* Get LED brightness level */
enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
The fact this exists, suggests the LED brightness can change outside
of the control of Linux. Maybe even your very use cases of one PWM for
multiple LEDs? You might get a more consistent user experience if you
allow the brightness bet set with all the LEDs, and implement this
callback so the current brightness can be reported per LED?
Lets see what the LED subsystem people say?
Andrew
Powered by blists - more mailing lists