[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220804181723.4bljpxcwkj6cnn2f@CAB-WSD-L081021.sigma.sbrf.ru>
Date: Thu, 4 Aug 2022 18:17:05 +0000
From: Dmitry Rokosov <DDRokosov@...rdevices.ru>
To: Andy Shevchenko <andy.shevchenko@...il.com>
CC: "robh+dt@...nel.org" <robh+dt@...nel.org>,
"stano.jakubek@...il.com" <stano.jakubek@...il.com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"jic23@...nel.org" <jic23@...nel.org>,
"lars@...afoo.de" <lars@...afoo.de>,
"stephan@...hold.net" <stephan@...hold.net>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
kernel <kernel@...rdevices.ru>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/3] iio: add MEMSensing MSA311 3-axis accelerometer
driver
Andy,
I have one question about str_read_write() helper, please find it below.
On Wed, Aug 03, 2022 at 07:16:13PM +0000, Dmitry Rokosov wrote:
> Hello Andy,
>
> Thank you for quick review,
>
> On Wed, Aug 03, 2022 at 07:49:33PM +0200, Andy Shevchenko wrote:
> > On Wed, Aug 3, 2022 at 3:11 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
> > >
> > > 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
> >
> > Thanks for an update, my comments below.
[...]
> >
> > ...
> >
> > > + dev_err(dev, "cannot %s register %u from debugfs (%d)\n",
> > > + readval ? "read" : "write", reg, err);
> >
> > You may consider taking [1] as a precursor here and use str_read_write().
> >
> > [1]: https://lore.kernel.org/linux-i2c/20220703154232.55549-1-andriy.shevchenko@linux.intel.com/
>
> Oh, really... Thank you for suggestion!
I have taken it closer, and it's really helpful and nice, but looks like
it's not merged to linux-next.
Please advise how I can use it in the driver. Should I provide
"Depends-On:" tag as I did for my HZ units patchset?
--
Thank you,
Dmitry
Powered by blists - more mailing lists