All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mehdi Djait <mehdi.djait.k@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: jic23@kernel.org, mazziesaccount@gmail.com,
	krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: accel: kionix-kx022a: Add chip_info structure
Date: Sat, 18 Mar 2023 17:12:03 +0100	[thread overview]
Message-ID: <ZBXi05HpZSHYs2wm@carbian> (raw)
In-Reply-To: <ZBRXzymSWZaRDyhq@smile.fi.intel.com>

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

  reply	other threads:[~2023-03-18 16:12 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 23:48 [PATCH 0/3] iio: accel: Add support for Kionix/ROHM KX132 accelerometer Mehdi Djait
2023-03-16 23:48 ` [PATCH 1/3] dt-bindings: iio: Add " Mehdi Djait
2023-03-19 15:54   ` Jonathan Cameron
2023-03-21 13:22     ` Mehdi Djait
2023-03-16 23:48 ` [PATCH 2/3] iio: accel: kionix-kx022a: Add chip_info structure Mehdi Djait
2023-03-17  1:01   ` kernel test robot
2023-03-17  4:57   ` kernel test robot
2023-03-17 12:06   ` Andy Shevchenko
2023-03-18 16:12     ` Mehdi Djait [this message]
2023-03-19 16:20   ` Jonathan Cameron
2023-03-20  7:17     ` Matti Vaittinen
2023-03-20 12:24       ` Jonathan Cameron
2023-03-21 15:39         ` Mehdi Djait
2023-03-20  9:35   ` Matti Vaittinen
2023-03-20 12:02     ` Andy Shevchenko
2023-03-20 12:34     ` Jonathan Cameron
2023-03-20 12:52       ` Matti Vaittinen
2023-03-21 15:56     ` Mehdi Djait
2023-03-22  6:37       ` Matti Vaittinen
2023-03-21  1:05   ` kernel test robot
2023-03-16 23:48 ` [PATCH 3/3] iio: accel: Add support for Kionix/ROHM KX132 accelerometer Mehdi Djait
2023-03-19 16:22   ` Jonathan Cameron
2023-03-21 16:34     ` Mehdi Djait
2023-03-25 18:12       ` Jonathan Cameron
2023-03-20  9:57   ` Matti Vaittinen
2023-03-17 12:07 ` [PATCH 0/3] " Andy Shevchenko
2023-03-18 15:55   ` Mehdi Djait
2023-03-19  7:43 ` Matti Vaittinen
2023-03-21 13:16   ` Mehdi Djait
2023-03-22  7:47     ` Matti Vaittinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZBXi05HpZSHYs2wm@carbian \
    --to=mehdi.djait.k@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mazziesaccount@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.