mbox series

[0/5] leds: Support retaining state for the PCA955x

Message ID 20210429205002.70245-1-eajames@linux.ibm.com
Headers show
Series leds: Support retaining state for the PCA955x | expand

Message

Eddie James April 29, 2021, 8:49 p.m. UTC
This series implements the ability to retain the state of the LEDs
controlled by the PCA955x across system reboots. This includes a
change to the LED core driver to respect the retain-state-shutdown
device tree property. It also cleans up the PCA955x driver and adds
the ability to query the hardware LED brightness.

Eddie James (5):
  dt-bindings: leds: Add retain-state-shutdown boolean
  leds: leds-core: Implement the retain-state-shutdown property
  leds: pca955x: Clean up code formatting
  leds: pca955x: Add brightness_get function
  leds: pca955x: Implement the default-state property

 .../devicetree/bindings/leds/common.yaml      |   6 +
 drivers/leds/led-class.c                      |  10 +-
 drivers/leds/leds-pca955x.c                   | 169 +++++++++++++-----
 3 files changed, 142 insertions(+), 43 deletions(-)

Comments

Eddie James April 29, 2021, 9 p.m. UTC | #1
On Thu, 2021-04-29 at 15:49 -0500, Eddie James wrote:
> Document the retain-state-shutdown property that indicates that a LED
> should not be turned off or changed during system shutdown.

Lost a character of Rob's email, so bumping this one with the right
address.

Sorry,
Eddie

> 
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> ---
>  Documentation/devicetree/bindings/leds/common.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/leds/common.yaml
> b/Documentation/devicetree/bindings/leds/common.yaml
> index b1f363747a62..697102707703 100644
> --- a/Documentation/devicetree/bindings/leds/common.yaml
> +++ b/Documentation/devicetree/bindings/leds/common.yaml
> @@ -128,6 +128,12 @@ properties:
>        as a panic indicator.
>      type: boolean
>  
> +  retain-state-shutdown:
> +    description:
> +      This property specifies that the LED should not be turned off
> or changed
> +      when the system shuts down.
> +    type: boolean
> +
>    trigger-sources:
>      description: |
>        List of devices which should be used as a source triggering
> this LED
vishwanatha subbanna April 30, 2021, 11:21 a.m. UTC | #2
> On 30-Apr-2021, at 2:30 AM, Eddie James <eajames@linux.ibm.com> wrote:
> 
> On Thu, 2021-04-29 at 15:49 -0500, Eddie James wrote:
>> Document the retain-state-shutdown property that indicates that a LED
>> should not be turned off or changed during system shutdown.
> 
> Lost a character of Rob's email, so bumping this one with the right
> address.
> 
> Sorry,
> Eddie
> 
>> 

Reviewed-by: Vishwanatha Subbanna <vishwanath@linux.vnet.ibm.com>


>> Signed-off-by: Eddie James <eajames@linux.ibm.com>
>> ---
>> Documentation/devicetree/bindings/leds/common.yaml | 6 ++++++
>> 1 file changed, 6 insertions(+)
>> 
>> diff --git a/Documentation/devicetree/bindings/leds/common.yaml
>> b/Documentation/devicetree/bindings/leds/common.yaml
>> index b1f363747a62..697102707703 100644
>> --- a/Documentation/devicetree/bindings/leds/common.yaml
>> +++ b/Documentation/devicetree/bindings/leds/common.yaml
>> @@ -128,6 +128,12 @@ properties:
>>       as a panic indicator.
>>     type: boolean
>> 
>> +  retain-state-shutdown:
>> +    description:
>> +      This property specifies that the LED should not be turned off
>> or changed
>> +      when the system shuts down.
>> +    type: boolean
>> +
>>   trigger-sources:
>>     description: |
>>       List of devices which should be used as a source triggering
>> this LED
>