All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Afonso Bordado <afonsobordado@az8.co>
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 1/4] iio: gyro: add support for fxas21002c
Date: Sun, 2 Sep 2018 10:18:00 +0100	[thread overview]
Message-ID: <20180902101800.4165005f@archlinux> (raw)
In-Reply-To: <d6c71f8699a0ee8eb09417381e301246b864e69e.camel@az8.co>

On Wed, 29 Aug 2018 07:43:48 +0100
Afonso Bordado <afonsobordado@az8.co> wrote:

> On Mon, 2018-08-27 at 18:08 +0100, Jonathan Cameron wrote:
> > On Sat, 25 Aug 2018 22:19:07 +0100
> > Afonso Bordado <afonsobordado@az8.co> wrote:
> >   
> > > FXAS21002C is a 3 axis gyroscope with integrated temperature sensor
> > > 
> > > Signed-off-by: Afonso Bordado <afonsobordado@az8.co>  
> > 
> > Hi,
> > 
> > Driver is pretty clean so only a few minor comments inline.
> > If we were late in a cycle I'd probably just have taken it and fixed
> > up
> > but as we have lots of time and I'm inherently lazy I'll let you do a
> > v2 :)
> > 
> > Good job, thanks!
> > 
> > Jonathan  
> 
> Great!
> 
> 
> > > +
> > > +static const struct regmap_access_table fxas21002c_volatile_table
> > > = {
> > > +	.yes_ranges = fxas21002c_volatile_ranges,
> > > +	.n_yes_ranges = ARRAY_SIZE(fxas21002c_volatile_ranges),
> > > +};
> > > +
> > > +const struct regmap_config fxas21002c_regmap_config = {
> > > +	.reg_bits = 8,
> > > +	.val_bits = 8,
> > > +
> > > +	.max_register = FXAS21002C_REG_CTRL_REG3,
> > > +	// We don't specify a .rd_table because everything is readable  
> > 
> > /* ... */
> > 
> > Please run checkpatch as IIRC it complains about this.  
> 
> I've replaced all instances of C99 comments with ANSI comments.
> However, has Joe Perches mentioned. Checkpatch did not warn me about
> this.
> 
Yup, thanks to Joe for clarifying this I had missed the change.
> 
> > > +
> > > +static int fxas21002c_remove(struct i2c_client *client)
> > > +{
> > > +	struct iio_dev *indio_dev = i2c_get_clientdata(client);
> > > +	struct fxas21002c_data *data = iio_priv(indio_dev);
> > > +
> > > +	iio_device_unregister(indio_dev);
> > > +
> > > +	fxas21002c_set_operating_mode(data, FXAS21002C_OM_STANDBY);  
> > 
> > You could have used the devm_add_action to allow the managed cleanup
> > to handle
> > this and hence gotten rid of the remove function.
> > 
> > (minor suggestion and somewhat a matter of personal taste).  
> 
> I didn't know this existed! Changed in v2.

Nor me until someone used it in a driver a few months back ;)
One of the advantages of doing a lot of review is that you get to see
any new stuff other people use.

Jonathan

      reply	other threads:[~2018-09-02 13:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-25 21:19 [PATCH 1/4] iio: gyro: add support for fxas21002c Afonso Bordado
2018-08-25 21:19 ` [PATCH 2/4] iio: gyro: add device tree " Afonso Bordado
2018-08-27 17:13   ` Jonathan Cameron
2018-08-29  6:43     ` Afonso Bordado
2018-09-02  9:15       ` Jonathan Cameron
2018-08-25 21:19 ` [PATCH 3/4] iio: fxas21002c: add ODR/Scale support Afonso Bordado
2018-08-27 17:18   ` Jonathan Cameron
2018-08-25 21:19 ` [PATCH 4/4] MAINTAINERS: add entry for fxas21002c gyro driver Afonso Bordado
2018-08-27 17:08 ` [PATCH 1/4] iio: gyro: add support for fxas21002c Jonathan Cameron
2018-08-27 20:50   ` Joe Perches
2018-08-29  6:43   ` Afonso Bordado
2018-09-02  9:18     ` Jonathan Cameron [this message]

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=20180902101800.4165005f@archlinux \
    --to=jic23@kernel.org \
    --cc=afonsobordado@az8.co \
    --cc=devicetree@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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.