[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250816132823.0d987b20@jic23-huawei>
Date: Sat, 16 Aug 2025 13:28:23 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Matti Vaittinen <mazziesaccount@...il.com>, Matti Vaittinen
<matti.vaittinen@...rohmeurope.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>, David Heidelberg <david@...t.cz>,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Sukrut Bellary <sbellary@...libre.com>,
Lothar Rubusch <l.rubusch@...il.com>
Subject: Re: [PATCH 2/3] iio: adc: adc128s052: Simplify matching chip_data
On Thu, 14 Aug 2025 09:53:21 -0500
David Lechner <dlechner@...libre.com> wrote:
> On 8/14/25 3:35 AM, Matti Vaittinen wrote:
> > The adc128s052 driver supports a few different ICs. IC specific
> > configuration data is stored in an array. IC data, residing in a
> > specific point of the array, is pointed from the SPI device match data.
> >
> > There is no need to have the chip config data structures in an array
> > and splitting them out of an array has at least following benefits:
> >
> > - Chip-specific structures can be named after the chips they support.
> > This makes referring them a tad cleaner, compared to using a generic
> > array name with a numerical index.
> >
> > - Avoid all potential 'out of bounds' errors which can result if the
> > array is changed.
> >
> > Split the chip configuration data array to individual structures.
> >
> > Signed-off-by: Matti Vaittinen <mazziesaccount@...il.com>
> >
> > ---
> Reviewed-by: David Lechner <dlechner@...libre.com>
>
Any racing series get to rebase on top of this.
Applied this patch as it is good in it's own right.
Thanks,
Jonathan
Powered by blists - more mailing lists