[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250724-iio-adc-ad7124-proper-clock-support-v1-0-88f35db2fcaf@baylibre.com>
Date: Thu, 24 Jul 2025 18:25:21 -0500
From: David Lechner <dlechner@...libre.com>
To: Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, David Lechner <dlechner@...libre.com>
Subject: [PATCH 0/4] iio: adc: ad7124: proper clock support
I started looking at adding some new features to the AD7124 driver and
noticed that the clock support was not quite right. The devicetree
bindings had a required "mclk" clock. MCLK is actually the name of an
internal counter in the ADC and also the name of the external clock
connection on the evaluation boards, so I guess it came from one or the
other of those. However, what the hardware actually has is a CLK pin
that can be wired up in one of three ways: not connected, input or
output. So the existing bindings making the clock required don't make
sense.
Furthermore, when looking at how this clock was being used in the
driver, I found that essentially this was being used as a way to
select the power mode of the ADC which is not at all how devicetree
bindings are supposed to work. The clock rate is fixed and the power
mode can change no matter what type of clock is being used. Again,
this just doesn't make sense.
So here is a series to fix the devicetree bindings and actually
implement proper clock support in the driver.
---
David Lechner (4):
dt-bindings: iio: adc: adi,ad7124: fix clocks properties
iio: adc: ad7124: do not require mclk
iio: adc: ad7124: add external clock support
iio: adc: ad7124: add clock output support
.../devicetree/bindings/iio/adc/adi,ad7124.yaml | 21 +++-
drivers/iio/adc/ad7124.c | 134 +++++++++++++++++----
2 files changed, 129 insertions(+), 26 deletions(-)
---
base-commit: ad59285dadaa0c0e54f5c30c7d0fb282b06e14a7
change-id: 20250723-iio-adc-ad7124-proper-clock-support-7249022a7349
Best regards,
--
David Lechner <dlechner@...libre.com>
Powered by blists - more mailing lists