[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBXi05HpZSHYs2wm@carbian>
Date: Sat, 18 Mar 2023 17:12:03 +0100
From: Mehdi Djait <mehdi.djait.k@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: jic23@...nel.org, mazziesaccount@...il.com,
krzysztof.kozlowski+dt@...aro.org, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 2/3] iio: accel: kionix-kx022a: Add chip_info structure
Hi Andy,
On Fri, Mar 17, 2023 at 02:06:39PM +0200, Andy Shevchenko wrote:
> On Fri, Mar 17, 2023 at 12:48:36AM +0100, Mehdi Djait wrote:
> > Refactor the kx022a driver implementation to make it more
> > generic and extensible.
> > Add the chip_info structure will to the driver's private
> > data to hold all the device specific infos.
> > Move the enum, struct and constants definitions to the header
> > file.
>
> Please, compile and test before sending.
My bad, I ignored the warnings...
I will fix it.
>
> ...
>
> > .driver = {
> > - .name = "kx022a-spi",
> > + .name = "kx022a-spi",
> > .of_match_table = kx022a_of_match,
> > },
>
> What was changed here?
Nothing. I will fix it
>
> ...
>
> > - .id_table = kx022a_id,
> > + .id_table = kx022a_spi_id,
>
> Why do we need this change?
>
For consistency:
i2c: .id_table = kx022a_i2c_id,
spi: .id_table = kx022a_spi_id,
> ...
>
> > - name = devm_kasprintf(data->dev, GFP_KERNEL, "%s-kx022a",
> > + name = devm_kasprintf(data->dev, GFP_KERNEL, "%s-accel",
> > dev_name(data->dev));
>
> Shouldn't you use the name from chip info?
I can use the name from chip info.
dev_name(data->dev) is the original implementation
>
> ...
>
> > +#define KX_MASK_BRES16 BIT(6)
> > +
> > +
>
> One blank line is enough.
I will change it in v2
--
Kind Regards
Mehdi Djait
Powered by blists - more mailing lists