[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 Nov 2021 18:28:09 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Ansuel Smith <ansuelsmth@...il.com>, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Jonathan Corbet <corbet@....net>, Pavel Machek <pavel@....cz>,
John Crispin <john@...ozen.org>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-leds@...r.kernel.org,
Marek BehĂșn <kabel@...nel.org>
Subject: Re: [RFC PATCH v4 2/8] leds: document additional use of blink_set for
hardware control
Hi Ansuel,
Sorry -- I screwed this one up a little bit on the previous iteration.
On 11/10/21 5:34 PM, Ansuel Smith wrote:
> diff --git a/Documentation/leds/leds-class.rst b/Documentation/leds/leds-class.rst
> index 0175954717a3..c06a18b811de 100644
> --- a/Documentation/leds/leds-class.rst
> +++ b/Documentation/leds/leds-class.rst
> @@ -202,6 +202,23 @@ hardware mode and any software only trigger will reject activation.
> On init a LED driver that support a hardware mode should reset every blink mode
> set by default.
>
> +Once a trigger has declared support for hardware-controller blinks, it will use
hardware-controlled
> +blink_set() to try to offload his trigger on activation/configuration.
> +blink_set() will return 0 if the requested modes set in trigger_data can be
> +controlled by hardware or an error if both the mode bitmap is not supported by
maybe: if both of the bitmap modes are not supported by
> +the hardware or there was a problem in the configuration.
> +
> +Following blink_set logic, setting brightness to LED_OFF with hardware control active
> +will reset any active blink mode and disable hardware control setting the LED to off.
> +
> +It's in the LED driver's interest to know how to elaborate the trigger data and report support
> +for a particular set of blink modes. For this exact reason explicit support for the specific
> +trigger is mandatory or the driver returns -EOPNOTSUPP if asked to enter hardware mode
> +with a not supported trigger.
> +If the driver returns -EOPNOTSUPP on hw_control_configure(), the trigger activation will
> +fail as the driver doesn't support that specific hardware blink modes or doesn't know
mode
> +how to handle the provided trigger data.
thanks.
--
~Randy
Powered by blists - more mailing lists