Skip to content

Commit 65f79b5

Browse files
Jakko3jic23
authored andcommitted
iio: magnetometer: yas530: Add YAS537 variant
Add support for the magnetometer Yamaha YAS537. The additions are based on comparison of Yamaha Android kernel drivers for YAS532 [1] and YAS537 [2]. In the Yamaha YAS537 Android driver, there is an overflow/underflow control implemented. For regular usage, this seems not necessary. A similar overflow/ underflow control of Yamaha YAS530/532 Android driver isn't integrated in the mainline driver. It is therefore skipped for YAS537 in the mainline too. Also in the Yamaha YAS537 Android driver, at the end of the reset_yas537() function, a measurement is saved in "last_after_rcoil". Later on, this is compared to current measurements. If the difference gets too big, a new reset is initialized. The difference in measurements needs to be quite big, it's hard to say if this is necessary for regular operation. Therefore this isn't integrated in the mainline driver either. [1] https://github.com/msm8916-mainline/android_kernel_qcom_msm8916/blob/GT-I9195I/drivers/iio/magnetometer/yas_mag_drv-yas532.c [2] https://github.com/msm8916-mainline/android_kernel_qcom_msm8916/blob/GT-I9195I/drivers/iio/magnetometer/yas_mag_drv-yas537.c Signed-off-by: Jakob Hauser <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/264c6488733a5c32089c9ab406a5bcb808c48fef.1660337264.git.jahau@rocketmail.com Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 059ff0f commit 65f79b5

File tree

2 files changed

+423
-3
lines changed

2 files changed

+423
-3
lines changed

drivers/iio/magnetometer/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ config YAMAHA_YAS530
216216
select IIO_TRIGGERED_BUFFER
217217
help
218218
Say Y here to add support for the Yamaha YAS530 series of
219-
3-Axis Magnetometers. Right now YAS530, YAS532 and YAS533 are
220-
fully supported.
219+
3-Axis Magnetometers. YAS530, YAS532, YAS533 and YAS537 are
220+
supported.
221221

222222
This driver can also be compiled as a module.
223223
To compile this driver as a module, choose M here: the module

0 commit comments

Comments
 (0)