Re: lis302 DT binding for Nokia N900

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

 




On 03-12-13 13:21, Sebastian Reichel wrote:
Hi,

The lis302 has already a DT binding described in [0],
which descibes misc. hardware properties. The problem
is, that the Nokia N900 needs negative values for some
of the properties, which seem to be unsupported by DT.
The following values would be needed for the N900 (taken
from board code):

st,axis-x = <1>;  /* LIS3_DEV_X */
st,axis-y = <-2>; /* LIS3_INV_DEV_Y */
st,axis-z = <-3>; /* LIS3_INV_DEV_Z */

st,min-limit-x = <-32>;
st,min-limit-y = <3>;
st,min-limit-z = <3>;

st,max-limit-x = <-3>;
st,max-limit-y = <32>;
st,max-limit-z = <32>;

Can you please tell me how to setup the properties correctly?

Hi Sebastian,
The code to support inversion of the axis is there... but apparently only in the I2C code. It seems the SPI code doesn't (yet) use any of these values. Is the accelerometer on the N900 connected via SPI, by chance?

It should be pretty simple to extend the SPI driver to support axis conversion too. It'd basically be a copy-paste of lis3lv02d_i2c_probe()

Concerning {min,max}-limit-*, I only have vague understanding of this information (only used in self test), but it should already be working fine with both I2C and SPI (as it's bus independent). In addition, note that it's compared to raw data (i.e., before axis conversion), so you probably don't need to put negative values there.

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux