Re: [PATCH 1/5] iio: adxl372: New driver for Analog Devices ADXL372 Accelerometer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux