linux-stable/drivers/iio
Jakob Hauser 8239f904f9 iio: magnetometer: yas530: Correct temperature handling
The raw temperature value is a number of counts from a certain starting
point. The resolution of the temperature counts is different for the YAS
variants.

Temperature compensation for YAS532 version AC seems to be handled differently.
It uses the deviation from 20 degree Celsius [1] whereas YAS530 and older
versions of YAS532 apply solely the t value as a multiplier [2][3].

In funtion yas5xx_read_raw(), add case IIO_CHAN_INFO_PROCESSED. Remove scale
of temperature as this isn't applied.

Additionally correct sign of temperature channel in iio_chan_spec. It's already
defined that way in the yas5xx_get_measure() function.

[1] https://github.com/msm8916-mainline/android_kernel_qcom_msm8916/blob/GT-I9195I/drivers/iio/magnetometer/yas_mag_drv-yas532.c#L442
[2] https://github.com/NovaFusion/android_kernel_samsung_golden/blob/cm-12.1/drivers/sensor/compass/yas_mag_driver-yas530.c#L881-L883
[3] https://github.com/LineageOS/android_kernel_samsung_msm8930-common/blob/lineage-18.1/drivers/sensors/geomagnetic/yas_mag_driver-yas53x.c#L856-L858

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/eb45f328c7a81eb622c6a8cfc5c468ea58bbdace.1660337264.git.jahau@rocketmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-08-15 22:30:03 +01:00
..
accel iio: accel: sca3300: Extend the trigger buffer from 16 to 32 bytes 2022-07-19 09:38:53 +01:00
adc iio: adc: xilinx-xadc: Benefit from devm_clk_get_enabled() to simplify 2022-08-15 22:30:02 +01:00
addac iio: addac: ad74413r: Fix alignment for DMA safety 2022-06-14 11:53:15 +01:00
afe iio: afe: rescale: export symbols used during testing 2022-07-16 19:01:14 +01:00
amplifiers iio: amplifiers: ad8366: Fix alignment for DMA safety 2022-06-14 11:53:15 +01:00
buffer iio: core: Simplify the registration of kfifo buffers 2022-04-10 16:25:46 +01:00
cdc iio: cdc: ad7746: Move driver out of staging. 2022-08-15 22:30:01 +01:00
chemical iio: chemical: scd4x: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:17 +01:00
common iio: cros: Register FIFO callback after sensor is registered 2022-07-18 18:29:13 +01:00
dac iio: dac: mcp4725: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
dummy Bitmap patches for 5.19-rc1 2022-06-04 14:04:27 -07:00
filter iio:filter:admv8818: select REGMAP_SPI for ADMV8818 2022-04-04 09:19:01 +01:00
frequency iio: frequency: adrf6780: Benefit from devm_clk_get_enabled() to simplify 2022-08-15 22:30:02 +01:00
gyro iio: gyro: itg3200: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
health iio: health: afe4404: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
humidity IIO new device support, features and minor fixes for 5.20 2022-07-14 15:04:49 +02:00
imu iio: imu: adis16475: Benefit from devm_clk_get_enabled() to simplify 2022-08-15 22:30:03 +01:00
light iio: light: cm32181: Mark the dev_pm_ops static. 2022-08-15 22:30:01 +01:00
magnetometer iio: magnetometer: yas530: Correct temperature handling 2022-08-15 22:30:03 +01:00
multiplexer iio: multiplexer: Make use of device properties 2022-04-04 09:11:24 +01:00
orientation iio: hid-sensors: bind IIO channels alloc to device object 2021-07-13 18:21:53 +01:00
position iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
potentiometer iio: potentiometer: mcp4131: Fix alignment for DMA safety 2022-06-14 11:53:19 +01:00
potentiostat iio: lmp91000: Remove no-op trigger ops 2021-11-17 17:51:38 +00:00
pressure iio: cros: Register FIFO callback after sensor is registered 2022-07-18 18:29:13 +01:00
proximity iio: proximity: cros_ec_mkbp: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
resolver iio: resolver: ad2s90: Fix alignment for DMA safety 2022-06-14 11:53:19 +01:00
temperature iio: temperature: mlx90632 Add supply regulator to sensor 2022-08-15 22:30:03 +01:00
test iio: test: Mark file local structure arrays static. 2022-08-15 22:30:01 +01:00
trigger IIO new device support, features and minor fixes for 5.20 2022-07-14 15:04:49 +02:00
iio_core.h iio: Mark iio_device_type as const 2021-11-17 17:51:35 +00:00
iio_core_trigger.h
industrialio-buffer.c iio: Fix indentation for multiline conditional. 2022-08-15 22:29:57 +01:00
industrialio-configfs.c
industrialio-core.c iio: core: Introduce _zeropoint for differential channels 2022-08-15 22:30:01 +01:00
industrialio-event.c iio: Add names for function definition arguments. 2022-08-15 22:29:57 +01:00
industrialio-sw-device.c iio: Don't use bare "unsigned" 2022-07-01 11:19:08 +01:00
industrialio-sw-trigger.c iio: Don't use bare "unsigned" 2022-07-01 11:19:08 +01:00
industrialio-trigger.c iio: Add blank lines after declarations. 2022-08-15 22:29:56 +01:00
industrialio-triggered-event.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
inkern.c iio: inkern: fix coding style warnings 2022-08-15 22:30:00 +01:00
Kconfig iio: add filter subfolder 2021-12-16 17:29:46 +00:00
Makefile iio: add filter subfolder 2021-12-16 17:29:46 +00:00
TODO