[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220814172622.3b14ab3b@jic23-huawei>
Date: Sun, 14 Aug 2022 17:26:22 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Dmitry Rokosov <DDRokosov@...rdevices.ru>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"andriy.shevchenko@...ux.intel.com"
<andriy.shevchenko@...ux.intel.com>,
"christophe.jaillet@...adoo.fr" <christophe.jaillet@...adoo.fr>,
"stano.jakubek@...il.com" <stano.jakubek@...il.com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"stephan@...hold.net" <stephan@...hold.net>,
"daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
"wsa@...nel.org" <wsa@...nel.org>,
"lars@...afoo.de" <lars@...afoo.de>,
"Michael.Hennerich@...log.com" <Michael.Hennerich@...log.com>,
"jbhayana@...gle.com" <jbhayana@...gle.com>,
"lucas.demarchi@...el.com" <lucas.demarchi@...el.com>,
"jani.nikula@...el.com" <jani.nikula@...el.com>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
kernel <kernel@...rdevices.ru>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [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@...il.com> wrote:
> On Fri, Aug 12, 2022 at 7:52 PM Dmitry Rokosov <DDRokosov@...rdevices.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;
> };
>
Powered by blists - more mailing lists