]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dt-bindings: iio: adc: adi,ad7124: fix clocks properties
authorDavid Lechner <dlechner@baylibre.com>
Thu, 28 Aug 2025 21:54:52 +0000 (16:54 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 30 Aug 2025 19:45:20 +0000 (20:45 +0100)
commita52bdee13ed77f02dfd902baeb0eae876846672e
treedf9bd09ffba1fa62ac7bf1f8b459989a0acb74bc
parent6c2a7d221f4cd8110646b448d5ebb89db6676472
dt-bindings: iio: adc: adi,ad7124: fix clocks properties

Use correct clocks properties for the AD7124 family of ADCs.

These ADCs have an internal clock along with an optional external clock
that can be connected to the CLK pin. This pin can be wired up 3 ways:
1. Not connected - the internal clock is used.
2. Connected to an external clock (input) - the external clock is used.
3. Connected to the CLK pin on another ADC (output) - the internal clock
   is used on one and the other is configured for an external clock.

The new bindings describe these 3 cases by picking one of the following:
1. Omit both clocks and #clock-cells properties.
2. Include only the clocks property with a phandle to the external clock.
3. Include only the #clock-cells property on the ADC providing the output.

The clock-names property is now deprecated and should not be used. The
MCLK signal that it refers to is an internal counter in the ADC and
therefore does not make sense as a devicetree property as it can't be
connected to anything external to the ADC. Since there is only one
possible external clock, the clock-names property is not needed anyway.
Based on the implementation of the Linux driver, it looks like the
"mclk" clock was basically being used as a control to select the power
mode of the ADC, which is not something that should be done in the
devicetree.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250828-iio-adc-ad7124-proper-clock-support-v3-1-0b317b4605e5@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml