[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <jnwhdddmz3voorm7ywsxlax336leapxh4nhfwivvp7mjnrdi3e@f5v3ygkpwrjs>
Date: Mon, 28 Jul 2025 15:51:25 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Ioana Risteiu <Ioana.Risteiu@...log.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>, Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>, 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>,
Ramona Nechita <ramona.nechita@...log.com>, linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] iio: adc: adi-axi-adc: Add support for ad777x
On Mon, Jul 28, 2025 at 04:43:34PM +0300, Ioana Risteiu wrote:
> Add new compatible string and corresponding iio_backend_ops for AD777x
> axi family.
>
> Signed-off-by: Ioana Risteiu <Ioana.Risteiu@...log.com>
> ---
> drivers/iio/adc/adi-axi-adc.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c
> index 2d86bb0e08a7..c4b8ec6d9397 100644
> --- a/drivers/iio/adc/adi-axi-adc.c
> +++ b/drivers/iio/adc/adi-axi-adc.c
> @@ -670,6 +670,25 @@ static const struct iio_backend_info axi_ad408x = {
> .ops = &adi_ad408x_ops,
> };
>
> +static const struct iio_backend_ops adi_ad777x_ops = {
> + .enable = axi_adc_enable,
> + .disable = axi_adc_disable,
> + .chan_enable = axi_adc_chan_enable,
> + .chan_disable = axi_adc_chan_disable,
> + .request_buffer = axi_adc_request_buffer,
> + .free_buffer = axi_adc_free_buffer,
> + .data_sample_trigger = axi_adc_data_sample_trigger,
> + .chan_status = axi_adc_chan_status,
> + .debugfs_reg_access = iio_backend_debugfs_ptr(axi_adc_reg_access),
> + .debugfs_print_chan_status = iio_backend_debugfs_ptr(axi_adc_debugfs_print_chan_status),
> + .num_lanes_set = axi_adc_num_lanes_set,
> +};
Hmm looking at the above I wonder about the specific compatible? We
could add one if we want to have more strict validation on the possible 'num_lanes' passed
into axi_adc_num_lanes_set().
- Nuno Sá
> +
> +static const struct iio_backend_info axi_ad777x = {
> + .name = "axi-ad777x",
> + .ops = &adi_ad777x_ops,
> +};
> +
> static int adi_axi_adc_probe(struct platform_device *pdev)
> {
> struct adi_axi_adc_state *st;
> @@ -790,12 +809,18 @@ static const struct axi_adc_info adi_axi_ad408x = {
> .backend_info = &axi_ad408x,
> };
>
> +static const struct axi_adc_info adi_axi_ad777x = {
> + .version = ADI_AXI_PCORE_VER(10, 0, 'a'),
> + .backend_info = &axi_ad777x,
> +};
> +
> /* Match table for of_platform binding */
> static const struct of_device_id adi_axi_adc_of_match[] = {
> { .compatible = "adi,axi-adc-10.0.a", .data = &adc_generic },
> { .compatible = "adi,axi-ad408x", .data = &adi_axi_ad408x },
> { .compatible = "adi,axi-ad485x", .data = &adi_axi_ad485x },
> { .compatible = "adi,axi-ad7606x", .data = &adc_ad7606 },
> + { .compatible = "adi,axi-ad777x", .data = &adi_axi_ad777x},
> { }
> };
> MODULE_DEVICE_TABLE(of, adi_axi_adc_of_match);
> --
> 2.47.2
>
Powered by blists - more mailing lists