diff options
| author | Taha Ed-Dafili <0rayn.dev@gmail.com> | 2026-02-26 15:11:05 +0000 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-03-01 12:04:23 +0000 |
| commit | 9fb007705c77b85bfad2d3d4818ebcd5fcfa9571 (patch) | |
| tree | 322c20c16f21c00cfa7e9dd733f6be4dc5bea91f /include/linux/reboot.h | |
| parent | da29db0bcc95fb554ce9969ab57ba8f84c405be7 (diff) | |
iio: accel: adxl345: Implement event scaling for ABI compliance
The ADXL345 uses a fixed threshold resolution of 62.5 mg/LSB for
event-related registers. Previously, the driver reported raw
values without a scale factor.
Implement IIO_EV_INFO_SCALE for all event types to provide the
conversion factor (0.612915 m/s^2) as required by the IIO ABI.
Consequently, remove the obsolete comment in adxl345_read_event_value()
which stated that the scale factor is not applied.
Add explicit write rejection for IIO_EV_INFO_SCALE in
adxl345_write_event_value() returning -EINVAL.
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/reboot.h')
0 files changed, 0 insertions, 0 deletions
