On Wed, 29 Aug 2018 07:43:48 +0100 Afonso Bordado <afonsobord...@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 <afonsobord...@az8.co> wrote: > > > > > FXAS21002C is a 3 axis gyroscope with integrated temperature sensor > > > > > > Signed-off-by: Afonso Bordado <afonsobord...@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