iio: magnetometer: add Allegro MicroSystems ALS31300 3-D Linear Hall Effect driver
authorNeil Armstrong <neil.armstrong@linaro.org>
Wed, 30 Oct 2024 15:30:24 +0000 (16:30 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 3 Nov 2024 20:33:44 +0000 (20:33 +0000)
commit3c9b6fd74188ca50abbb0e0c3a96b87ec7573daa
tree80384c5fd267efd2f3a59728274041ee8511248a
parent6f6291f7a5f14f017260edd0d19a23546d55fc30
iio: magnetometer: add Allegro MicroSystems ALS31300 3-D Linear Hall Effect driver

The Allegro MicroSystems ALS31300 is a 3-D Linear Hall Effect Sensor
mainly used for 3D head-on motion sensing applications.

The device is configured over I2C, and as part of the Sensor data the
temperature core is also provided.

While the device provides an IRQ gpio, it depends on a configuration
programmed into the internal EEPROM, thus only the default mode is
supported and buffered input via trigger is also supported to allow
streaming values with the same sensing timestamp.

The device can be configured with different sensitivities in factory,
but the sensitivity value used to calculate value into the Gauss
unit is not available from registers, thus the sensitivity is provided
by the compatible/device-id string which is based on the part number
as described in the datasheet page 2.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20241030-topic-input-upstream-als31300-v4-3-494297c9e50a@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/magnetometer/Kconfig
drivers/iio/magnetometer/Makefile
drivers/iio/magnetometer/als31300.c [new file with mode: 0644]