iio: adc: ad4170-4: Add clock provider support
authorMarcelo Schmitt <marcelo.schmitt@analog.com>
Mon, 7 Jul 2025 13:53:27 +0000 (10:53 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 14 Jul 2025 18:20:52 +0000 (19:20 +0100)
commit4e5fde6677829652c8159b713e8e3866f68af0a9
treed4e9ba3e40656237c51c6fe255d9d1a28e636014
parent602a89566cf2b6e6db0da5c7c020e77e276369c2
iio: adc: ad4170-4: Add clock provider support

The AD4170-4 chip can use an externally supplied clock at the XTAL2 pin, or
an external crystal connected to the XTAL1 and XTAL2 pins. Alternatively,
the AD4170-4 can provide its 16 MHz internal clock at the XTAL2 pin. In
addition, the chip has a programmable clock divider that allows dividing
the external or internal clock frequency, however, control for that is not
provided in this patch. Extend the AD4170-4 driver so it effectively uses
the provided external clock, if any, or supplies its own clock as a clock
provider.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://patch.msgid.link/68697c7613b1a69d752e541caef28d08b3e59bc1.1751895245.git.marcelo.schmitt@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/Kconfig
drivers/iio/adc/ad4170-4.c