diff mbox series

[2/2] dt-bindings: leds: Document Awinic AW2016 bindings

Message ID 20230524114056.196518-1-v.barinov@yadro.com
State Changes Requested, archived
Headers show
Series leds: add Awinic AW2016 driver | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dt-meta-schema fail build log

Commit Message

Vladimir Barinov May 24, 2023, 11:40 a.m. UTC
Add Awinic AW2026 binding documentation

Signed-off-by: Vladimir Barinov <v.barinov@yadro.com>
---
 .../bindings/leds/awinic,aw2026.yaml          | 92 +++++++++++++++++++
 1 file changed, 92 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/awinic,aw2026.yaml

Comments

Rob Herring May 24, 2023, 12:21 p.m. UTC | #1
On Wed, 24 May 2023 14:40:56 +0300, Vladimir Barinov wrote:
> Add Awinic AW2026 binding documentation
> 
> Signed-off-by: Vladimir Barinov <v.barinov@yadro.com>
> ---
>  .../bindings/leds/awinic,aw2026.yaml          | 92 +++++++++++++++++++
>  1 file changed, 92 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/awinic,aw2026.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/leds/awinic,aw2026.example.dts:52.3-53.1 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/leds/awinic,aw2026.example.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1512: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230524114056.196518-1-v.barinov@yadro.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Lee Jones June 2, 2023, 8:06 a.m. UTC | #2
On Wed, 24 May 2023, Rob Herring wrote:

> 
> On Wed, 24 May 2023 14:40:56 +0300, Vladimir Barinov wrote:
> > Add Awinic AW2026 binding documentation
> > 
> > Signed-off-by: Vladimir Barinov <v.barinov@yadro.com>
> > ---
> >  .../bindings/leds/awinic,aw2026.yaml          | 92 +++++++++++++++++++
> >  1 file changed, 92 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/leds/awinic,aw2026.yaml
> > 
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> Error: Documentation/devicetree/bindings/leds/awinic,aw2026.example.dts:52.3-53.1 syntax error
> FATAL ERROR: Unable to parse input tree
> make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/leds/awinic,aw2026.example.dtb] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:1512: dt_binding_check] Error 2

Taking this set out of my review queue until this is rectified.
Vladimir Barinov June 2, 2023, 8:46 a.m. UTC | #3
Hi Lee,

On 6/2/23 11:06, Lee Jones wrote:
> «Внимание! Данное письмо от внешнего адресата!»
>
> On Wed, 24 May 2023, Rob Herring wrote:
>
>> On Wed, 24 May 2023 14:40:56 +0300, Vladimir Barinov wrote:
>>> Add Awinic AW2026 binding documentation
>>>
>>> Signed-off-by: Vladimir Barinov <v.barinov@yadro.com>
>>> ---
>>>   .../bindings/leds/awinic,aw2026.yaml          | 92 +++++++++++++++++++
>>>   1 file changed, 92 insertions(+)
>>>   create mode 100644 Documentation/devicetree/bindings/leds/awinic,aw2026.yaml
>>>
>> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
>> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>>
>> yamllint warnings/errors:
>>
>> dtschema/dtc warnings/errors:
>> Error: Documentation/devicetree/bindings/leds/awinic,aw2026.example.dts:52.3-53.1 syntax error
>> FATAL ERROR: Unable to parse input tree
>> make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/leds/awinic,aw2026.example.dtb] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> make: *** [Makefile:1512: dt_binding_check] Error 2
> Taking this set out of my review queue until this is rectified.

Thank you for paying attention for this commit.

I've already resent fixes in v2 version:

https://lore.kernel.org/all/20230525101341.2036563-1-v.barinov@yadro.com/

>
> --
> Lee Jones [李琼斯]
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/awinic,aw2026.yaml b/Documentation/devicetree/bindings/leds/awinic,aw2026.yaml
new file mode 100664
index 000000000000..abacf746677b
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/awinic,aw2026.yaml
@@ -0,0 +1,92 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/awinic,aw2026.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Awinic AW2026 3-channel LED Driver
+
+maintainers:
+  - Vladimir Barinov <v.barinov@yadro.com>
+
+description: |
+  The AW2026 is a 3-channel LED driver with I2C interface. It can control
+  LED brightness with PWM output. It supports hardware blinking and
+  hardware patterns.
+
+properties:
+  compatible:
+    const: awinic,aw2026
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+  awinic,led-max-microamp:
+    description:
+      Maximum current at LED output
+    enum:
+      [3000, 6375, 12750, 25500]
+
+  vcc-supply:
+    description: Regulator providing power to the "VBAT" pin.
+
+patternProperties:
+  "^led@[0-2]$":
+    type: object
+    $ref: common.yaml#
+
+    properties:
+      reg:
+        description: Index of the LED.
+        minimum: 0
+        maximum: 2
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    i2c0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        led-controller@64 {
+                compatible = "awinic,aw2026";
+                reg = <0x64>;
+                #address-cells = <1>;
+                #size-cells = <0>;
+                awinic,led-max-microamp = <6375>;
+                vcc-supply = <&vcc_3v3_s0>;
+
+                led@0 {
+                        reg = <0>;
+                        function = LED_FUNCTION_INDICATOR;
+                        color = <LED_COLOR_ID_RED>;
+                };
+
+                led@1 {
+                        reg = <1>;
+                        function = LED_FUNCTION_INDICATOR;
+                        color = <LED_COLOR_ID_BLUE>;
+                };
+
+                led@2 {
+                        reg = <2>;
+                        function = LED_FUNCTION_INDICATOR;
+                        color = <LED_COLOR_ID_GREEN>;
+                };
+        };
+...