Skip to content

Commit 3c9b6fd

Browse files
superna9999jic23
authored andcommitted
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 <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patch.msgid.link/20241030-topic-input-upstream-als31300-v4-3-494297c9e50a@linaro.org Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 6f6291f commit 3c9b6fd

File tree

3 files changed

+508
-0
lines changed

3 files changed

+508
-0
lines changed

drivers/iio/magnetometer/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ config AK09911
5454
help
5555
Deprecated: AK09911 is now supported by AK8975 driver.
5656

57+
config ALS31300
58+
tristate "Allegro MicroSystems ALS31300 3-D Linear Hall Effect Sensor"
59+
depends on I2C
60+
select REGMAP_I2C
61+
select IIO_BUFFER
62+
select IIO_TRIGGERED_BUFFER
63+
help
64+
Say yes here to build support for the Allegro MicroSystems
65+
ALS31300 Hall Effect Sensor through its I2C interface.
66+
67+
To compile this driver as a module, choose M here: the
68+
module will be called als31300.
69+
5770
config BMC150_MAGN
5871
tristate
5972
select IIO_BUFFER

drivers/iio/magnetometer/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
obj-$(CONFIG_AF8133J) += af8133j.o
88
obj-$(CONFIG_AK8974) += ak8974.o
99
obj-$(CONFIG_AK8975) += ak8975.o
10+
obj-$(CONFIG_ALS31300) += als31300.o
1011
obj-$(CONFIG_BMC150_MAGN) += bmc150_magn.o
1112
obj-$(CONFIG_BMC150_MAGN_I2C) += bmc150_magn_i2c.o
1213
obj-$(CONFIG_BMC150_MAGN_SPI) += bmc150_magn_spi.o

0 commit comments

Comments
 (0)