[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBRXzymSWZaRDyhq@smile.fi.intel.com>
Date: Fri, 17 Mar 2023 14:06:39 +0200
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, 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
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.
...
> .driver = {
> - .name = "kx022a-spi",
> + .name = "kx022a-spi",
> .of_match_table = kx022a_of_match,
> },
What was changed here?
...
> - .id_table = kx022a_id,
> + .id_table = kx022a_spi_id,
Why do we need this change?
...
> - 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?
...
> +#define KX_MASK_BRES16 BIT(6)
> +
> +
One blank line is enough.
> #define KX022A_REG_WHO 0x0f
> #define KX022A_ID 0xc8
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists