On 07/15/2018 11:51 AM, Jonathan Cameron wrote:
> On Thu, 12 Jul 2018 18:34:23 +0300
> Stefan Popa <stefan.p...@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.p...@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.

Reply via email to