[1/2] dt-bindings: leds-lp55xx: add ti,disable-charge-pump

Message ID 20221028133501.95833-2-maarten.zanders@mind.be
State New
Headers
Series leds: lp55xx: support disabling the charge pump |

Commit Message

Maarten Zanders Oct. 28, 2022, 1:34 p.m. UTC
  Add a binding to disable the internal charge pump for lp55xx.

Signed-off-by: Maarten Zanders <maarten.zanders@mind.be>
---
 Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Krzysztof Kozlowski Oct. 28, 2022, 10:07 p.m. UTC | #1
On 28/10/2022 09:34, Maarten Zanders wrote:
> Add a binding to disable the internal charge pump for lp55xx.
> 
> Signed-off-by: Maarten Zanders <maarten.zanders@mind.be>
> ---
>  Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> index 7ec676e53851..9eb8d1017402 100644
> --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> @@ -64,6 +64,11 @@ properties:
>    '#size-cells':
>      const: 0
>  
> +  ti,disable-charge-pump:
> +    description: |

Drop |

> +      Disable the internal charge pump.

Does it mean that it is enabled by default?

Best regards,
Krzysztof
  
Maarten Zanders Oct. 29, 2022, 7:48 a.m. UTC | #2
On 10/29/22 00:07, Krzysztof Kozlowski wrote:
> Drop | 
OK.
>> +      Disable the internal charge pump.
> Does it mean that it is enabled by default?

The device default after reset is "off".
The current implementation sets it to "auto".
Other possible modes are "bypass" and "boost".

Should I change to an optional "ti,charge_pump_mode" as string and set 
default to "auto"?

Thanks!
  
Krzysztof Kozlowski Nov. 2, 2022, 4:19 p.m. UTC | #3
On 29/10/2022 03:48, Maarten Zanders wrote:
> 
> On 10/29/22 00:07, Krzysztof Kozlowski wrote:
>> Drop | 
> OK.
>>> +      Disable the internal charge pump.
>> Does it mean that it is enabled by default?
> 
> The device default after reset is "off".
> The current implementation sets it to "auto".
> Other possible modes are "bypass" and "boost".
> 
> Should I change to an optional "ti,charge_pump_mode" as string and set 
> default to "auto"?

enum makes more sense in that case. Just don't user underscores in
property names.

Best regards,
Krzysztof
  

Patch

diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
index 7ec676e53851..9eb8d1017402 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
@@ -64,6 +64,11 @@  properties:
   '#size-cells':
     const: 0
 
+  ti,disable-charge-pump:
+    description: |
+      Disable the internal charge pump.
+    type: boolean
+
 patternProperties:
   "(^led@[0-9a-f]$|led)":
     type: object