diff mbox series

[v3,1/3] dt-bindings: i2c: mpc: Mark "fsl,timeout" as deprecated

Message ID 20230312233613.303408-2-andi.shyti@kernel.org
State Superseded
Headers show
Series Add the clock stretching i2c property | expand

Commit Message

Andi Shyti March 12, 2023, 11:36 p.m. UTC
Now we have the i2c-scl-clk-low-timeout-ms property defined in
the i2c schema.

Mark "fsl,timeout" as deprecated and update the example.

Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
---
 Documentation/devicetree/bindings/i2c/i2c-mpc.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Rob Herring (Arm) March 14, 2023, 2:10 p.m. UTC | #1
On Mon, 13 Mar 2023 00:36:11 +0100, Andi Shyti wrote:
> Now we have the i2c-scl-clk-low-timeout-ms property defined in
> the i2c schema.
> 
> Mark "fsl,timeout" as deprecated and update the example.
> 
> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-mpc.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

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/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/i2c-mpc.example.dtb: i2c@3100: Unevaluated properties are not allowed ('i2c-scl-clk-low-timeout-ms' was unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/i2c-mpc.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230312233613.303408-2-andi.shyti@kernel.org

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.
Krzysztof Kozlowski March 14, 2023, 2:19 p.m. UTC | #2
On 14/03/2023 15:10, Rob Herring wrote:
> 
> On Mon, 13 Mar 2023 00:36:11 +0100, Andi Shyti wrote:
>> Now we have the i2c-scl-clk-low-timeout-ms property defined in
>> the i2c schema.
>>
>> Mark "fsl,timeout" as deprecated and update the example.
>>
>> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
>> ---
>>  Documentation/devicetree/bindings/i2c/i2c-mpc.yaml | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
> 
> 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/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/i2c-mpc.example.dtb: i2c@3100: Unevaluated properties are not allowed ('i2c-scl-clk-low-timeout-ms' was unexpected)

That's expected as it depends on:
https://github.com/devicetree-org/dt-schema/pull/102

Best regards,
Krzysztof
Krzysztof Kozlowski March 14, 2023, 2:21 p.m. UTC | #3
On 13/03/2023 00:36, Andi Shyti wrote:
> Now we have the i2c-scl-clk-low-timeout-ms property defined in
> the i2c schema.
> 
> Mark "fsl,timeout" as deprecated and update the example.
> 
> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-mpc.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Krzysztof Kozlowski March 14, 2023, 2:22 p.m. UTC | #4
On 14/03/2023 15:21, Krzysztof Kozlowski wrote:
> On 13/03/2023 00:36, Andi Shyti wrote:
>> Now we have the i2c-scl-clk-low-timeout-ms property defined in
>> the i2c schema.
>>
>> Mark "fsl,timeout" as deprecated and update the example.
>>
>> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
>> ---
>>  Documentation/devicetree/bindings/i2c/i2c-mpc.yaml | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

...

and unreviewed. Are you sure these are using same units? Old code used us.

Your example:
	i2c-scl-clk-low-timeout-ms = <10000>;

10s timeout?

Best regards,
Krzysztof
Andi Shyti March 14, 2023, 2:36 p.m. UTC | #5
On Tue, Mar 14, 2023 at 03:22:19PM +0100, Krzysztof Kozlowski wrote:
> On 14/03/2023 15:21, Krzysztof Kozlowski wrote:
> > On 13/03/2023 00:36, Andi Shyti wrote:
> >> Now we have the i2c-scl-clk-low-timeout-ms property defined in
> >> the i2c schema.
> >>
> >> Mark "fsl,timeout" as deprecated and update the example.
> >>
> >> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
> >> ---
> >>  Documentation/devicetree/bindings/i2c/i2c-mpc.yaml | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> > 
> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ...
> 
> and unreviewed. Are you sure these are using same units? Old code used us.
> 
> Your example:
> 	i2c-scl-clk-low-timeout-ms = <10000>;
> 
> 10s timeout?

ops!

I will keep it ms, if anyone doesn't have anything against. The
clock stretching goes in order of milliseconds and in any case
doesn't need to be precisely that, as long as it's longer.

I don't see any need for it to be us... if it 12500us, let it be
13ms.

I will update the example.

Can I keep your r-b with:

	i2c-scl-clk-low-timeout-ms = <10>;

?

Thanks for noticing it, it would have been a wacky mistake,
Andi
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mpc.yaml b/Documentation/devicetree/bindings/i2c/i2c-mpc.yaml
index 018e1b944424..bd2dd82471c1 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mpc.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-mpc.yaml
@@ -43,6 +43,7 @@  properties:
 
   fsl,timeout:
     $ref: /schemas/types.yaml#/definitions/uint32
+    deprecated: true
     description: |
       I2C bus timeout in microseconds
 
@@ -95,6 +96,6 @@  examples:
         interrupts = <43 2>;
         interrupt-parent = <&mpic>;
         clock-frequency = <400000>;
-        fsl,timeout = <10000>;
+        i2c-scl-clk-low-timeout-ms = <10000>;
     };
 ...