diff mbox series

[v2,2/3] dt-bindings: iio: io-channel-mux: Add property for settle time

Message ID 20211007134641.13417-3-vincent.whitchurch@axis.com
State Not Applicable, archived
Headers show
Series Add settle time support to iio-mux | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success
robh/dtbs-check fail build log

Commit Message

Vincent Whitchurch Oct. 7, 2021, 1:46 p.m. UTC
Hardware may require some time for the muxed analog signals to settle
after the muxing is changed.  Allow this time to be specified in the
devicetree.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
---
 .../devicetree/bindings/iio/multiplexer/io-channel-mux.yaml  | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Rob Herring (Arm) Oct. 8, 2021, 2:46 a.m. UTC | #1
On Thu, 07 Oct 2021 15:46:40 +0200, Vincent Whitchurch wrote:
> Hardware may require some time for the muxed analog signals to settle
> after the muxing is changed.  Allow this time to be specified in the
> devicetree.
> 
> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
> ---
>  .../devicetree/bindings/iio/multiplexer/io-channel-mux.yaml  | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1537724


adc0mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc10mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc11mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc12mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc13mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc1mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc2mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc3mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc4mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc5mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc6mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc7mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc8mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

adc9mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml

envelope-detector-mux: channels: ['', '', 'sync-1', 'in', 'out', 'sync-2', 'sys-reg', 'ana-reg'] has non-unique elements
	arch/arm/boot/dts/at91-tse850-3.dt.yaml
Vincent Whitchurch Oct. 8, 2021, 1:56 p.m. UTC | #2
On Fri, Oct 08, 2021 at 04:46:12AM +0200, Rob Herring wrote:
> On Thu, 07 Oct 2021 15:46:40 +0200, Vincent Whitchurch wrote:
> > Hardware may require some time for the muxed analog signals to settle
> > after the muxing is changed.  Allow this time to be specified in the
> > devicetree.
> > 
> > Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
> > ---
> >  .../devicetree/bindings/iio/multiplexer/io-channel-mux.yaml  | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> 
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.

Yes, these are not new warnings.

> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
> 
> Full log is available here: https://patchwork.ozlabs.org/patch/1537724
> 
> 
> adc0mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
> 	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml
> 
> adc10mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
> 	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml
[...]

I think the fix for these is to add a "#io-channel-cells": const 1 to
the schema.

> envelope-detector-mux: channels: ['', '', 'sync-1', 'in', 'out', 'sync-2', 'sys-reg', 'ana-reg'] has non-unique elements
> 	arch/arm/boot/dts/at91-tse850-3.dt.yaml

This one looks like an error in that particular devicetree.
Peter Rosin Oct. 8, 2021, 3:27 p.m. UTC | #3
On 2021-10-08 15:56, Vincent Whitchurch wrote:
> On Fri, Oct 08, 2021 at 04:46:12AM +0200, Rob Herring wrote:
>> On Thu, 07 Oct 2021 15:46:40 +0200, Vincent Whitchurch wrote:
>>> Hardware may require some time for the muxed analog signals to settle
>>> after the muxing is changed.  Allow this time to be specified in the
>>> devicetree.
>>>
>>> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
>>> ---
>>>  .../devicetree/bindings/iio/multiplexer/io-channel-mux.yaml  | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>
>> Running 'make dtbs_check' with the schema in this patch gives the
>> following warnings. Consider if they are expected or the schema is
>> incorrect. These may not be new warnings.
> 
> Yes, these are not new warnings.
> 
>> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
>> This will change in the future.
>>
>> Full log is available here: https://patchwork.ozlabs.org/patch/1537724
>>
>>
>> adc0mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
>> 	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml
>>
>> adc10mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
>> 	arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml
> [...]
> 
> I think the fix for these is to add a "#io-channel-cells": const 1 to
> the schema.

Agreed.

>> envelope-detector-mux: channels: ['', '', 'sync-1', 'in', 'out', 'sync-2', 'sys-reg', 'ana-reg'] has non-unique elements
>> 	arch/arm/boot/dts/at91-tse850-3.dt.yaml
> 
> This one looks like an error in that particular devicetree.
> 
The double '' is intentional; this mux is 8-way but only 6 legs are
connected, with the first two unused. I don't know how or where to make
changes to dodge the warning. I don't want to put names on things that
do not exist, and the iio-mux driver is using empty names as a hint to
not configure any child channel for those indices that have empty names.
If e.g. channels 0-5 are in use, then this is not a problem since you
can just end early with 6 names instead of 8, but alas, channels 2-7
was what the hw-crowd fancied in this case.

Cheers,
Peter
Rob Herring (Arm) Oct. 8, 2021, 7:13 p.m. UTC | #4
On Fri, Oct 8, 2021 at 10:27 AM Peter Rosin <peda@axentia.se> wrote:
>
> On 2021-10-08 15:56, Vincent Whitchurch wrote:
> > On Fri, Oct 08, 2021 at 04:46:12AM +0200, Rob Herring wrote:
> >> On Thu, 07 Oct 2021 15:46:40 +0200, Vincent Whitchurch wrote:
> >>> Hardware may require some time for the muxed analog signals to settle
> >>> after the muxing is changed.  Allow this time to be specified in the
> >>> devicetree.
> >>>
> >>> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
> >>> ---
> >>>  .../devicetree/bindings/iio/multiplexer/io-channel-mux.yaml  | 5 +++++
> >>>  1 file changed, 5 insertions(+)
> >>>
> >>
> >> Running 'make dtbs_check' with the schema in this patch gives the
> >> following warnings. Consider if they are expected or the schema is
> >> incorrect. These may not be new warnings.
> >
> > Yes, these are not new warnings.
> >
> >> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> >> This will change in the future.
> >>
> >> Full log is available here: https://patchwork.ozlabs.org/patch/1537724
> >>
> >>
> >> adc0mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
> >>      arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml
> >>
> >> adc10mux: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
> >>      arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dt.yaml
> > [...]
> >
> > I think the fix for these is to add a "#io-channel-cells": const 1 to
> > the schema.
>
> Agreed.
>
> >> envelope-detector-mux: channels: ['', '', 'sync-1', 'in', 'out', 'sync-2', 'sys-reg', 'ana-reg'] has non-unique elements
> >>      arch/arm/boot/dts/at91-tse850-3.dt.yaml
> >
> > This one looks like an error in that particular devicetree.
> >
> The double '' is intentional; this mux is 8-way but only 6 legs are
> connected, with the first two unused. I don't know how or where to make
> changes to dodge the warning. I don't want to put names on things that
> do not exist, and the iio-mux driver is using empty names as a hint to
> not configure any child channel for those indices that have empty names.
> If e.g. channels 0-5 are in use, then this is not a problem since you
> can just end early with 6 names instead of 8, but alas, channels 2-7
> was what the hw-crowd fancied in this case.

There's a specific string type for this: non-unique-string-array

Unfortunately, no way to say unique or empty strings.

Rob
Rob Herring (Arm) Oct. 18, 2021, 7:52 p.m. UTC | #5
On Thu, 07 Oct 2021 15:46:40 +0200, Vincent Whitchurch wrote:
> Hardware may require some time for the muxed analog signals to settle
> after the muxing is changed.  Allow this time to be specified in the
> devicetree.
> 
> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
> ---
>  .../devicetree/bindings/iio/multiplexer/io-channel-mux.yaml  | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.yaml b/Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.yaml
index 870b043406d8..5a7328042c76 100644
--- a/Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.yaml
+++ b/Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.yaml
@@ -39,6 +39,11 @@  properties:
     description:
       List of strings, labeling the mux controller states.
 
+  settle-time-us:
+    default: 0
+    description:
+      Time required for analog signals to settle after muxing.
+
 required:
   - compatible
   - io-channels