Re: [PATCH 1/2] iio: gyro: Add driver support for ADXRS290

From: Jonathan Cameron
Date: Sun Jul 26 2020 - 08:46:26 EST


On Wed, 22 Jul 2020 00:25:48 +0530
Nishant Malpani <nish.malpani25@xxxxxxxxx> wrote:

> Hello Jonathan,
>
> Thanks a lot for the detailed review. Comments inline...
>
...
>
> >>> +#define ADXRS290_REG_SN0 0x04 /* Serial Number Registers, 4 bytes */
> >>> +#define ADXRS290_REG_DATAX0 0x08 /* Roll Rate o/p Data Regs, 2 bytes */
> >>> +#define ADXRS290_REG_DATAY0 0x0A /* Pitch Rate o/p Data Regs, 2 bytes */
> >
> > Are we actually right to map roll and pitch to x and y?
> > If so we should probably add that to the docs somewhere. We need to document
> > which one maps to x and which to y as that mapping is far from obvious!
> >
> "The ADXRS290 is an x-axis and y-axis rate sensing device that
> is also called a roll and pitch rate sensing device" (datasheet pg. 4).
> I think I'm right in marking the DATA X-axis register as the roll rate
> and similarly the DATA Y-axis register as the pitch rate.
>
> Also, I thought it is a known convention to use x for roll, y for pitch,
> etc. [2]. But you're right, its not very obvious. Where do I document it?
>
> [2] https://en.wikipedia.org/wiki/Aircraft_principal_axes#Principal_axes

Documentation/ABI/testing/sysfs-bus-iio


Thanks,

Jonathan