diff mbox series

[v2,02/11] dt-bindings: media: i2c: max9286: Add property to select I2C speed

Message ID 20220101182806.19311-3-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series media: i2c: max9286: Small new features | expand

Commit Message

Laurent Pinchart Jan. 1, 2022, 6:27 p.m. UTC
The I2C speed on the remote side (the I2C master bus of the connected
serializers) is configurable, and doesn't need to match the speed of the
local bus (the slave bus of the MAX9286). All remote buses must use the
same speed, and the MAX9286 needs to be programmed accordingly. Add a
new DT property to select the speed to make it configurable.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .../devicetree/bindings/media/i2c/maxim,max9286.yaml       | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Rob Herring (Arm) Jan. 1, 2022, 10:01 p.m. UTC | #1
On Sat, 01 Jan 2022 20:27:57 +0200, Laurent Pinchart wrote:
> The I2C speed on the remote side (the I2C master bus of the connected
> serializers) is configurable, and doesn't need to match the speed of the
> local bus (the slave bus of the MAX9286). All remote buses must use the
> same speed, and the MAX9286 needs to be programmed accordingly. Add a
> new DT property to select the speed to make it configurable.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  .../devicetree/bindings/media/i2c/maxim,max9286.yaml       | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

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/media/i2c/maxim,max9286.yaml: properties:maxim,i2c-clock-frequency: 'oneOf' conditional failed, one must be fixed:
	'type' is a required property
		hint: A vendor boolean property can use "type: boolean"
	Additional properties are not allowed ('enum', 'default' were unexpected)
		hint: A vendor boolean property can use "type: boolean"
	Additional properties are not allowed ('default' was unexpected)
		hint: A vendor string property with exact values has an implicit type
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml: properties:maxim,i2c-clock-frequency: 'oneOf' conditional failed, one must be fixed:
		'$ref' is a required property
		'allOf' is a required property
		hint: A vendor property needs a $ref to types.yaml
		from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
	8470 is not of type 'string'
		hint: A vendor string property with exact values has an implicit type
	28300 is not of type 'string'
		hint: A vendor string property with exact values has an implicit type
	84700 is not of type 'string'
		hint: A vendor string property with exact values has an implicit type
	105000 is not of type 'string'
		hint: A vendor string property with exact values has an implicit type
	173000 is not of type 'string'
		hint: A vendor string property with exact values has an implicit type
	339000 is not of type 'string'
		hint: A vendor string property with exact values has an implicit type
	533000 is not of type 'string'
		hint: A vendor string property with exact values has an implicit type
	837000 is not of type 'string'
		hint: A vendor string property with exact values has an implicit type
	hint: Vendor specific properties must have a type and description unless they have a defined, common suffix.
	from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml: ignoring, error in schema: properties: maxim,i2c-clock-frequency
Documentation/devicetree/bindings/media/i2c/maxim,max9286.example.dt.yaml:0:0: /example-0/i2c@e66d8000/gmsl-deserializer@2c: failed to match any schema with compatible: ['maxim,max9286']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1574505

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.
Rob Herring (Arm) Jan. 4, 2022, 3:56 p.m. UTC | #2
On Sat, Jan 01, 2022 at 08:27:57PM +0200, Laurent Pinchart wrote:
> The I2C speed on the remote side (the I2C master bus of the connected
> serializers) is configurable, and doesn't need to match the speed of the
> local bus (the slave bus of the MAX9286). All remote buses must use the
> same speed, and the MAX9286 needs to be programmed accordingly. Add a
> new DT property to select the speed to make it configurable.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  .../devicetree/bindings/media/i2c/maxim,max9286.yaml       | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
> index c20557b52e45..5d3e99027a79 100644
> --- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
> @@ -50,6 +50,13 @@ properties:
>    '#gpio-cells':
>      const: 2
>  
> +  maxim,i2c-clock-frequency:

Use '-hz'. I don't see much reason to align with 'clock-frequency'.

Actually, I'd make this 'maxim,i2c-remote-bus-hz' or similar to be a bit 
more self-describing.

> +    enum: [ 8470, 28300, 84700, 105000, 173000, 339000, 533000, 837000 ]
> +    default: 105000
> +    description: |
> +      The I2C clock frequency for the remote I2C buses. The value must match
> +      the configuration of the remote serializers.
> +
>    maxim,reverse-channel-microvolt:
>      minimum: 30000
>      maximum: 200000
> -- 
> Regards,
> 
> Laurent Pinchart
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
index c20557b52e45..5d3e99027a79 100644
--- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
@@ -50,6 +50,13 @@  properties:
   '#gpio-cells':
     const: 2
 
+  maxim,i2c-clock-frequency:
+    enum: [ 8470, 28300, 84700, 105000, 173000, 339000, 533000, 837000 ]
+    default: 105000
+    description: |
+      The I2C clock frequency for the remote I2C buses. The value must match
+      the configuration of the remote serializers.
+
   maxim,reverse-channel-microvolt:
     minimum: 30000
     maximum: 200000