<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/iio/dac, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge 7.3-rc6 into char-misc-next</title>
<updated>2026-10-05T07:34:50+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2026-10-05T07:34:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d47322a612daf8e97b2e5e4dbbabdff27080c1ec'/>
<id>d47322a612daf8e97b2e5e4dbbabdff27080c1ec</id>
<content type='text'>
This resolves a number of merge conflicts between the branches, and we
pick up the fixes in 7.3-rc6 that we need for testing.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This resolves a number of merge conflicts between the branches, and we
pick up the fixes in 7.3-rc6 that we need for testing.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dac: ad5758: Fix the offset calculation</title>
<updated>2026-09-28T16:07:37+00:00</updated>
<author>
<name>Arka Mondal</name>
<email>arka@arkamondal.net</email>
</author>
<published>2026-09-18T12:20:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a3b3580713f3ac5a32dc2874ee546828977a1d68'/>
<id>a3b3580713f3ac5a32dc2874ee546828977a1d68</id>
<content type='text'>
The offset is a count of DAC codes, so the microamp or microvolt units
of min and max cancel out and the final division by 1000 is wrong. For
the +-20 mA range the driver reports -32 instead of -32768. For the
+-5 V and +-10 V ranges min * (1 &lt;&lt; 16) also overflows int, and the
reported offset is 0.

Drop the division and do the multiplication in 64 bits.

Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support")
Signed-off-by: Arka Mondal &lt;arka@arkamondal.net&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The offset is a count of DAC codes, so the microamp or microvolt units
of min and max cancel out and the final division by 1000 is wrong. For
the +-20 mA range the driver reports -32 instead of -32768. For the
+-5 V and +-10 V ranges min * (1 &lt;&lt; 16) also overflows int, and the
reported offset is 0.

Drop the division and do the multiplication in 64 bits.

Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support")
Signed-off-by: Arka Mondal &lt;arka@arkamondal.net&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dac: ad5758: Reject out-of-range raw values</title>
<updated>2026-09-28T16:07:37+00:00</updated>
<author>
<name>Arka Mondal</name>
<email>arka@arkamondal.net</email>
</author>
<published>2026-09-18T12:20:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ebc026be1b719e47bd7f2f1e72fabc875b590f87'/>
<id>ebc026be1b719e47bd7f2f1e72fabc875b590f87</id>
<content type='text'>
ad5758_write_raw() passes the value from userspace straight to
ad5758_spi_reg_write(), which keeps only the low 16 bits. Writing -1
to the raw attribute gives full-scale output, and 65536 gives code 0.

Return -EINVAL for values outside 0 to U16_MAX, as ad5755 does.

Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support")
Signed-off-by: Arka Mondal &lt;arka@arkamondal.net&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ad5758_write_raw() passes the value from userspace straight to
ad5758_spi_reg_write(), which keeps only the low 16 bits. Writing -1
to the raw attribute gives full-scale output, and 65536 gives code 0.

Return -EINVAL for values outside 0 to U16_MAX, as ad5755 does.

Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support")
Signed-off-by: Arka Mondal &lt;arka@arkamondal.net&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dac: ad5758: Fix alignment for DMA safety</title>
<updated>2026-09-28T16:07:37+00:00</updated>
<author>
<name>Arka Mondal</name>
<email>arka@arkamondal.net</email>
</author>
<published>2026-09-18T12:20:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=465bdce79a9fe140a4b46b95f6bdfd880d197148'/>
<id>465bdce79a9fe140a4b46b95f6bdfd880d197148</id>
<content type='text'>
ad5758_spi_reg_read() reads into st-&gt;d32[2] with spi_sync_transfer(),
but d32 is not marked __aligned(IIO_DMA_MINALIGN), so it can share a
cacheline with the fields before it. When DMA is not cache coherent,
the cache invalidation after the read can discard CPU writes to those
fields.

Mark d32 __aligned(IIO_DMA_MINALIGN). It is the last member of the
struct, so nothing comes after it.

Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support")
Signed-off-by: Arka Mondal &lt;arka@arkamondal.net&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ad5758_spi_reg_read() reads into st-&gt;d32[2] with spi_sync_transfer(),
but d32 is not marked __aligned(IIO_DMA_MINALIGN), so it can share a
cacheline with the fields before it. When DMA is not cache coherent,
the cache invalidation after the read can discard CPU writes to those
fields.

Mark d32 __aligned(IIO_DMA_MINALIGN). It is the last member of the
struct, so nothing comes after it.

Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support")
Signed-off-by: Arka Mondal &lt;arka@arkamondal.net&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dac: add support for Microchip MCP48FEB02</title>
<updated>2026-09-28T16:07:36+00:00</updated>
<author>
<name>Ariana Lazar</name>
<email>ariana.lazar@microchip.com</email>
</author>
<published>2026-09-24T12:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=23980cf5443b403182b42da409cef0cc14f733f8'/>
<id>23980cf5443b403182b42da409cef0cc14f733f8</id>
<content type='text'>
This is the IIO driver for Microchip MCP48FxBy1/2/4/8 series of buffered
voltage output Digital-to-Analog Converters with nonvolatile or volatile
memory and an SPI Interface.

The families support up to 8 output channels.

The devices can be 8-bit, 10-bit and 12-bit.

Signed-off-by: Ariana Lazar &lt;ariana.lazar@microchip.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the IIO driver for Microchip MCP48FxBy1/2/4/8 series of buffered
voltage output Digital-to-Analog Converters with nonvolatile or volatile
memory and an SPI Interface.

The families support up to 8 output channels.

The devices can be 8-bit, 10-bit and 12-bit.

Signed-off-by: Ariana Lazar &lt;ariana.lazar@microchip.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dac: mcp47feb02: refactor MCP47FEB02 I2C driver into two modules</title>
<updated>2026-09-28T16:07:36+00:00</updated>
<author>
<name>Ariana Lazar</name>
<email>ariana.lazar@microchip.com</email>
</author>
<published>2026-09-24T12:59:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ddaf34392ce717d0edd7b0b0fafce1b4e0386321'/>
<id>ddaf34392ce717d0edd7b0b0fafce1b4e0386321</id>
<content type='text'>
Prepare the driver for the bus-specific code by refactoring into separate
files. The renamed file will contain the common DAC functionality shared by
the MCP47FxBy1/2/4/8 I2C and MCP48FxBy1/2/4/8 SPI drivers. The MCP47FEB02
driver was refactored into two modules: mcp47feb02-core.c and
mcp47feb02-i2c.c in order to prepare the support for SPI MCP48FxBy1/2/4/8
DAC family on top of the current implementation.

Signed-off-by: Ariana Lazar &lt;ariana.lazar@microchip.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare the driver for the bus-specific code by refactoring into separate
files. The renamed file will contain the common DAC functionality shared by
the MCP47FxBy1/2/4/8 I2C and MCP48FxBy1/2/4/8 SPI drivers. The MCP47FEB02
driver was refactored into two modules: mcp47feb02-core.c and
mcp47feb02-i2c.c in order to prepare the support for SPI MCP48FxBy1/2/4/8
DAC family on top of the current implementation.

Signed-off-by: Ariana Lazar &lt;ariana.lazar@microchip.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dac: mcp47feb02: protect EEPROM store sequence with mutex</title>
<updated>2026-09-28T16:07:36+00:00</updated>
<author>
<name>Ariana Lazar</name>
<email>ariana.lazar@microchip.com</email>
</author>
<published>2026-09-24T12:59:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=55b0514c2863d01e9b168d8a6ad0040d628fb534'/>
<id>55b0514c2863d01e9b168d8a6ad0040d628fb534</id>
<content type='text'>
Move the mutex lock into store_eeprom_store() to prevent race conditions
when reading volatile registers and writing them to the EEPROM.

Fixes: bf394cc80369 ("iio: dac: adding support for Microchip MCP47FEB02")
Closes: https://lore.kernel.org/all/20260819125128.970911F000E9@smtp.kernel.org/
Reported-by: Sashiko &lt;sashiko-bot@kernel.org&gt;
Signed-off-by: Ariana Lazar &lt;ariana.lazar@microchip.com&gt;
Reviewed-by: Joshua Crofts &lt;joshua.crofts1@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the mutex lock into store_eeprom_store() to prevent race conditions
when reading volatile registers and writing them to the EEPROM.

Fixes: bf394cc80369 ("iio: dac: adding support for Microchip MCP47FEB02")
Closes: https://lore.kernel.org/all/20260819125128.970911F000E9@smtp.kernel.org/
Reported-by: Sashiko &lt;sashiko-bot@kernel.org&gt;
Signed-off-by: Ariana Lazar &lt;ariana.lazar@microchip.com&gt;
Reviewed-by: Joshua Crofts &lt;joshua.crofts1@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dac: mcp47feb02: Avoid unjustified probe error on missing label</title>
<updated>2026-09-28T16:07:36+00:00</updated>
<author>
<name>Ariana Lazar</name>
<email>ariana.lazar@microchip.com</email>
</author>
<published>2026-09-24T12:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bce5b7e29e72538ba61f76c6d534a58ab3838438'/>
<id>bce5b7e29e72538ba61f76c6d534a58ab3838438</id>
<content type='text'>
Fix unjustified probe error on missing optional 'label' property by
replacing dev_err_probe() with dev_warn_probe(). Correct %pfw usage by
passing the child fwnode handle directly in the error message. Besides the
probe warning a read error is returned at the attempt of reading a null
label.

Fixes: bf394cc80369 ("iio: dac: adding support for Microchip MCP47FEB02")
Reported-by: sashiko-bot@kernel.org
Closes: https://lore.kernel.org/all/20260804134616.1D8A21F00A3E@smtp.kernel.org/
Cc: stable@vger.kernel.org
Signed-off-by: Ariana Lazar &lt;ariana.lazar@microchip.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix unjustified probe error on missing optional 'label' property by
replacing dev_err_probe() with dev_warn_probe(). Correct %pfw usage by
passing the child fwnode handle directly in the error message. Besides the
probe warning a read error is returned at the attempt of reading a null
label.

Fixes: bf394cc80369 ("iio: dac: adding support for Microchip MCP47FEB02")
Reported-by: sashiko-bot@kernel.org
Closes: https://lore.kernel.org/all/20260804134616.1D8A21F00A3E@smtp.kernel.org/
Cc: stable@vger.kernel.org
Signed-off-by: Ariana Lazar &lt;ariana.lazar@microchip.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dac: mcp4821: reject devices without match data</title>
<updated>2026-09-28T16:07:34+00:00</updated>
<author>
<name>Jiale Yao</name>
<email>yaojiale02@163.com</email>
</author>
<published>2026-09-25T13:17:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6ac1faf4de61dcf27ffe8f2c25d96fe5f4b2886d'/>
<id>6ac1faf4de61dcf27ffe8f2c25d96fe5f4b2886d</id>
<content type='text'>
A device bound through driver_override need not match an entry in the
driver tables. In that case spi_get_device_match_data() returns NULL,
but mcp4821_probe() dereferences the result while configuring the IIO
device.

Reject devices without match data before using the chip information.

Fixes: cdf3ecb0d8d0 ("iio: dac: driver for MCP4821")
Signed-off-by: Jiale Yao &lt;yaojiale02@163.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A device bound through driver_override need not match an entry in the
driver tables. In that case spi_get_device_match_data() returns NULL,
but mcp4821_probe() dereferences the result while configuring the IIO
device.

Reject devices without match data before using the chip information.

Fixes: cdf3ecb0d8d0 ("iio: dac: driver for MCP4821")
Signed-off-by: Jiale Yao &lt;yaojiale02@163.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dac: ad5755: validate SPI match data</title>
<updated>2026-09-28T16:07:34+00:00</updated>
<author>
<name>Jiale Yao</name>
<email>yaojiale02@163.com</email>
</author>
<published>2026-09-25T13:17:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=85e2c8ca7ac9e39a61e7fb18728918f6e966f439'/>
<id>85e2c8ca7ac9e39a61e7fb18728918f6e966f439</id>
<content type='text'>
A device bound through driver_override need not match an entry in the
driver tables. In that case spi_get_device_match_data() returns NULL,
but ad5755_probe() stores and later dereferences the result.

Validate the match data before it is used.

Fixes: 62d3fb9dcc09 ("iio: dac: ad5755: make use of of_device_id table")
Signed-off-by: Jiale Yao &lt;yaojiale02@163.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A device bound through driver_override need not match an entry in the
driver tables. In that case spi_get_device_match_data() returns NULL,
but ad5755_probe() stores and later dereferences the result.

Validate the match data before it is used.

Fixes: 62d3fb9dcc09 ("iio: dac: ad5755: make use of of_device_id table")
Signed-off-by: Jiale Yao &lt;yaojiale02@163.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
