[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7535cb07-31ab-407d-9226-7b3f65050a65@lunn.ch>
Date: Wed, 29 Nov 2023 23:02:50 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
Christian Marangi <ansuelsmth@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] leds: trigger: netdev: skip setting baseline state in
activate if hw-controlled
> RTL8168 LED control allows to switch between different hw triggers. I
> was under the
> assumption that this is not uncommon.
I did take a look around various datasheets, and i did find a couple
like this, but the majority have the ability to do software control.
> In order to deal with the non-atomic issue we have to set
> trigger_data->mode to the
> resulting new mode, based on what the user set. Question is what we show to the
> user. If we show nothing, then he will expect the new mode to be active.
> If we show an error, then he may assume that his input had no effect.
> So we may have to show technically an OK, plus a message that his input has been
> stored, but is not supported by hw.
It is hard to show anything to the user. We are just doing
echo 1 > file.
There is no channel to the user other than an error code.
There is also the question about what the LED should show. Ideally it
should indicate some sort of state to indicate there is an
error. Either constantly blink, turn off, etc. Maybe that is the
solution. You implement a set_brightness function which just indicates
an error on the LED, but otherwise return O.K?
Andrew
Powered by blists - more mailing lists