Convert leds-is31fl319x.txt to dtschema.
Set license to the one recommended by DT project.
Signed-off-by: Vincent Knecht <[email protected]>
---
.../bindings/leds/issi,is31fl319x.yaml | 113 ++++++++++++++++++
.../bindings/leds/leds-is31fl319x.txt | 61 ----------
2 files changed, 113 insertions(+), 61 deletions(-)
create mode 100644 Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml
delete mode 100644 Documentation/devicetree/bindings/leds/leds-is31fl319x.txt
diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml
new file mode 100644
index 000000000000..0d684aeeb8cd
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml
@@ -0,0 +1,113 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/issi,is31fl319x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ISSI LED controllers bindings for IS31FL319{0,1,3,6,9}
+
+maintainers:
+ - Vincent Knecht <[email protected]>
+
+description: |
+ The IS31FL319X are LED controllers with I2C interface.
+ Previously known as Si-En SN319{0,1,3,6,9}.
+
+ For more product information please see the links below:
+ https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf
+ https://lumissil.com/assets/pdf/core/IS31FL3191_DS.pdf
+ https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf
+ https://lumissil.com/assets/pdf/core/IS31FL3196_DS.pdf
+ https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf
+
+properties:
+ compatible:
+ enum:
+ - issi,is31fl3190
+ - issi,is31fl3191
+ - issi,is31fl3193
+ - issi,is31fl3196
+ - issi,is31fl3199
+ - si-en,sn3199
+
+ reg:
+ maxItems: 1
+
+ shutdown-gpios:
+ maxItems: 1
+ description: GPIO attached to the SDB pin.
+
+ audio-gain-db:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0
+ description: Audio gain selection for external analog modulation input.
+ enum: [0, 3, 6, 9, 12, 15, 18, 21]
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^led@[1-9]$":
+ type: object
+ $ref: common.yaml#
+
+ properties:
+ reg:
+ description: Index of the LED.
+ minimum: 1
+ maximum: 9
+
+ led-max-microamp:
+ default: 20000
+ enum: [5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000]
+ description:
+ Note that a driver will take the lowest of all LED limits
+ since the chip has a single global setting. The lowest value
+ will be chosen due to the PWM specificity, where lower
+ brightness is achieved by reducing the duty-cycle of pulses
+ and not the current, which will always have its peak value
+ equal to led-max-microamp.
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/leds/common.h>
+
+ i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@65 {
+ compatible = "issi,is31fl3196";
+ reg = <0x65>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ shutdown-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+
+ led@1 {
+ reg = <1>;
+ label = "red:aux";
+ led-max-microamp = <10000>;
+ };
+
+ led@5 {
+ reg = <5>;
+ label = "green:power";
+ linux,default-trigger = "default-on";
+ };
+ };
+ };
+...
+
diff --git a/Documentation/devicetree/bindings/leds/leds-is31fl319x.txt b/Documentation/devicetree/bindings/leds/leds-is31fl319x.txt
deleted file mode 100644
index 676d43ec8169..000000000000
--- a/Documentation/devicetree/bindings/leds/leds-is31fl319x.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-LEDs connected to is31fl319x LED controller chip
-
-Required properties:
-- compatible : Should be any of
- "issi,is31fl3190"
- "issi,is31fl3191"
- "issi,is31fl3193"
- "issi,is31fl3196"
- "issi,is31fl3199"
- "si-en,sn3199".
-- #address-cells: Must be 1.
-- #size-cells: Must be 0.
-- reg: 0x64, 0x65, 0x66, or 0x67.
-
-Optional properties:
-- audio-gain-db : audio gain selection for external analog modulation input.
- Valid values: 0 - 21, step by 3 (rounded down)
- Default: 0
-- shutdown-gpios : Specifier of the GPIO connected to SDB pin of the chip.
-
-Each led is represented as a sub-node of the issi,is31fl319x device.
-There can be less leds subnodes than the chip can support but not more.
-
-Required led sub-node properties:
-- reg : number of LED line
- Valid values: 1 - number of leds supported by the chip variant.
-
-Optional led sub-node properties:
-- label : see Documentation/devicetree/bindings/leds/common.txt.
-- linux,default-trigger :
- see Documentation/devicetree/bindings/leds/common.txt.
-- led-max-microamp : (optional)
- Valid values: 5000 - 40000, step by 5000 (rounded down)
- Default: 20000 (20 mA)
- Note: a driver will take the lowest of all led limits since the
- chip has a single global setting. The lowest value will be chosen
- due to the PWM specificity, where lower brightness is achieved
- by reducing the dury-cycle of pulses and not the current, which
- will always have its peak value equal to led-max-microamp.
-
-Examples:
-
-fancy_leds: leds@65 {
- compatible = "issi,is31fl3196";
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0x65>;
- shutdown-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
-
- red_aux: led@1 {
- label = "red:aux";
- reg = <1>;
- led-max-microamp = <10000>;
- };
-
- green_power: led@5 {
- label = "green:power";
- reg = <5>;
- linux,default-trigger = "default-on";
- };
-};
--
2.35.3
On Tue, 28 Jun 2022 20:21:39 +0200, Vincent Knecht wrote:
> Convert leds-is31fl319x.txt to dtschema.
> Set license to the one recommended by DT project.
>
> Signed-off-by: Vincent Knecht <[email protected]>
> ---
> .../bindings/leds/issi,is31fl319x.yaml | 113 ++++++++++++++++++
> .../bindings/leds/leds-is31fl319x.txt | 61 ----------
> 2 files changed, 113 insertions(+), 61 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml
> delete mode 100644 Documentation/devicetree/bindings/leds/leds-is31fl319x.txt
>
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:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: patternProperties:^thermistor@:properties:adi,excitation-current-nanoamp: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: ignoring, error in schema: patternProperties: ^thermistor@: properties: adi,excitation-current-nanoamp
Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.example.dtb:0:0: /example-0/spi/ltc2983@0: failed to match any schema with compatible: ['adi,ltc2983']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
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.
On Tue, Jun 28, 2022 at 08:09:39PM -0600, Rob Herring wrote:
> On Tue, 28 Jun 2022 20:21:39 +0200, Vincent Knecht wrote:
> > Convert leds-is31fl319x.txt to dtschema.
> > Set license to the one recommended by DT project.
Do you have permission to do so? The original .txt file is default GPL2
and owned by H. Nikolaus Schaller.
> >
> > Signed-off-by: Vincent Knecht <[email protected]>
> > ---
> > .../bindings/leds/issi,is31fl319x.yaml | 113 ++++++++++++++++++
> > .../bindings/leds/leds-is31fl319x.txt | 61 ----------
> > 2 files changed, 113 insertions(+), 61 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml
> > delete mode 100644 Documentation/devicetree/bindings/leds/leds-is31fl319x.txt
> >
>
> 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:
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: patternProperties:^thermistor@:properties:adi,excitation-current-nanoamp: '$ref' should not be valid under {'const': '$ref'}
> hint: Standard unit suffix properties don't need a type $ref
> from schema $id: http://devicetree.org/meta-schemas/core.yaml#
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: ignoring, error in schema: patternProperties: ^thermistor@: properties: adi,excitation-current-nanoamp
> Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.example.dtb:0:0: /example-0/spi/ltc2983@0: failed to match any schema with compatible: ['adi,ltc2983']
You can ignore this. The bot went amuck.
Rob
Le jeudi 30 juin 2022 à 09:28 -0600, Rob Herring a écrit :
> On Tue, Jun 28, 2022 at 08:09:39PM -0600, Rob Herring wrote:
> > On Tue, 28 Jun 2022 20:21:39 +0200, Vincent Knecht wrote:
> > > Convert leds-is31fl319x.txt to dtschema.
> > > Set license to the one recommended by DT project.
>
> Do you have permission to do so? The original .txt file is default GPL2
> and owned by H. Nikolaus Schaller.
No, sorry for the mistake.
Adding to cc, which I forgot to do in the first place...
For reference: https://lore.kernel.org/linux-leds/[email protected]/T/
> > >
> > > Signed-off-by: Vincent Knecht <[email protected]>
> > > ---
> > > .../bindings/leds/issi,is31fl319x.yaml | 113 ++++++++++++++++++
> > > .../bindings/leds/leds-is31fl319x.txt | 61 ----------
> > > 2 files changed, 113 insertions(+), 61 deletions(-)
> > > create mode 100644 Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml
> > > delete mode 100644 Documentation/devicetree/bindings/leds/leds-is31fl319x.txt
> > >
> >
> > 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:
> > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml:
> > patternProperties:^thermistor@:properties:adi,excitation-current-nanoamp: '$ref' should not be valid under {'const':
> > '$ref'}
> > hint: Standard unit suffix properties don't need a type $ref
> > from schema $id: http://devicetree.org/meta-schemas/core.yaml#
> > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: ignoring,
> > error in schema: patternProperties: ^thermistor@: properties: adi,excitation-current-nanoamp
> > Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.example.dtb:0:0: /example-0/spi/ltc2983@0: failed to
> > match any schema with compatible: ['adi,ltc2983']
>
> You can ignore this. The bot went amuck.
>
Ack... at least it respected the 3 Laws :-)
Hi,
> Am 30.06.2022 um 23:43 schrieb Vincent Knecht <[email protected]>:
>
> Le jeudi 30 juin 2022 à 09:28 -0600, Rob Herring a écrit :
>> On Tue, Jun 28, 2022 at 08:09:39PM -0600, Rob Herring wrote:
>>> On Tue, 28 Jun 2022 20:21:39 +0200, Vincent Knecht wrote:
>>>> Convert leds-is31fl319x.txt to dtschema.
>>>> Set license to the one recommended by DT project.
>>
>> Do you have permission to do so? The original .txt file is default GPL2
>> and owned by H. Nikolaus Schaller.
>
> No, sorry for the mistake.
> Adding to cc, which I forgot to do in the first place...
> For reference: https://lore.kernel.org/linux-leds/[email protected]/T/
Please go ahead and change as you suggested. I won't find time to maintain this (new) document.
BR and thanks,
Nikolaus