mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
	Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Nuno Sa <nuno.sa@analog.com>,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC v2 7/7] iio: ti-adc128s052: Drop variable vref
Date: Wed, 2 Apr 2025 15:49:01 -0500	[thread overview]
Message-ID: <c42b1dc3-34d9-4419-ae2e-5bacffa070b6@baylibre.com> (raw)
In-Reply-To: <dda9e0710a9293a9f52e64c092f79afd4b719536.1743573284.git.mazziesaccount@gmail.com>

On 4/2/25 1:10 AM, Matti Vaittinen wrote:
> According to Jonathan, variable reference voltages are very rare. It is
> unlikely it is needed, and supporting it makes the code a bit more
> complex.

There is also around 60 other drivers where we could do something like this
in case anyone is bored. :-p

> 
> Simplify the driver and drop the variable vref support.
> 
> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
> ---
> Revision History:
>  v2:
>   - New patch
> ---
>  drivers/iio/adc/ti-adc128s052.c | 29 ++++++-----------------------
>  1 file changed, 6 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
> index 0f93c6266527..0bfe4e558c69 100644
> --- a/drivers/iio/adc/ti-adc128s052.c
> +++ b/drivers/iio/adc/ti-adc128s052.c
> @@ -29,13 +29,12 @@ struct adc128_configuration {
>  struct adc128 {
>  	struct spi_device *spi;
>  
> -	struct regulator *reg;
>  	/*
>  	 * Serialize the SPI 'write-channel + read data' accesses and protect
>  	 * the shared buffer.
>  	 */
>  	struct mutex lock;
> -
> +	int vref;

Units in the name are helpful: vref_uv.

Could also consider doing division in probe and storing vref_mv instead
since we never use the microvolts part.

>  	union {
>  		__be16 rx_buffer;
>  		u8 tx_buffer[2];


  reply	other threads:[~2025-04-02 20:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  6:07 [PATCH v2 0/7] Support ROHM BD79104 ADC Matti Vaittinen
2025-04-02  6:08 ` [PATCH v2 1/7] dt-bindings: " Matti Vaittinen
2025-04-02  6:09 ` [PATCH v2 2/7] iio: adc: ti-adc128s052: Simplify using be16_to_cpu() Matti Vaittinen
2025-04-02 21:04   ` David Lechner
2025-04-03  5:16     ` Matti Vaittinen
2025-04-05 17:29       ` Jonathan Cameron
2025-04-07  5:23         ` Matti Vaittinen
2025-04-07 18:49           ` Jonathan Cameron
2025-04-02  6:09 ` [PATCH v2 3/7] iio: adc: ti-adc128s052: Be consistent with arrays Matti Vaittinen
2025-04-02  6:09 ` [PATCH v2 4/7] iio: adc: ti-adc128s052: Use devm_mutex_init() Matti Vaittinen
2025-04-02  6:09 ` [PATCH v2 5/7] iio: adc: ti-adc128s052: Simplify using guard(mutex) Matti Vaittinen
2025-04-02  6:10 ` [PATCH v2 6/7] iio: adc: ti-adc128s052: Support ROHM BD79104 Matti Vaittinen
2025-04-02  6:10 ` [PATCH RFC v2 7/7] iio: ti-adc128s052: Drop variable vref Matti Vaittinen
2025-04-02 20:49   ` David Lechner [this message]
2025-04-03  5:18     ` Matti Vaittinen
2025-04-05 16:25     ` Jonathan Cameron
2025-04-02  6:19 ` [PATCH v2 0/7] Support ROHM BD79104 ADC Matti Vaittinen
2025-04-05 17:36   ` 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=c42b1dc3-34d9-4419-ae2e-5bacffa070b6@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®