On 08-12-13 14:46, Sebastian Reichel wrote:
:
No, it's connected via I2C. Please note, that the N900's accelerometer
is already supported, but only when initialized via legacy boardcode.
The problem is, that I can't specify negative values in the device
tree file (the device tree compiler complains). I couldn't find any
example of negative numbers in any dts file, so I guess, that
negative numbers are not supported.
:
I just want to port the existing boardcode to device tree.
The existing platform data is defined as rx51_lis3lv02d_data in
arch/arm/mach-omap2/board-rx51-peripherals.c.
Oh! Yes, then the values themselves should be fine.
Indeed, the problem is in the parsing of the DT values.
Currently, lis3lv02d_init_dt() reads values as unsigned int:
u32 val;
if (of_get_property(np, "st,axis-x", &val))
pdata->axis_x = val;
So it's quite unlikely to get negative ;-) Is there a way to read signed
ints in DT? If so, I can update the driver.
É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