On Fri, May 22, 2020 at 11:50:37AM +0300, Andy Shevchenko wrote: > On Fri, May 22, 2020 at 4:48 AM Dan Robertson <dan@xxxxxxxxxxxxxxx> wrote: > > > > Add basic support for the Bosch Sensortec BMA400 3-axes ultra-low power > > accelerometer when configured to use SPI. > > ... > > > tristate "Bosch BMA400 3-Axis Accelerometer Driver" > > select REGMAP > > select BMA400_I2C if I2C > > > + select BMA400_SPI if I2C > > This is not right. Will fix in the second version. > > +#include <linux/module.h> > > +#include <linux/spi/spi.h> > > What's the point of dups (see below)? An error on my part. > > +#define BMA400_SPI_READ_BUFFER_SIZE (BMA400_MAX_SPI_READ + 1) > > Do wee need separate macro? It seems longer than explicit use. > Do we need the original macro either? I was just trying to avoid magic values. I have no problem with removing this though. > > + /* > > + * TODO(dlrobertson): What is a reasonable length to cap > > + * this at. > > + */ > > Either drop this or fulfill. There is no way to leave such in the > non-staging code. I'll drop this in the next patchset version if we stick with regmap_bus implementation. We never read more than two bytes in bma400_core, so this size should be fine. > > + .read_flag_mask = BIT(7), > > #include <linux/bits.h> Good catch. Thanks for the review. I will make the changes for the next patchset version. Cheers, - Dan
Attachment:
signature.asc
Description: PGP signature