linux/drivers/iio/magnetometer
Jakob Hauser 0ca09faade iio: magnetometer: yas530: Change data type of calibration coefficients
This is a preparation for adding YAS537 variant.

YAS537 uses other data types on the calibration coefficients [1] than YAS530 [2]
and YAS532 [3].

On YAS537, at least for a4 and a7 this could matter because 8-bit unsigned data
from the register gets stored into a signed data type, therefore this should be
8-bit as well.

For YAS530/532, on the other hand, it doesn't seem to matter. The size of a2-a9
and k is smaller than 8-bit at extraction, also the applied math is low. And
Cx/Cy1/Cy2, now being defined as signed 16-bit, are extracted as unsigned 8-bit
and undergo only minor math.

[1] https://github.com/msm8916-mainline/android_kernel_qcom_msm8916/blob/GT-I9195I/drivers/iio/magnetometer/yas_mag_drv-yas537.c#L76-L78
[2] https://github.com/NovaFusion/android_kernel_samsung_golden/blob/cm-12.1/drivers/sensor/compass/yas_mag_driver-yas530.c#L526-L527
[3] https://github.com/msm8916-mainline/android_kernel_qcom_msm8916/blob/GT-I9195I/drivers/iio/magnetometer/yas_mag_drv-yas532.c#L76-L77

Signed-off-by: Jakob Hauser <jahau@rocketmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/f1e53bd6672aebe59f9b236b41374482edf888f8.1660337264.git.jahau@rocketmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-08-15 22:30:03 +01:00
..
ak8974.c iio: magnetometer: ak8974: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros 2022-07-18 18:48:19 +01:00
ak8975.c iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-04-10 16:59:29 +01:00
bmc150_magn_i2c.c iio:magnetometer:mbc150: Make bmc150_magn_remove() return void 2022-06-11 14:35:27 +01:00
bmc150_magn_spi.c Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
bmc150_magn.c iio:magnetometer:mbc150: Make bmc150_magn_remove() return void 2022-06-11 14:35:27 +01:00
bmc150_magn.h iio:magnetometer:mbc150: Make bmc150_magn_remove() return void 2022-06-11 14:35:27 +01:00
hid-sensor-magn-3d.c iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
hmc5843_core.c iio: magn: hmc5843: Move struct dev_pm_ops out of header 2022-08-15 22:30:02 +01:00
hmc5843_i2c.c iio: magn: hmc5843: Move struct dev_pm_ops out of header 2022-08-15 22:30:02 +01:00
hmc5843_spi.c iio: magn: hmc5843: Move struct dev_pm_ops out of header 2022-08-15 22:30:02 +01:00
hmc5843.h iio: magn: hmc5843: Move struct dev_pm_ops out of header 2022-08-15 22:30:02 +01:00
Kconfig iio: magnetometer: ak8974: Drop dependency on OF 2022-04-28 19:22:55 +01:00
mag3110.c iio:magn:mag3110: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:30 +00:00
Makefile iio: magnetometer: Add driver for Yamaha YAS530 2021-01-09 21:52:46 +00:00
mmc35240.c iio:magn:mmc35240: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:30 +00:00
rm3100-core.c iio: magnetometer: rm3100: do not explicity set INDIO_BUFFER_TRIGGERED mode 2022-07-16 17:57:22 +01:00
rm3100-i2c.c iio:magnetometer:rm3100: Move exports to IIO_RM3100 namespace 2022-02-18 11:42:27 +00:00
rm3100-spi.c iio:magnetometer:rm3100: Move exports to IIO_RM3100 namespace 2022-02-18 11:42:27 +00:00
rm3100.h iio: magnetometer: Add driver support for PNI RM3100 2018-11-16 18:32:31 +00:00
st_magn_buffer.c iio:st-sensors: Remove duplicate MODULE_* 2022-02-18 11:36:54 +00:00
st_magn_core.c iio: st_sensors: Stop abusing mlock to ensure internal coherency 2022-04-10 16:21:45 +01:00
st_magn_i2c.c iio:st-sensors: Move exports into IIO_ST_SENSORS namespace 2022-02-18 11:36:54 +00:00
st_magn_spi.c iio:st-sensors: Move exports into IIO_ST_SENSORS namespace 2022-02-18 11:36:54 +00:00
st_magn.h iio: magn: st_magn: use devm_iio_triggered_buffer_setup() for buffer 2021-07-24 16:35:05 +01:00
yamaha-yas530.c iio: magnetometer: yas530: Change data type of calibration coefficients 2022-08-15 22:30:03 +01:00