lkml.org 
[lkml]   [2018]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/5] iio: adxl372: New driver for Analog Devices ADXL372 Accelerometer
From
Date
On 07/15/2018 11:51 AM, Jonathan Cameron wrote:
> On Thu, 12 Jul 2018 18:34:23 +0300
> Stefan Popa <stefan.popa@analog.com> wrote:
>
>> This patch adds basic support for Analog Devices ADXL372 SPI-Bus
>> Three-Axis Digital Accelerometer.
>>
>> The device is probed and configured the with some initial default
>> values. With this basic driver, it is possible to read raw acceleration
>> data.
>>
>> Datasheet:
>> http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL372.pdf
>>
>> Signed-off-by: Stefan Popa <stefan.popa@analog.com>
>
> Hi Stefan,
>
> Looks pretty good, but a few comments inline.
>
> The slightly 'unusual' register read / write field in the least significant
> bit is a pain. I really don't like the approach of 'fiddling' the register
> addresses each time though so I think you need a custom version of
> regmap-spi to deal with this inside. I wonder how often this
> pattern actually occurs and whether it's worth thinking about extending
> the core regmap to deal with it (so add a shift value for addresses).

regmap should be able to handle this as is. pad_bits = 1, reg_bits = 7
should ensure the correct behavior.

\
 
 \ /
  Last update: 2018-07-16 13:15    [W:0.080 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site