Commit Graph

3 Commits

Author SHA1 Message Date
Bastien Nocera
27a325b2f5 accel: Add support for the new "accel-*" IIO labels
See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9a6df4b1ab0e467f23ccdcbb82700cfb3eaf44a3
2021-06-11 12:54:48 +02:00
Bastien Nocera
eaa3fbc800 main: Use AccelScale everywhere
Use AccelScale, which supports per-axis accelerometer scaling everywhere
we would have had a single scale value.

This adds per-axis support from the ring-buffer for accelerometers
with triggers.
2020-05-04 14:49:55 +02:00
Daniel Stuart
43e5ff769e accel: Fix getting scale for sensors with IIO_SHARED_BY_ALL mask
Properties with the IIO_SHARED_BY_ALL mask don't have the sensor type prefix
before the filename, causing some devices to not have a scale set from sysfs.

Fix this by searching through sysfs for both properties name: scale and
in_accel_scale.

Tested on: Cyan (Acer Chromebook R11, with 2 accelerometers)
Affects: All chromebooks with cros-ec sensors
https://github.com/torvalds/linux/tree/master/drivers/iio/common/cros_ec_sensors
2020-01-08 15:13:06 +01:00