lkml.org 
[lkml]   [2022]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 6/7] iio: add MEMSensing MSA311 3-axis accelerometer driver
On Sat, 13 Aug 2022 01:34:40 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Aug 12, 2022 at 7:52 PM Dmitry Rokosov <DDRokosov@sberdevices.ru> wrote:
> >
> > MSA311 is a tri-axial, low-g accelerometer with I2C digital output for
> > sensitivity consumer applications. It has dynamic user-selectable full
> > scales range of +-2g/+-4g/+-8g/+-16g and allows acceleration measurements
> > with output data rates from 1Hz to 1000Hz.
>
> > Spec: https://cdn-shop.adafruit.com/product-files/5309/MSA311-V1.1-ENG.pdf
>
> Can you use Datasheet: tag below (just before your SoB tag)?
>
> > This driver supports following MSA311 features:
> > - IIO interface
> > - Different power modes: NORMAL and SUSPEND (using pm_runtime)
> > - ODR (Output Data Rate) selection
> > - Scale and samp_freq selection
> > - IIO triggered buffer, IIO reg access
> > - NEW_DATA interrupt + trigger
> >
> > Below features to be done:
> > - Motion Events: ACTIVE, TAP, ORIENT, FREEFALL
> > - Low Power mode
>
> ...
>
> > +static const struct {
> > + int val;
> > + int val2;
> > +} msa311_fs_table[] = {
> > + {0, 9580}, {0, 19160}, {0, 38320}, {0, 76641}
> > +};
>
> At least you may deduplicate the type definition for these data structures, like
>
> struct iio_float {

iio_int_plus_micro maybe...
we have lots of fixed point types and they definitely are floats
then integer, micro


> int integer;
> int fract;
> };
>

\
 
 \ /
  Last update: 2022-08-14 18:23    [W:0.074 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site