<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/iio/magnetometer, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-04T12:20:55+00:00</updated>
<entry>
<title>iio: magnetometer: Remove IRQF_ONESHOT</title>
<updated>2026-03-04T12:20:55+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2026-01-28T09:55:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=da08099d5f7a47b2d0e2fc1af4d6eae2da186453'/>
<id>urn:sha1:da08099d5f7a47b2d0e2fc1af4d6eae2da186453</id>
<content type='text'>
[ Upstream commit a54e9440925e6617c98669066b4753c4cdcea8a0 ]

Passing IRQF_ONESHOT ensures that the interrupt source is masked until
the secondary (threaded) handler is done. If only a primary handler is
used then the flag makes no sense because the interrupt can not fire
(again) while its handler is running.
The flag also disallows force-threading of the primary handler and the
irq-core will warn about this.
The force-threading functionality is required on PREEMPT_RT because the
handler is using locks with can sleep on PREEMPT_RT.

Remove IRQF_ONESHOT from irqflags.

Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: magnetometer: yas530: use signed integer type for clamp limits</title>
<updated>2024-12-14T18:59:50+00:00</updated>
<author>
<name>Jakob Hauser</name>
<email>jahau@rocketmail.com</email>
</author>
<published>2024-11-29T21:25:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=67e972130bb646e34ed96c21499c93d35bc74474'/>
<id>urn:sha1:67e972130bb646e34ed96c21499c93d35bc74474</id>
<content type='text'>
[ Upstream commit f1ee5483e40881d8ad5a63aa148b753b5c6a839b ]

In the function yas537_measure() there is a clamp_val() with limits of
-BIT(13) and BIT(13) - 1.  The input clamp value h[] is of type s32.  The
BIT() is of type unsigned long integer due to its define in
include/vdso/bits.h.  The lower limit -BIT(13) is recognized as -8192 but
expressed as an unsigned long integer.  The size of an unsigned long
integer differs between 32-bit and 64-bit architectures.  Converting this
to type s32 may lead to undesired behavior.

Additionally, in the calculation lines h[0], h[1] and h[2] the unsigned
long integer divisor BIT(13) causes an unsigned division, shifting the
left-hand side of the equation back and forth, possibly ending up in large
positive values instead of negative values on 32-bit architectures.

To solve those two issues, declare a signed integer with a value of
BIT(13).

There is another omission in the clamp line: clamp_val() returns a value
and it's going nowhere here.  Self-assign it to h[i] to make use of the
clamp macro.

Finally, replace clamp_val() macro by clamp() because after changing the
limits from type unsigned long integer to signed integer it's fine that
way.

Link: https://lkml.kernel.org/r/11609b2243c295d65ab4d47e78c239d61ad6be75.1732914810.git.jahau@rocketmail.com
Fixes: 65f79b501030 ("iio: magnetometer: yas530: Add YAS537 variant")
Signed-off-by: Jakob Hauser &lt;jahau@rocketmail.com&gt;

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202411230458.dhZwh3TT-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202411282222.oF0B4110-lkp@intel.com/
Reviewed-by: David Laight &lt;david.laight@aculab.com&gt;
Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: magnetometer: ak8975: Fix reading for ak099xx sensors</title>
<updated>2024-10-10T09:57:56+00:00</updated>
<author>
<name>Barnabás Czémán</name>
<email>barnabas.czeman@mainlining.org</email>
</author>
<published>2024-08-18T22:29:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73328d2af5aaff43fb112f156052f4d6b56245e4'/>
<id>urn:sha1:73328d2af5aaff43fb112f156052f4d6b56245e4</id>
<content type='text'>
commit 129464e86c7445a858b790ac2d28d35f58256bbe upstream.

Move ST2 reading with overflow handling after measurement data
reading.
ST2 register read have to be read after read measurment data,
because it means end of the reading and realease the lock on the data.
Remove ST2 read skip on interrupt based waiting because ST2 required to
be read out at and of the axis read.

Fixes: 57e73a423b1e ("iio: ak8975: add ak09911 and ak09912 support")
Signed-off-by: Barnabás Czémán &lt;barnabas.czeman@mainlining.org&gt;
Link: https://patch.msgid.link/20240819-ak09918-v4-2-f0734d14cfb9@mainlining.org
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: magnetometer: ak8975: Fix 'Unexpected device' error</title>
<updated>2024-10-04T14:30:04+00:00</updated>
<author>
<name>André Apitzsch</name>
<email>git@apitzsch.eu</email>
</author>
<published>2023-10-01T16:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=72a3aef9640e5e7e4645e76435835ae3d8df0784'/>
<id>urn:sha1:72a3aef9640e5e7e4645e76435835ae3d8df0784</id>
<content type='text'>
commit 848f68c760ab1e14a9046ea6e45e3304ab9fa50b upstream.

Explicity specify array indices to fix mapping between
asahi_compass_chipset and ak_def_array.
While at it, remove unneeded AKXXXX.

Fixes: 4f9ea93afde1 ("iio: magnetometer: ak8975: Convert enum-&gt;pointer for data in the match tables")
Signed-off-by: André Apitzsch &lt;git@apitzsch.eu&gt;
Reviewed-by: Biju Das &lt;biju.das.jz@bp.renesas.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20231001-ak_magnetometer-v1-1-09bf3b8798a3@apitzsch.eu
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: magnetometer: ak8975: drop incorrect AK09116 compatible</title>
<updated>2024-10-04T14:29:39+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2024-08-06T05:30:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7387270b6837cc910db4799e27a122327131f0d1'/>
<id>urn:sha1:7387270b6837cc910db4799e27a122327131f0d1</id>
<content type='text'>
[ Upstream commit da6e3160df230692bbd48a6d52318035f19595e2 ]

All compatibles in this binding without prefixes were deprecated, so
adding a new deprecated one after some time is not allowed, because it
defies the core logic of deprecating things.

Drop the AK09916 vendorless compatible.

Fixes: 76e28aa97fa0 ("iio: magnetometer: ak8975: add AK09116 support")
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://patch.msgid.link/20240806053016.6401-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: magnetometer: ak8975: Convert enum-&gt;pointer for data in the match tables</title>
<updated>2024-10-04T14:29:39+00:00</updated>
<author>
<name>Biju Das</name>
<email>biju.das.jz@bp.renesas.com</email>
</author>
<published>2023-08-18T07:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5a4a27666e0520d83adbaac7880424e9611c5aa'/>
<id>urn:sha1:c5a4a27666e0520d83adbaac7880424e9611c5aa</id>
<content type='text'>
[ Upstream commit 4f9ea93afde190a0f906ee624fc9a45cf784551b ]

Convert enum-&gt;pointer for data in the match tables to simplify the probe()
by replacing device_get_match_data() and i2c_client_get_device_id by
i2c_get_match_data() as we have similar I2C, ACPI and DT matching table.

Signed-off-by: Biju Das &lt;biju.das.jz@bp.renesas.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230818075600.24277-2-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Stable-dep-of: da6e3160df23 ("iio: magnetometer: ak8975: drop incorrect AK09116 compatible")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC</title>
<updated>2024-02-23T08:25:06+00:00</updated>
<author>
<name>zhili.liu</name>
<email>zhili.liu@ucas.com.cn</email>
</author>
<published>2024-01-02T01:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d8c67e94e9e977603473a543d4f322cf2c4aa01'/>
<id>urn:sha1:1d8c67e94e9e977603473a543d4f322cf2c4aa01</id>
<content type='text'>
commit 792595bab4925aa06532a14dd256db523eb4fa5e upstream.

Recently, we encounter kernel crash in function rm3100_common_probe
caused by out of bound access of array rm3100_samp_rates (because of
underlying hardware failures). Add boundary check to prevent out of
bound access.

Fixes: 121354b2eceb ("iio: magnetometer: Add driver support for PNI RM3100")
Suggested-by: Zhouyi Zhou &lt;zhouzhouyi@gmail.com&gt;
Signed-off-by: zhili.liu &lt;zhili.liu@ucas.com.cn&gt;
Link: https://lore.kernel.org/r/1704157631-3814-1-git-send-email-zhouzhouyi@gmail.com
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: tmag5273: fix temperature offset</title>
<updated>2024-01-01T12:42:38+00:00</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco@wolfvision.net</email>
</author>
<published>2023-11-21T05:48:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55efc549392e21a066a10a2fae93e9446e3e0e59'/>
<id>urn:sha1:55efc549392e21a066a10a2fae93e9446e3e0e59</id>
<content type='text'>
commit 3b8157ec4573e304a29b7bced627e144dbc3dfdb upstream.

The current offset has the scale already applied to it. The ABI
documentation defines the offset parameter as "offset to be added
to &lt;type&gt;[Y]_raw prior to scaling by &lt;type&gt;[Y]_scale in order to
obtain value in the &lt;type&gt; units as specified in &lt;type&gt;[Y]_raw
documentation"

The right value is obtained at 0 degrees Celsius by the formula provided
in the datasheet:

T = Tsens_t0 + (Tadc_t - Tadc_t0) / Tadc_res

where:
T = 0 degrees Celsius
Tsens_t0 (reference temperature) = 25 degrees Celsius
Tadc_t0 (16-bit format for Tsens_t0) = 17508
Tadc_res = 60.1 LSB/degree Celsius

The resulting offset is 16005.5, which has been truncated to 16005 to
provide an integer value with a precision loss smaller than the 1-LSB
measurement precision.

Fix the offset to apply its value prior to scaling.

Signed-off-by: Javier Carrasco &lt;javier.carrasco@wolfvision.net&gt;
Link: https://lore.kernel.org/r/9879beec-05fc-4fc6-af62-d771e238954e@wolfvision.net
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'iio-for-6.5a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next</title>
<updated>2023-06-15T11:01:55+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-06-15T11:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=269b9d8fafbef403fa3e5672954aee5a9079be11'/>
<id>urn:sha1:269b9d8fafbef403fa3e5672954aee5a9079be11</id>
<content type='text'>
Jonathan writes:

1st set of IIO new device support, features and cleanup for the 6.5 cycle.

New device support
- honeywell,mprls0025pa
  * New driver and dt-bindings for this series of pressure sensors.
- invensense,mpu6050
  * Add support for ICM 20600 IMU (ID, bindings and device data).
- melexis,mlx90614
  * Add support for mlx90615 Infra Red Thermometer after driver cleanup
    and refactoring to support the differences in this device.
- renesas,x9250
  * New driver and bindings for this quad potentiometer.
- rockchip,saradc
  * Add support for RK3588. Also included is a bunch of refactoring and
    cleanup for that driver.
- rohm,bu27008
  * New driver bindings etc for this 5 photodiode color sensor.
- st,lsm9ds0/st,st-sensors
  * ID added for LSM303D accelerometer and magnetometer including ACPI binding.
- ti,opt4001
  * New driver and bindings for this ambient light sensor.

Features
- core
  * Introduce iio_validate_own_trigger() for cases where a driver can only
    consumer a trigger it registered (detected via same parent device).
    Use it in the kionix,kx022a driver and new rohm,by27008 driver.
- dynaimage,al3320a
  * ACPI binding CALS0001 seen on Lenovo Yoga Table 2 devices.
- kionix,kx002a
  * Enable asynchronous probe.
- rohm,bu27034
  * Enable asynchronous probe.
- ti,tmp006
  * Explicit support for DT including binding documentation.

Cleanups, minor fixes and misc improvements.
- treewide
  * Switch I2C drivers from probe_new() back to probe() - part of the
    long process of getting rid of a parameter from probe()
  * Various whitespace and typo fixes not otherwise called out.
- core
  * industrialio-buffer,Style cleanup.
  * Add documentation to extend_name field of struct iio_chan_spec to
    direct people using it towards the label infrastructure instead.
    extend_name was a design mistake a long time back so directly people
    away from it may be useful.
- adi,ad7606
  * Add HAS_IOPORT dependency to prepare for some Kconfig changes.
- bosch,bma400
  * Drop pointless print of ret in a dev_err_probe() message.
- invensense,icm42600
  * Rework timestamp handling to reduce jitter.
- mediatek,mt7986-auxdac
  * Add DT binding for this part.
- qcom,spmi-vadc
  * Allow for 1/16th prescaling used on a few devices.
  * Various changes to channel labeling and naming, including dropping
    use of fwnode_name which generates odd channel names. Small ABI
    change as a result, but not thought to be a problem for users of this
    platform.
- st,lsm6dsx
  * dt-binding: Use common schema for mount-matrix via a reference.
- st,stm32
  * Add a debug print for when legacy channel config is used.
- ti,palmas-adc
  * Drop unused i2c.h include.

* tag 'iio-for-6.5a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (59 commits)
  dt-bindings: iio: rockchip: Fix 'oneOf' condition failed warning
  dt-bindings: iio: afe: voltage-divider: Spelling s/curcuit/circuit/
  dt-bindings: iio: adc: Add rockchip,rk3588-saradc string
  iio: adc: rockchip_saradc: Use dev_err_probe
  iio: adc: rockchip_saradc: Match alignment with open parenthesis
  iio: adc: rockchip_saradc: Use of_device_get_match_data
  iio: adc: rockchip_saradc: Make use of devm_clk_get_enabled
  iio: adc: rockchip_saradc: Add support for RK3588
  iio: adc: rockchip_saradc: Add callback functions
  iio: temperature: tmp006: Add OF device matching support
  dt-bindings: iio: temperature: Add support for tmp006
  staging: iio: Switch i2c drivers back to use .probe()
  iio: amplifiers: ad8366 Fix whitespace issue
  iio: imu: inv_icm42600: avoid frequent timestamp jitter
  MAINTAINERS: Add ROHM BU27008
  iio: light: ROHM BU27008 color sensor
  iio: kx022a: Use new iio_validate_own_trigger()
  iio: trigger: Add simple trigger_validation helper
  dt-bindings: iio: light: ROHM BU27008
  iio: mlx90614: Add MLX90615 support
  ...
</content>
</entry>
<entry>
<title>iio: Switch i2c drivers back to use .probe()</title>
<updated>2023-05-21T17:54:53+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-05-15T20:50:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7cf15f4275f5b478035c1422a15fe049829cc34c'/>
<id>urn:sha1:7cf15f4275f5b478035c1422a15fe049829cc34c</id>
<content type='text'>
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230515205048.19561-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
