Linux IIO development
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Lothar Rubusch <l.rubusch@gmail.com>,
	mazziesaccount@gmail.com, jic23@kernel.org, nuno.sa@analog.com,
	andy@kernel.org
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] iio: adc: ti-adc128s052: add support for adc121s021
Date: Fri, 27 Jun 2025 11:33:41 -0500	[thread overview]
Message-ID: <1a8dc586-6f22-4583-8692-084813f2df7d@baylibre.com> (raw)
In-Reply-To: <20250625170218.545654-2-l.rubusch@gmail.com>

On 6/25/25 12:02 PM, Lothar Rubusch wrote:
> Add support for the single channel variant(s) of this ADC.
> 
> Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
> ---
>  drivers/iio/adc/ti-adc128s052.c | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
> index 1b46a8155803..cf271c39e663 100644
> --- a/drivers/iio/adc/ti-adc128s052.c
> +++ b/drivers/iio/adc/ti-adc128s052.c
> @@ -7,6 +7,7 @@
>   * https://www.ti.com/lit/ds/symlink/adc128s052.pdf
>   * https://www.ti.com/lit/ds/symlink/adc122s021.pdf
>   * https://www.ti.com/lit/ds/symlink/adc124s021.pdf
> + * https://www.ti.com/lit/ds/symlink/adc121s021.pdf
>   */
>  
>  #include <linux/cleanup.h>
> @@ -110,6 +111,10 @@ static const struct iio_chan_spec adc128s052_channels[] = {
>  	ADC128_VOLTAGE_CHANNEL(7),
>  };
>  
> +static const struct iio_chan_spec adc121s021_channels[] = {
> +	ADC128_VOLTAGE_CHANNEL(0),
> +};
> +
>  static const struct iio_chan_spec adc122s021_channels[] = {
>  	ADC128_VOLTAGE_CHANNEL(0),
>  	ADC128_VOLTAGE_CHANNEL(1),
> @@ -143,6 +148,10 @@ static const struct adc128_configuration adc128_config[] = {
>  		.refname = "vdd",
>  		.other_regulators = &bd79104_regulators,
>  		.num_other_regulators = 1,
> +	}, {
> +		.channels = adc121s021_channels,
> +		.num_channels = ARRAY_SIZE(adc121s021_channels),
> +		.refname = "vref",
>  	},


Let's try to keep these sorted rather than having rohm in the middle
of ti chips.

Same applies to the rest of the changes in this patch as well (other
than adc121s021_channels[] which look to be in a logical order already).


>  };
>  
> @@ -207,7 +216,10 @@ static const struct of_device_id adc128_of_match[] = {
>  	{ .compatible = "ti,adc124s051", .data = &adc128_config[2] },
>  	{ .compatible = "ti,adc124s101", .data = &adc128_config[2] },
>  	{ .compatible = "rohm,bd79104", .data = &adc128_config[3] },
> -	{ }
> +	{ .compatible = "ti,adc121s021", .data = &adc128_config[4] },
> +	{ .compatible = "ti,adc121s051", .data = &adc128_config[4] },
> +	{ .compatible = "ti,adc121s101", .data = &adc128_config[4] },

We'll need another patch to add these compatible strings to
Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml

> +	{ },
>  };
>  MODULE_DEVICE_TABLE(of, adc128_of_match);
>  
> @@ -220,6 +232,9 @@ static const struct spi_device_id adc128_id[] = {
>  	{ "adc124s051", (kernel_ulong_t)&adc128_config[2] },
>  	{ "adc124s101", (kernel_ulong_t)&adc128_config[2] },
>  	{ "bd79104", (kernel_ulong_t)&adc128_config[3] },
> +	{ "adc121s021", (kernel_ulong_t)&adc128_config[4] },
> +	{ "adc121s051", (kernel_ulong_t)&adc128_config[4] },
> +	{ "adc121s101", (kernel_ulong_t)&adc128_config[4] },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(spi, adc128_id);


  parent reply	other threads:[~2025-06-27 16:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25 17:02 [PATCH v1 0/2] iio: adc: ti-adc128s052: add support for TI's ADC121s021 Lothar Rubusch
2025-06-25 17:02 ` [PATCH v1 1/2] iio: adc: ti-adc128s052: add support for adc121s021 Lothar Rubusch
2025-06-25 17:55   ` Andy Shevchenko
2025-06-26  5:24   ` Matti Vaittinen
2025-06-26 18:28     ` Jonathan Cameron
2025-06-26 21:33       ` Lothar Rubusch
2025-06-27 16:27         ` David Lechner
2025-06-28 15:29           ` Jonathan Cameron
2025-06-29  0:00       ` Sukrut Bellary
2025-06-29 16:13         ` Lothar Rubusch
2025-06-29 19:32           ` Sukrut Bellary
2025-06-27 16:33   ` David Lechner [this message]
2025-06-25 17:02 ` [PATCH v1 2/2] iio: adc: ti-adc128s052: replace literal by unit expression Lothar Rubusch
2025-06-25 17:57   ` Andy Shevchenko
2025-06-26 18:22     ` Jonathan Cameron
2025-06-26  5:07   ` Matti Vaittinen
2025-06-26 18:20     ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a8dc586-6f22-4583-8692-084813f2df7d@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=andy@kernel.org \
    --cc=jic23@kernel.org \
    --cc=l.rubusch@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mazziesaccount@gmail.com \
    --cc=nuno.sa@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox