Acceleration units and mma8452 driver
Hi all,
I'm new to iio and have a question on acceleration units.
Documentation/ABI/testing/sysfs-bus-iio states "after application of scale and offset are m/s^2"
However the mma8452 driver, when in 2G full scale mode provides a scale factor of 0.000977
/sys/bus/iio/devices/iio:device0# cat in_accel_scale 0.000977
Full scale positive raw value (12 bits) is 2047 so that gives 2G (0.000977 * 2047)
So this driver seems to be using G as units rather than m/s^2.
Am I misunderstanding or is this a driver or doc bug?
Regards,
Martin
Jonathan Cameron
maintainerQuoted 14 lines · Martin Fuzzey
Hi all,
I'm new to iio and have a question on acceleration units.
Documentation/ABI/testing/sysfs-bus-iiostates "after application of scale and offset are m/s^2"However the mma8452 driver, when in 2G full scale mode provides a scale
factor of 0.000977
/sys/bus/iio/devices/iio:device0# cat
in_accel_scale0.000977
Quoted 7 lines
Full scale positive raw value (12 bits) is 2047 so that gives 2G (0.000977 * 2047)
So this driver seems to be using G as units rather than m/s^2.
Am I misunderstanding or is this a driver or doc bug?
Driver bug. Good catch. Do you want to prepare a patch?
Thanks
Jonathan
Quoted 9 lines
Regards,
Martin
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Sent from my Android phone with K-9 Mail. Please excuse my brevity.