Re: [PATCH v3 06/10] iio: adc: ti-ads112c14: support external clock

From: Joshua Crofts

Date: Fri Sep 11 2026 - 04:39:45 EST


On Thu, 10 Sep 2026 16:13:05 -0500
"David Lechner (TI)" <dlechner@xxxxxxxxxxxx> wrote:

> Add support for an external clock source to the TI ADS112C14 ADC driver.
> The unused fclk_Hz field is added in preparation for filter support.
>
> Signed-off-by: David Lechner (TI) <dlechner@xxxxxxxxxxxx>
> ---
> drivers/iio/adc/ti-ads112c14.c | 39 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/drivers/iio/adc/ti-ads112c14.c b/drivers/iio/adc/ti-ads112c14.c
> index efea1e22d067..0e4584b4675e 100644
> --- a/drivers/iio/adc/ti-ads112c14.c
> +++ b/drivers/iio/adc/ti-ads112c14.c
> @@ -11,6 +11,7 @@
> #include <linux/bitfield.h>
> #include <linux/bitmap.h>
> #include <linux/cleanup.h>
> +#include <linux/clk.h>
> #include <linux/completion.h>
> #include <linux/crc8.h>
> #include <linux/delay.h>
> @@ -82,6 +83,8 @@
> #define ADS112C14_DEVICE_CFG_BOCS_10_uA 3
>
> #define ADS112C14_DEVICE_CFG_CLK_SEL BIT(3)
> +#define ADS112C14_DEVICE_CFG_CLK_SEL_INTERNAL 0
> +#define ADS112C14_DEVICE_CFG_CLK_SEL_EXTERNAL 1
> #define ADS112C14_DEVICE_CFG_CONV_MODE BIT(2)
> #define ADS112C14_DEVICE_CFG_CONV_MODE_CONTINUOUS 0
> #define ADS112C14_DEVICE_CFG_CONV_MODE_SINGLE_SHOT 1
> @@ -178,6 +181,8 @@ static const u32 ads112c14_pga_gains_x10[] = {
> 200, 320, 500, 640, 1000, 1280, 2000, 2560, /* 8 - 15 */
> };
>
> +#define ADS112C14_INTERNAL_CLK_Hz 4096000

4096 * KILO?

Otherwise LGTM.

Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>

--
Kind regards,
Joshua Crofts