Adding bindings for Analog Devices MAX31760 Fan-Speed Controller
Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com>
---
.../bindings/hwmon/adi,max31760.yaml | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/adi,max31760.yaml
diff --git a/Documentation/devicetree/bindings/hwmon/adi,max31760.yaml b/Documentation/devicetree/bindings/hwmon/adi,max31760.yaml
new file mode 100644
index 000000000..c9318e4b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/adi,max31760.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/adi,max31760.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices MAX31760 Fan-Speed Controller
+
+maintainers:
+ - Ibrahim Tilki <Ibrahim.Tilki@analog.com>
+
+description: |
+ Analog Devices MAX31760 Fan-Speed Controller
+ https://datasheets.maximintegrated.com/en/ds/MAX31760.pdf
+
+properties:
+ compatible:
+ enum:
+ - adi,max31760
+
+ reg:
+ description: I2C address of slave device.
+ maxItems: 1
+ items:
+ minimum: 0x50
+ maximum: 0x57
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ fan-controller@50 {
+ reg = <0x50>;
+ compatible = "adi,max31760";
+ };
+ };
--
2.36.1
On 09/09/2022 15:37, Ibrahim Tilki wrote: > Adding bindings for Analog Devices MAX31760 Fan-Speed Controller > > Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Please wait with applying for Rob's bot to check it. Best regards, Krzysztof
Hi Krzysztof, On 9/9/22 07:49, Krzysztof Kozlowski wrote: > On 09/09/2022 15:37, Ibrahim Tilki wrote: >> Adding bindings for Analog Devices MAX31760 Fan-Speed Controller >> >> Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com> >> --- > > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > Please wait with applying for Rob's bot to check it. > I don't think I see those results unless there is a failure. Is there a link where I can look up the results ? Thanks, Guenter
On 09/09/2022 16:52, Guenter Roeck wrote: > Hi Krzysztof, > > On 9/9/22 07:49, Krzysztof Kozlowski wrote: >> On 09/09/2022 15:37, Ibrahim Tilki wrote: >>> Adding bindings for Analog Devices MAX31760 Fan-Speed Controller >>> >>> Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com> >>> --- >> >> >> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> >> Please wait with applying for Rob's bot to check it. >> > > I don't think I see those results unless there is a failure. That's correct. > Is there a link where I can look up the results ? It will pop-up on Patchwork: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20220909133718.388213-4-Ibrahim.Tilki@analog.com/ Like for example here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20220908184925.2714098-3-sireeshkodali1@gmail.com/ Best regards, Krzysztof
On 9/9/22 07:56, Krzysztof Kozlowski wrote: > On 09/09/2022 16:52, Guenter Roeck wrote: >> Hi Krzysztof, >> >> On 9/9/22 07:49, Krzysztof Kozlowski wrote: >>> On 09/09/2022 15:37, Ibrahim Tilki wrote: >>>> Adding bindings for Analog Devices MAX31760 Fan-Speed Controller >>>> >>>> Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com> >>>> --- >>> >>> >>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >>> >>> Please wait with applying for Rob's bot to check it. >>> >> >> I don't think I see those results unless there is a failure. > > That's correct. > >> Is there a link where I can look up the results ? > > It will pop-up on Patchwork: > https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20220909133718.388213-4-Ibrahim.Tilki@analog.com/ > > Like for example here: > https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20220908184925.2714098-3-sireeshkodali1@gmail.com/ > Thanks! Guenter
On 09/09/2022 17:04, Guenter Roeck wrote: > On 9/9/22 07:56, Krzysztof Kozlowski wrote: >> On 09/09/2022 16:52, Guenter Roeck wrote: >>> Hi Krzysztof, >>> >>> On 9/9/22 07:49, Krzysztof Kozlowski wrote: >>>> On 09/09/2022 15:37, Ibrahim Tilki wrote: >>>>> Adding bindings for Analog Devices MAX31760 Fan-Speed Controller >>>>> >>>>> Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com> >>>>> --- >>>> >>>> >>>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >>>> >>>> Please wait with applying for Rob's bot to check it. >>>> >>> >>> I don't think I see those results unless there is a failure. >> >> That's correct. >> >>> Is there a link where I can look up the results ? >> >> It will pop-up on Patchwork: >> https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20220909133718.388213-4-Ibrahim.Tilki@analog.com/ And there is a failure - the bindings were not tested before sending. :( The error is visible when testing locally, although syntax in general looks fine. Un-reviewed. Best regards, Krzysztof
On Fri, 09 Sep 2022 16:37:17 +0300, Ibrahim Tilki wrote: > Adding bindings for Analog Devices MAX31760 Fan-Speed Controller > > Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com> > --- > .../bindings/hwmon/adi,max31760.yaml | 44 +++++++++++++++++++ > 1 file changed, 44 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/adi,max31760.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: ./Documentation/devicetree/bindings/hwmon/adi,max31760.yaml: error checking schema file /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/hwmon/adi,max31760.yaml: ignoring, error in schema: properties: reg Documentation/devicetree/bindings/hwmon/adi,max31760.example.dtb:0:0: /example-0/i2c/fan-controller@50: failed to match any schema with compatible: ['adi,max31760'] 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 Fri, Sep 09, 2022 at 11:26:29AM -0500, Rob Herring wrote:
> On Fri, 09 Sep 2022 16:37:17 +0300, Ibrahim Tilki wrote:
> > Adding bindings for Analog Devices MAX31760 Fan-Speed Controller
> >
> > Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com>
> > ---
> > .../bindings/hwmon/adi,max31760.yaml | 44 +++++++++++++++++++
> > 1 file changed, 44 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/hwmon/adi,max31760.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:
> ./Documentation/devicetree/bindings/hwmon/adi,max31760.yaml: error checking schema file
Not sure why the error is useless ATM. I'm checking that.
The problem is that 'reg' is a matrix and you need to either fully
define it or use the simplified form for a single cell:
reg:
minimum: 0x50
maximum: 0x57
The full, expanded form is:
reg:
items:
- items:
- minimum: 0x50
maximum: 0x57
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/hwmon/adi,max31760.yaml: ignoring, error in schema: properties: reg
> Documentation/devicetree/bindings/hwmon/adi,max31760.example.dtb:0:0: /example-0/i2c/fan-controller@50: failed to match any schema with compatible: ['adi,max31760']
This will go away when the schema passes checks.
Rob
On 09/09/2022 18:47, Rob Herring wrote: > On Fri, Sep 09, 2022 at 11:26:29AM -0500, Rob Herring wrote: >> On Fri, 09 Sep 2022 16:37:17 +0300, Ibrahim Tilki wrote: >>> Adding bindings for Analog Devices MAX31760 Fan-Speed Controller >>> >>> Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com> >>> --- >>> .../bindings/hwmon/adi,max31760.yaml | 44 +++++++++++++++++++ >>> 1 file changed, 44 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/hwmon/adi,max31760.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: >> ./Documentation/devicetree/bindings/hwmon/adi,max31760.yaml: error checking schema file > > Not sure why the error is useless ATM. I'm checking that. > > The problem is that 'reg' is a matrix and you need to either fully > define it or use the simplified form for a single cell: > > reg: > minimum: 0x50 > maximum: 0x57 I think this was in v7, so I understand that schema in that case expects the third option from anyOf - #/single? https://github.com/devicetree-org/dt-schema/blob/main/dtschema/meta-schemas/cell.yaml#L62 Best regards, Krzysztof
> On Fri, Sep 09, 2022 at 11:26:29AM -0500, Rob Herring wrote:
> > On Fri, 09 Sep 2022 16:37:17 +0300, Ibrahim Tilki wrote:
> > > Adding bindings for Analog Devices MAX31760 Fan-Speed Controller
> > >
> > > Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com>
> > > ---
> > > .../bindings/hwmon/adi,max31760.yaml | 44 +++++++++++++++++++
> > > 1 file changed, 44 insertions(+)
> > > create mode 100644
> > > Documentation/devicetree/bindings/hwmon/adi,max31760.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:
> > ./Documentation/devicetree/bindings/hwmon/adi,max31760.yaml: error
> > checking schema file
>
> Not sure why the error is useless ATM. I'm checking that.
>
> The problem is that 'reg' is a matrix and you need to either fully define it or use the simplified form for a single cell:
>
> reg:
> minimum: 0x50
> maximum: 0x57
>
> The full, expanded form is:
>
> reg:
> items:
> - items:
> - minimum: 0x50
> maximum: 0x57
>
Actually it passes the check when I remove maxItems property:
reg:
description: I2C address of slave device.
items:
minimum: 0x50
maximum: 0x57
I cannot find a way to specify both maxItems and min-max limits.
Which one should I drop? Line below is from the output of dt_bindigs_check:
hint: "maxItems" is not needed with an "items" list
Regards,
Ibrahim
> > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/binding
> > s/hwmon/adi,max31760.yaml: ignoring, error in schema: properties: reg
>
> > Documentation/devicetree/bindings/hwmon/adi,max31760.example.dtb:0:0:
> > /example-0/i2c/fan-controller@50: failed to match any schema with
> > compatible: ['adi,max31760']
>
> This will go away when the schema passes checks.
>
> Rob
On 09/09/2022 19:48, Tilki, Ibrahim wrote: ded form is: >> >> reg: >> items: >> - items: >> - minimum: 0x50 >> maximum: 0x57 >> > > Actually it passes the check when I remove maxItems property: > > reg: > description: I2C address of slave device. > items: > minimum: 0x50 > maximum: 0x57 > > I cannot find a way to specify both maxItems and min-max limits. > Which one should I drop? Line below is from the output of dt_bindigs_check: > > hint: "maxItems" is not needed with an "items" list Use Rob's first syntax: reg: minimum: 0x50 maximum: 0x57 (this will expect only one item) Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.