mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/16] iio: frequency: ad9523: add firmware support
@ 2026-11-30 17:36 Nuno Sá
  2026-11-30 17:36 ` [PATCH 01/16] iio: frequency: ad9523: fix out of bounds access of vco_out_map Nuno Sá
                   ` (15 more replies)
  0 siblings, 16 replies; 18+ messages in thread
From: Nuno Sá @ 2026-11-30 17:36 UTC (permalink / raw)
  To: linux-iio, linux-kernel, devicetree
  Cc: Jonathan Cameron, Michael Hennerich, David Lechner,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, linux

The ad9523 driver can only be configured through platform data, and
nothing in tree provides it, so the driver can't really be used. This
series adds a binding and firmware support, and drops the platform data
header.

The first patches fix issues found along the way: an out of bounds
access of vco_out_map[] for channels 10 to 13, channels 4 to 9 being
switched to a powered down M2 divider, and a wrong choice between the
M1 and M2 dividers when setting their frequency.

Then:
- The GPIOs are handled with their real (active low) polarity.
- Following what was done for other drivers, the platform data is first
  moved into the driver and renamed to config. Options with no use are
  then dropped before the firmware conversion: PLL1 is always bypassed,
  as downstream users only run the device in single loop mode, and
  some unused channel options go away. Channel names are exposed
  through labels instead of extend_name.
- The binding and the firmware support. The PLL2 dividers are computed
  from the M1 output frequency, with the reference divider and doubler
  given in firmware since they depend on the loop filter design, as
  done for other PLLs.
- The dividers are synced at the end of probe, as the datasheet
  recommends after the VCO calibration.
- Finally, the device can act as a clock provider. In that case the
  outputs are only controlled through the clock framework, like other
  IIO frequency drivers do.

An LLM was used to help me put this series together. Also to mention
that this is just build tested! Given that I'm fairly sure this won't
land on v1, I chose to send it untested while trying to get my hands to
real HW.

---
Nuno Sá (16):
      iio: frequency: ad9523: fix out of bounds access of vco_out_map
      iio: frequency: ad9523: don't select a powered down M2 divider
      iio: frequency: ad9523: fix the M2 divider selection
      iio: frequency: ad9523: fix GPIO polarity handling
      iio: frequency: ad9523: factor out the channel divider calculation
      MAINTAINERS: add an entry for the AD9523 driver
      iio: frequency: ad9523: move the platform data into the driver
      iio: frequency: ad9523: rename the platform data to config
      iio: frequency: ad9523: always bypass PLL1
      iio: frequency: ad9523: drop unused channel options
      iio: frequency: ad9523: use read_label() for channel names
      dt-bindings: iio: frequency: Add AD9523-1
      iio: frequency: ad9523: add firmware support and drop platform data
      iio: frequency: ad9523: sync the dividers at the end of probe
      iio: frequency: ad9523: split the clock source selection
      iio: frequency: ad9523: add clock provider support

 .../bindings/iio/frequency/adi,ad9523-1.yaml       | 289 ++++++++
 MAINTAINERS                                        |  10 +
 drivers/iio/frequency/Kconfig                      |   2 +-
 drivers/iio/frequency/ad9523.c                     | 802 ++++++++++++++++++---
 include/linux/iio/frequency/ad9523.h               | 194 -----
 5 files changed, 985 insertions(+), 312 deletions(-)
---
base-commit: b70566610b48ba49dec636019da4d696db64b085
change-id: 20261112-iio-ad9523-fw-31e189054b61
--

Thanks!
- Nuno Sá


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

end of thread, other threads:[~2026-11-30 18:51 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 17:36 [PATCH 00/16] iio: frequency: ad9523: add firmware support Nuno Sá
2026-11-30 17:36 ` [PATCH 01/16] iio: frequency: ad9523: fix out of bounds access of vco_out_map Nuno Sá
2026-11-30 17:37 ` [PATCH 02/16] iio: frequency: ad9523: don't select a powered down M2 divider Nuno Sá
2026-11-30 17:37 ` [PATCH 03/16] iio: frequency: ad9523: fix the M2 divider selection Nuno Sá
2026-11-30 17:37 ` [PATCH 04/16] iio: frequency: ad9523: fix GPIO polarity handling Nuno Sá
2026-11-30 17:37 ` [PATCH 05/16] iio: frequency: ad9523: factor out the channel divider calculation Nuno Sá
2026-11-30 17:37 ` [PATCH 06/16] MAINTAINERS: add an entry for the AD9523 driver Nuno Sá
2026-11-30 17:37 ` [PATCH 07/16] iio: frequency: ad9523: move the platform data into the driver Nuno Sá
2026-11-30 17:37 ` [PATCH 08/16] iio: frequency: ad9523: rename the platform data to config Nuno Sá
2026-11-30 17:37 ` [PATCH 09/16] iio: frequency: ad9523: always bypass PLL1 Nuno Sá
2026-11-30 17:37 ` [PATCH 10/16] iio: frequency: ad9523: drop unused channel options Nuno Sá
2026-11-30 17:37 ` [PATCH 11/16] iio: frequency: ad9523: use read_label() for channel names Nuno Sá
2026-11-30 17:37 ` [PATCH 12/16] dt-bindings: iio: frequency: Add AD9523-1 Nuno Sá
2026-11-30 18:50   ` Conor Dooley
2026-11-30 17:37 ` [PATCH 13/16] iio: frequency: ad9523: add firmware support and drop platform data Nuno Sá
2026-11-30 17:37 ` [PATCH 14/16] iio: frequency: ad9523: sync the dividers at the end of probe Nuno Sá
2026-11-30 17:37 ` [PATCH 15/16] iio: frequency: ad9523: split the clock source selection Nuno Sá
2026-11-30 17:37 ` [PATCH 16/16] iio: frequency: ad9523: add clock provider support Nuno Sá

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®