[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZIc/uvB1zxNRnuRS@smile.fi.intel.com>
Date: Mon, 12 Jun 2023 18:54:34 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Mehdi Djait <mehdi.djait.k@...il.com>
Cc: jic23@...nel.org, mazziesaccount@...il.com,
krzysztof.kozlowski+dt@...aro.org, robh+dt@...nel.org,
lars@...afoo.de, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v5 5/7] iio: accel: kionix-kx022a: Refactor driver and
add chip_info structure
On Mon, Jun 12, 2023 at 04:22:08PM +0200, Mehdi Djait wrote:
> Add the chip_info structure to the driver's private data to hold all
> the device specific infos.
> Refactor the kx022a driver implementation to make it more generic and
> extensible.
...
> + chip_info = spi_get_device_match_data(spi);
Missing check. You addressed only I²C case. Is there any explanation?
...
> struct kx022a_data {
> + const struct kx022a_chip_info *chip_info;
> struct regmap *regmap;
I would suggest to run bloat-o-meter with this version and if you place
chip_info after regmap. Does it gain us some memory?
> struct iio_trigger *trig;
> struct device *dev;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists