Re: [PATCH v5 5/7] iio: accel: kionix-kx022a: Refactor driver and add chip_info structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux