Devicetree
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Kurt Borja" <kuurtb@gmail.com>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Linus Walleij" <linusw@kernel.org>,
	"Bartosz Golaszewski" <brgl@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3 2/9] iio: adc: add the ti-ads1262 driver
Date: Mon, 17 Aug 2026 11:22:23 +0300	[thread overview]
Message-ID: <aoLEv_txdTE7SqS3@ashevche-desk.local> (raw)
In-Reply-To: <20260816223029.0da04d1e@jic23-huawei>

On Sun, Aug 16, 2026 at 10:30:29PM +0100, Jonathan Cameron wrote:
> On Fri, 07 Aug 2026 22:58:24 -0500
> Kurt Borja <kuurtb@gmail.com> wrote:

...

> > +static const struct reg_default ads1262_reg_defaults[] = {
> > +	{ ADS1262_INTERFACE_REG,
> > +	  FIELD_PREP_CONST(ADS1262_INTERFACE_STATUS_MASK, true) |
> > +	  FIELD_PREP_CONST(ADS1262_INTERFACE_CRC_MASK, true) },
> > +	{ ADS1262_MODE0_REG,		0x00 },
> > +	{ ADS1262_MODE1_REG,
> > +	  FIELD_PREP_CONST(ADS1262_MODE1_FILTER_MASK, ADS1262_FILTER_FIR) },
> > +	{ ADS1262_MODE2_REG,
> > +	  FIELD_PREP_CONST(ADS1262_MODE2_DR_MASK, ADS1262_DR_20_SPS) },
> > +	{ ADS1262_INPMUX_REG,
> > +	  FIELD_PREP_CONST(ADS1262_INPMUX_MUXN_MASK, ADS1262_INPMUX_AIN1) },
> > +	{ ADS1262_IDACMUX_REG,
> > +	  FIELD_PREP_CONST(ADS1262_IDACMUX_MUX2_MASK, ADS1262_IDACMUX_NO_CONN) |
> > +	  FIELD_PREP_CONST(ADS1262_IDACMUX_MUX1_MASK, ADS1262_IDACMUX_NO_CONN) },
> > +	{ ADS1262_IDACMAG_REG,		0x00 },
> > +	{ ADS1262_REFMUX_REG,		0x00 },
> > +	{ ADS1262_TDACP_REG,		0x00 },
> > +	{ ADS1262_TDACN_REG,		0x00 },
> > +	{ ADS1262_GPIOCON_REG,		0x00 },
> > +	{ ADS1262_GPIODIR_REG,		0x00 },
> > +	{ ADS1262_ADC2CFG_REG,		0x00 },
> > +	{ ADS1262_ADC2MUX_REG,
> > +	  FIELD_PREP_CONST(ADS1262_ADC2MUX_MUXN2_MASK, ADS1262_INPMUX_AIN1) },
> > +};
> I'm not particularly keen on this formatting from a readability point of view.
> Maybe using named intializers would help:
> 
> static const struct reg_default ads1262_reg_defaults[] = {
> 	{ 
> 		.reg = ADS1262_INTERFACE_REG,
> 		.def = FIELD_PREP_CONST(ADS1262_INTERFACE_STATUS_MASK, true) |
> 		       FIELD_PREP_CONST(ADS1262_INTERFACE_CRC_MASK, true),

And looking at this, this has not to be booleans! Please, use proper integers
instead (I think 1 is what you wanted).

> //extra indent fine here for readability reasons if we end up with some long lines
> 	},
> 	{ .reg = ADS1262_MODE0_REG, .def = 0x00 },
> etc or just maybe use the more open form of the first element for all of them.
> burns a bunch of lines, but is easy to read. 

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-08-17  8:22 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08  3:58 [PATCH v3 0/9] iio: adc: Add TI ADS126X ADC family support Kurt Borja
2026-08-08  3:58 ` [PATCH v3 1/9] dt-bindings: iio: adc: support the TI ADS126x ADC family Kurt Borja
2026-08-08  4:08   ` sashiko-bot
2026-08-08 18:38   ` David Lechner
2026-08-09  8:26     ` Kurt Borja
2026-08-10 16:42       ` David Lechner
2026-08-11 20:30         ` Kurt Borja
2026-08-10  8:46   ` Bartosz Golaszewski
2026-08-11 21:29     ` Kurt Borja
2026-08-08  3:58 ` [PATCH v3 2/9] iio: adc: add the ti-ads1262 driver Kurt Borja
2026-08-08  4:11   ` sashiko-bot
2026-08-08 18:39   ` David Lechner
2026-08-09  8:26     ` Kurt Borja
2026-08-10 16:42       ` David Lechner
2026-08-11 20:28         ` Kurt Borja
2026-08-12 13:40           ` David Lechner
2026-08-10 18:48       ` Andy Shevchenko
2026-08-11 20:31         ` Kurt Borja
2026-08-08 22:28   ` Uwe Kleine-König
2026-08-09 16:24     ` Kurt Borja
2026-08-16 21:30   ` Jonathan Cameron
2026-08-17  8:22     ` Andy Shevchenko [this message]
2026-08-08  3:58 ` [PATCH v3 3/9] iio: adc: ti-ads1262: support per-channel sampling frequency Kurt Borja
2026-08-08  4:11   ` sashiko-bot
2026-08-08 18:39   ` David Lechner
2026-08-09  8:27     ` Kurt Borja
2026-08-16 21:34   ` Jonathan Cameron
2026-08-08  3:58 ` [PATCH v3 4/9] iio: adc: ti-ads1262: support per-channel reference and gain Kurt Borja
2026-08-08 18:39   ` David Lechner
2026-08-09  8:28     ` Kurt Borja
2026-08-08  3:58 ` [PATCH v3 5/9] iio: adc: ti-ads1262: support input chopping Kurt Borja
2026-08-08 18:39   ` David Lechner
2026-08-08  3:58 ` [PATCH v3 6/9] iio: adc: ti-ads1262: support excitation currents Kurt Borja
2026-08-08  4:13   ` sashiko-bot
2026-08-08 18:39   ` David Lechner
2026-08-16 21:42   ` Jonathan Cameron
2026-08-08  3:58 ` [PATCH v3 7/9] iio: adc: ti-ads1262: support triggered buffer sampling Kurt Borja
2026-08-08  4:09   ` sashiko-bot
2026-08-08 18:39   ` David Lechner
2026-08-09  8:28     ` Kurt Borja
2026-08-10 16:31       ` David Lechner
2026-08-11 20:24         ` Kurt Borja
2026-08-16 21:54           ` Jonathan Cameron
2026-08-08  3:58 ` [PATCH v3 8/9] iio: adc: ti-ads1262: support REFOUT and VBIAS regulators Kurt Borja
2026-08-08  4:11   ` sashiko-bot
2026-08-08 18:40   ` David Lechner
2026-08-09  8:28     ` Kurt Borja
2026-08-08  3:58 ` [PATCH v3 9/9] iio: adc: ti-ads1262: support common mode supplies Kurt Borja
2026-08-08 18:40   ` David Lechner
2026-08-09  8:29     ` Kurt Borja
2026-08-08 18:37 ` [PATCH v3 0/9] iio: adc: Add TI ADS126X ADC family support David Lechner
2026-08-09  8:29   ` Kurt Borja
2026-08-10 16:42     ` David Lechner

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=aoLEv_txdTE7SqS3@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuurtb@gmail.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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