mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andrei Stancovici via B4 Relay
	<devnull+andrei.stancovici.analog.com@kernel.org>
Cc: andrei.stancovici@analog.com, "Nuno Sá" <nuno.sa@analog.com>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Liam Beguin" <liambeguin@gmail.com>,
	linux@analog.com, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] iio: adc: ltc2497: add LTC2493 support
Date: Sun, 18 Oct 2026 04:13:42 +0100	[thread overview]
Message-ID: <20261018041342.0c5dda2d@jic23-hlaptop> (raw)
In-Reply-To: <20261009-submission-ltc2493-support-v1-v1-2-3dad1d4b152a@analog.com>

On Fri, 09 Oct 2026 11:43:35 +0300
Andrei Stancovici via B4 Relay <devnull+andrei.stancovici.analog.com@kernel.org> wrote:

> From: Andrei Stancovici <andrei.stancovici@analog.com>
> 
> The LTC2493 is the 4-channel member of the LTC2499 family: 4 single-ended
> inputs or 2 differential pairs, with the same command format and 24-bit
> result. Add it with its own channel table.
> 
> Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/2493fe.pdf
> Signed-off-by: Andrei Stancovici <andrei.stancovici@analog.com>
Hi Andrei,

My only comment on here is 'where there are 16 and 4 channel similar chips,
an 8 channel and maybe even a 2 channel are likely to show up!'.

So upshot. Use an integer for number of channels instead of
that bool.
> diff --git a/drivers/iio/adc/ltc2497.h b/drivers/iio/adc/ltc2497.h
> index cee9a2f50b82..219f7d49854b 100644
> --- a/drivers/iio/adc/ltc2497.h
> +++ b/drivers/iio/adc/ltc2497.h
> @@ -31,6 +31,7 @@ struct ltc2497_chip_info {
>  	u32 resolution;
>  	bool has_temp;
>  	bool has_speed_mode;	/* SPD bit in the 2nd config byte (LTC2499/LTC2493) */
> +	bool four_channel;	/* 4 inputs (LTC2493) instead of 16 */

This feels like it will bite us in future. Can we instead just
encode the number of channels?  That will mean setting the value
to 16 for existing entrees but that doesn't seem too bad to me.

>  };
>  
>  struct ltc2497core_driverdata {
> 


  parent reply	other threads:[~2026-10-18  3:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09  8:43 [PATCH 0/6] iio: adc: ltc2497: add LTC2493 support and line-frequency rejection Andrei Stancovici via B4 Relay
2026-10-09  8:43 ` [PATCH 1/6] dt-bindings: iio: adc: lltc,ltc2497: add LTC2493 support Andrei Stancovici via B4 Relay
2026-10-09 12:06   ` Joshua Crofts
2026-10-09 14:45   ` Conor Dooley
2026-10-13 13:15   ` Nuno Sá
2026-10-09  8:43 ` [PATCH 2/6] iio: adc: ltc2497: " Andrei Stancovici via B4 Relay
2026-10-10  7:05   ` Joshua Crofts
2026-10-18  3:13   ` Jonathan Cameron [this message]
2026-10-09  8:43 ` [PATCH 3/6] iio: adc: ltc2497: add LTC2493 internal temperature channel Andrei Stancovici via B4 Relay
2026-10-13 13:15   ` Nuno Sá
2026-10-09  8:43 ` [PATCH 4/6] iio: adc: ltc2497: add 2x speed mode support for the LTC2493 Andrei Stancovici via B4 Relay
2026-10-09  8:43 ` [PATCH 5/6] iio: adc: ltc2497: add FA/FB line-frequency rejection selection Andrei Stancovici via B4 Relay
2026-10-18  3:28   ` Jonathan Cameron
2026-10-09  8:43 ` [PATCH 6/6] iio: adc: ltc2497: enable line-frequency rejection on LTC2493 Andrei Stancovici via B4 Relay
2026-10-18  3:30   ` Jonathan Cameron
2026-10-13 13:15 ` [PATCH 0/6] iio: adc: ltc2497: add LTC2493 support and line-frequency rejection Nuno Sá
2026-10-13 13:58   ` Andy Shevchenko
2026-10-13 15:09     ` Nuno Sá
2026-10-13 15:20       ` Andy Shevchenko
2026-10-18  3:17         ` 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=20261018041342.0c5dda2d@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andrei.stancovici@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=devnull+andrei.stancovici.analog.com@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=liambeguin@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@analog.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®