summaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer/Kconfig
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-12-24 13:08:20 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-01-09 21:52:46 +0000
commitde8860b1ed4701ea7e6f760f02d79ca6a3b656a1 (patch)
tree62ac25f301b5ba74f2c292a214d4aacc4f798fa1 /drivers/iio/magnetometer/Kconfig
parent165c514797129c6c68285721ea971b039bf665c5 (diff)
downloadlinux-de8860b1ed4701ea7e6f760f02d79ca6a3b656a1.tar.bz2
iio: magnetometer: Add driver for Yamaha YAS530
This adds an IIO magnetometer driver for the Yamaha YAS530 family of magnetometer/compass chips YAS530, YAS532 and YAS533. A quick survey of the source code released by different vendors reveal that we have these variants in the family with some deployments listed: * YAS529 MS-3C (2005 Samsung Aries) * YAS530 MS-3E (2011 Samsung Galaxy S Advance) * YAS532 MS-3R (2011 Samsung Galaxy S4) * YAS533 MS-3F (Vivo 1633, 1707, V3, Y21L) * (YAS534 is a magnetic switch) * YAS535 MS-6C * YAS536 MS-3W * YAS537 MS-3T (2015 Samsung Galaxy S6, Note 5) * YAS539 MS-3S (2018 Samsung Galaxy A7 SM-A750FN) The YAS529 is so significantly different from the YAS53x variants that it will require its own driver. The YAS537 and YAS539 have slightly different register sets but have strong similarities so a common driver patching this one will probably be reasonable. The source code for Samsung Galaxy A7's YAS539 is not that is significantly different from the YAS530 in the Galaxy S Advance, so I believe we will only need this one driver with quirks to handle all of them. The YAS539 is actively announced on Yamaha's devices site: https://device.yamaha.com/en/lsi/products/e_compass/ This is a driver written from scratch using buffered IIO and runtime PM handling regulators and reset. Thanks to Andy Shevchenko for great help in finding all the special kernel infrastructure functions and quirks during review of this driver. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: phone-devel@vger.kernel.org Cc: Jonathan Bakker <xc-racer2@live.ca> Link: https://lore.kernel.org/r/20201224120820.1120099-2-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/magnetometer/Kconfig')
-rw-r--r--drivers/iio/magnetometer/Kconfig15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
index 1697a8c03506..5d4ffd66032e 100644
--- a/drivers/iio/magnetometer/Kconfig
+++ b/drivers/iio/magnetometer/Kconfig
@@ -205,4 +205,19 @@ config SENSORS_RM3100_SPI
To compile this driver as a module, choose M here: the module
will be called rm3100-spi.
+config YAMAHA_YAS530
+ tristate "Yamaha YAS530 family of 3-Axis Magnetometers (I2C)"
+ depends on I2C
+ select REGMAP_I2C
+ select IIO_BUFFER
+ select IIO_TRIGGERED_BUFFER
+ help
+ Say Y here to add support for the Yamaha YAS530 series of
+ 3-Axis Magnetometers. Right now YAS530, YAS532 and YAS533 are
+ fully supported.
+
+ This driver can also be compiled as a module.
+ To compile this driver as a module, choose M here: the module
+ will be called yamaha-yas.
+
endmenu