devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] iio: adc: ad7124: proper clock support
@ 2025-07-24 23:25 David Lechner
  2025-07-24 23:25 ` [PATCH 1/4] dt-bindings: iio: adc: adi,ad7124: fix clocks properties David Lechner
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: David Lechner @ 2025-07-24 23:25 UTC (permalink / raw)
  To: Michael Hennerich, Jonathan Cameron, Nuno Sá,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-iio, devicetree, linux-kernel, David Lechner

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@baylibre.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-07-29 18:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 23:25 [PATCH 0/4] iio: adc: ad7124: proper clock support David Lechner
2025-07-24 23:25 ` [PATCH 1/4] dt-bindings: iio: adc: adi,ad7124: fix clocks properties David Lechner
2025-07-25 23:27   ` Rob Herring (Arm)
2025-07-24 23:25 ` [PATCH 2/4] iio: adc: ad7124: do not require mclk David Lechner
2025-07-27 12:21   ` Jonathan Cameron
2025-07-29 16:08     ` David Lechner
2025-07-29 18:42       ` Jonathan Cameron
2025-07-24 23:25 ` [PATCH 3/4] iio: adc: ad7124: add external clock support David Lechner
2025-07-27 12:24   ` Jonathan Cameron
2025-07-24 23:25 ` [PATCH 4/4] iio: adc: ad7124: add clock output support David Lechner
2025-07-27 12:29   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).