From: ChiYuan Huang <cy_hu...@richtek.com>

Add the new property for ocp level selection.

Signed-off-by: ChiYuan Huang <cy_hu...@richtek.com>
---
 .../bindings/leds/backlight/richtek,rt4831-backlight.yaml         | 8 ++++++++
 include/dt-bindings/leds/rt4831-backlight.h                       | 5 +++++
 2 files changed, 13 insertions(+)

diff --git 
a/Documentation/devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml
 
b/Documentation/devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml
index e0ac686..c1c59de 100644
--- 
a/Documentation/devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml
+++ 
b/Documentation/devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml
@@ -47,6 +47,14 @@ properties:
     minimum: 0
     maximum: 3
 
+  richtek,bled-ocp-sel:
+    description: |
+      Backlight OCP level selection, currently support 0.9A/1.2A/1.5A/1.8A
+    $ref: /schemas/types.yaml#/definitions/uint8
+    default: 1
+    minimum: 0
+    maximum: 3
+
   richtek,channel-use:
     description: |
       Backlight LED channel to be used.
diff --git a/include/dt-bindings/leds/rt4831-backlight.h 
b/include/dt-bindings/leds/rt4831-backlight.h
index 125c635..e8b8609 100644
--- a/include/dt-bindings/leds/rt4831-backlight.h
+++ b/include/dt-bindings/leds/rt4831-backlight.h
@@ -14,6 +14,11 @@
 #define RT4831_BLOVPLVL_25V    2
 #define RT4831_BLOVPLVL_29V    3
 
+#define RT4831_BLOCPLVL_0P9A   0
+#define RT4831_BLOCPLVL_1P2A   1
+#define RT4831_BLOCPLVL_1P5A   2
+#define RT4831_BLOCPLVL_1P8A   3
+
 #define RT4831_BLED_CH1EN      (1 << 0)
 #define RT4831_BLED_CH2EN      (1 << 1)
 #define RT4831_BLED_CH3EN      (1 << 2)
-- 
2.7.4

Reply via email to