We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

18 posts • Page 1 of 1
janwit
Posts: 8
Joined: Mon Oct 20, 2025 6:45 pm

SPI/IIO and AD7380 driver fault

Mon Oct 20, 2025 7:15 pm

Hi!

I want to use the IIO subsystem driver for the AD7380 chip and used the source from the last analog
Linux repository for the module driver (https://github.com/analogdevicesinc/lin ... ffce563954) and compiled it together with the Rpi Linux kernel branch rpi-6.15.y.

Code: Select all

pi@raspberrypi:~ $ uname -r
6.15.11-v8
Then I adapt the overlay to:

Code: Select all

// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
/plugin/;
/ {
 compatible = "brcm,bcm2835";
 fragment@0 {
 target-path = "/";
 __overlay__ {
 supply_3_3V: fixedregulator@0 {
 compatible = "regulator-fixed";
 regulator-name = "fixed-supply";
 regulator-min-microvolt = <3300000>;
 regulator-max-microvolt = <3300000>;
 regulator-boot-on;
 };
 };
 };
 
 fragment@1 {
 target = <&spi0>;
 __overlay__ {
 #address-cells = <1>;
 #size-cells = <0>;
 status = "okay";
 ad7386-4@0 {
 compatible = "adi,ad7386-4";
 reg = <0>;
 spi-max-frequency = <8000000>;
 spi-cpol;
 spi-cpha;
 vcc-supply = <&supply_3_3V>;
 vlogic-supply = <&supply_3_3V>;
 };
 };
 };
 fragment@2 {
 target = <&spidev0>;
 __overlay__ {
 status = "disabled";
 };
 };
};
As I want to use this driver with the AD7386-4 development board. I connect the
SPI interface from the board to the raspberry checking with 'pinout' the correct GPIO pins.

When I boot into the system and checking the logs I get:

Code: Select all

 $ dmesg
[ 5.830845] ad7380 spi0.0: probe with driver ad7380 failed with error -22
I traced the error with printk in the module to the ad7380_init function when the driver wants to
do a hard reset using the regmap regmap_update_bits.

So, I assume that as the driver wants to write in the register, the SPI data transfer is not working and produces the EINVAL error which shows up
in the log.

Attaching a logic analyzer to the SPI pins on the pin header, running while booting, shows no activity. So it seems to me that
the SPI communication doesn't work and I might have a faulty overlay.

When I remove the fragment@2 part of the overlay above, I get the following errors:

Code: Select all

pi@raspberrypi:/ $ dmesg | grep spi
[ 5.034339] spi spi0.0: chipselect 0 already in use
[ 5.034361] spi_master spi0: spi_device register error /soc/spi@7e204000/spidev@0
[ 5.034385] spi_master spi0: Failed to create SPI device for /soc/spi@7e204000/spidev@0
Which I don't get when I disable spidev0.

Is my overlay still faulty and cannot initiate the correct SPI communication?

Thank you
Jan

aBUGSworstnightmare
Posts: 13432
Joined: Tue Jun 30, 2015 1:35 pm

Re: SPI/IIO and AD7380 driver fault

Mon Oct 20, 2025 7:42 pm

why don't you use the Driver which is in-tree?
https://github.com/raspberrypi/linux/bl ... 0.yaml#L46

don't know If it's enabled in the def_config so make Sure to check

janwit
Posts: 8
Joined: Mon Oct 20, 2025 6:45 pm

Re: SPI/IIO and AD7380 driver fault

Mon Oct 20, 2025 8:13 pm

It is has not the actual features for this chip, even if it is partial implemented.
The driver from analog has the latest commits three weeks ago and the in-tree driver
was updated last year missing important features.

aBUGSworstnightmare
Posts: 13432
Joined: Tue Jun 30, 2015 1:35 pm

Re: SPI/IIO and AD7380 driver fault

Tue Oct 21, 2025 4:05 am

sorry to say, but I will not want to check one version versus the other, but may Look at 6.17 kernel https://github.com/raspberrypi/linux/bl ... c/ad7380.c as that's current mainline kernel release.

janwit
Posts: 8
Joined: Mon Oct 20, 2025 6:45 pm

Re: SPI/IIO and AD7380 driver fault

Tue Oct 21, 2025 5:35 pm

I compiled the 6.17 kernel and used the same overlay as you suggested.

Code: Select all

pi@raspberrypi:~ $ uname -r
6.17.4-v8
Got the same results as before:

Code: Select all

pi@raspberrypi:~ $ dmesg
...
[ 5.518675] ad7380 spi0.0: probe with driver ad7380 failed with error -22

aBUGSworstnightmare
Posts: 13432
Joined: Tue Jun 30, 2015 1:35 pm

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 5:02 am

janwit wrote:
Tue Oct 21, 2025 5:35 pm
I compiled the 6.17 kernel and used the same overlay as you suggested.

Code: Select all

pi@raspberrypi:~ $ uname -r
6.17.4-v8
Got the same results as before:

Code: Select all

pi@raspberrypi:~ $ dmesg
...
[ 5.518675] ad7380 spi0.0: probe with driver ad7380 failed with error -22
how do you enable SPI-0?

janwit
Posts: 8
Joined: Mon Oct 20, 2025 6:45 pm

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 10:09 am

I enabled spi in the config file

Code: Select all

dtparam=spi=on
checking with

Code: Select all

pi@raspberrypi:~ $ lsmod | grep spi
spidev 20480 0
spi_bcm2835 20480 0
shows that the module is loaded, but is not used.

aBUGSworstnightmare
Posts: 13432
Joined: Tue Jun 30, 2015 1:35 pm

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 11:11 am

https://github.com/torvalds/linux/blob/ ... base.h#L26

add below to the end of your config.txt

Code: Select all

# create debug information
dtdebug=1
reboot and then run

Code: Select all

raspinfo | pastebinit
post the resulting link here. Will not bother with na single line from kernel log any further!


aBUGSworstnightmare
Posts: 13432
Joined: Tue Jun 30, 2015 1:35 pm

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 12:39 pm

As I don't have such ADC I'm not able to test my overlay to see if the driver get's loaded (overlay get's processed during boot but as there is no device the driver doesn't get started).

Code: Select all

pi@newpi5:~ $ grep -r "ad7380" /lib/modules
grep: /lib/modules/6.12.54-v8-16k+/modules.alias.bin: binary file matches
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7388-4 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7387-4 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7386-4 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7384-4 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7383-4 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7381-4 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7380-4 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7388 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7387 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7386 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7384 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7383 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7381 ad7380
/lib/modules/6.12.54-v8-16k+/modules.alias:alias spi:ad7380 ad7380
grep: /lib/modules/6.12.54-v8-16k+/modules.dep.bin: binary file matches
/lib/modules/6.12.54-v8-16k+/modules.dep:kernel/drivers/iio/adc/ad7380.ko.xz: kernel/drivers/iio/buffer/industrialio-triggered-buffer.ko.xz kernel/drivers/iio/buffer/kfifo_buf.ko.xz kernel/drivers/iio/industrialio.ko.xz
/lib/modules/6.12.54-v8-16k+/modules.order:kernel/drivers/iio/adc/ad7380.ko
Do you see the same error when using the in-tree driver (and not the 'latest' one)?

Code: Select all

/*
 * spi0-1cs-test-overlay.dts
 * aBUGSworstnightmare, 10/22/2025
 * rev01
 */
/dts-v1/;
/plugin/;
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
/ {
	compatible = "brcm,bcm2835";
	fragment@0 {
		target = <&spi0_cs_pins>;
		frag0: __overlay__ {
			brcm,pins = <8>;
		};
	};
	fragment@1 {
		target = <&spi0>;
		frag1: __overlay__ {
			cs-gpios = <&gpio 8 1>;
			status = "okay";
		};
	};
	fragment@2 {
		target = <&spidev0>;
		__overlay__ {
			status = "disabled";
		};
	};
	fragment@3 {
		target = <&spidev1>;
		__overlay__ {
			status = "disabled";
		};
	};
	
	fragment@4 {
		target = <&gpio>;
		__overlay__ {
			adc7386_pins: adc7386_pins {
				brcm,pins = <4>; // ADC_INT
				brcm,function = <0>; // 0 = input
				brcm,pull = <2 0>; // 0 = none, 1 = pull down, 2 = pull up
			};
		};
	};	
	fragment@5 {
		target-path = "/";
			__overlay__ {
				supply_3_3V: fixedregulator@0 {
				compatible = "regulator-fixed";
				regulator-name = "fixed-supply";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
			};
		};
	};
	fragment@10 {
		target = <&spi0>;
		__overlay__ {
			/* needed to avoid dtc warning */
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			adc7386: adc7386@0 {
				compatible = "adi,ad7386-4";
				reg = <0>;
				spi-cpol;
				spi-cpha;
				spi-max-frequency = <80000000>;
				pinctrl-names = "default";
				pinctrl-0 = <&adc7386_pins>;
				interrupt-parent = <&gpio>;
				interrupts = <4 2>; // high-to-low edge triggered
				irq-gpios = <&gpio 4 0>; // Pin7 on GPIO header
				vcc-supply = <&supply_3_3V>;
				vlogic-supply = <&supply_3_3V>;
				refio-supply = <&supply_3_3V>;
			};
		};
	};
	__overrides__ {
		speed = <&adc7386>, "spi-max-frequency:0";
	};
};

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 18476
Joined: Wed Dec 04, 2013 11:27 am

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 2:02 pm

There are minimal differences between Analog Devices' tree that is based on 6.12 and mainline 6.18.
Most are due to an in-kernel API change from iio_device_claim_direct_mode to iio_device_claim_direct, and iio_device_release_direct_mode to iio_device_release_direct.
Beyond that you're looking at

Code: Select all

index 245d861e9b52..fa251dc1aae6 100644
--- a/drivers/iio/adc/ad7380.c
+++ b/drivers/iio/adc/ad7380.c
@@ -79,9 +79,6 @@
 
 #define AD7380_CONFIG2_SDO2 GENMASK(9, 8)
 #define AD7380_CONFIG2_SDO BIT(8)
-#define AD7380_CONFIG2_SDO_2_WIRE 0
-#define AD7380_CONFIG2_SDO_1_WIRE 1
-#define AD7380_CONFIG2_SDO_4_WIRE 2
 #define AD7380_CONFIG2_RESET GENMASK(7, 0)
 
 #define AD7380_CONFIG2_RESET_SOFT 0x3C
@@ -904,7 +901,6 @@ struct ad7380_state {
 struct spi_offload *offload;
 struct spi_offload_trigger *offload_trigger;
 unsigned long offload_trigger_hz;
- u32 num_sdi;
 
 int sample_freq_range[3];
 /*
@@ -914,8 +910,7 @@ struct ad7380_state {
 * Make the buffer large enough for MAX_NUM_CHANNELS 32-bit samples and
 * one 64-bit aligned 64-bit timestamp.
 */
- u8 scan_data[ALIGN(MAX_NUM_CHANNELS * sizeof(u32), sizeof(s64))
- + sizeof(s64)] __aligned(IIO_DMA_MINALIGN);
+ IIO_DECLARE_DMA_BUFFER_WITH_TS(u8, scan_data, MAX_NUM_CHANNELS * sizeof(u32));
 /* buffers for reading/writing registers */
 u16 tx;
 u16 rx;
@@ -1203,8 +1197,7 @@ static int ad7380_init_offload_msg(struct ad7380_state *st,
 
 xfer->bits_per_word = scan_type->realbits;
 xfer->offload_flags = SPI_OFFLOAD_XFER_RX_STREAM;
- xfer->len = AD7380_SPI_BYTES(scan_type) *
- st->chip_info->num_simult_channels / st->num_sdi;
+ xfer->len = AD7380_SPI_BYTES(scan_type) * st->chip_info->num_simult_channels;
 
 spi_message_init_with_transfers(&st->offload_msg, xfer, 1);
 st->offload_msg.offload = st->offload;
@@ -1228,53 +1221,15 @@ static int ad7380_offload_buffer_postenable(struct iio_dev *indio_dev)
 .frequency_hz = st->offload_trigger_hz,
 },
 };
- u32 sdo;
 int ret;
 
 ret = ad7380_init_offload_msg(st, indio_dev);
 if (ret)
 return ret;
 
- /*
- * When the sequencer is required to read all channels, we need to
- * trigger twice per sample period in order to read one complete set
- * of samples.
- */
- if (st->seq)
- config.periodic.frequency_hz *= 2;
-
- switch (st->num_sdi) {
- case 2:
- sdo = AD7380_CONFIG2_SDO_2_WIRE;
- break;
- case 4:
- sdo = AD7380_CONFIG2_SDO_4_WIRE;
- break;
- default:
- sdo = AD7380_CONFIG2_SDO_1_WIRE;
- break;
- }
-
- ret = regmap_update_bits(st->regmap, AD7380_REG_ADDR_CONFIG2,
- AD7380_CONFIG2_SDO2,
- FIELD_PREP(AD7380_CONFIG2_SDO2, sdo));
- if (ret)
- goto err_unoptimize;
-
 ret = spi_offload_trigger_enable(st->offload, st->offload_trigger, &config);
 if (ret)
- goto err_restore_sdo;
-
- return 0;
-
-err_restore_sdo:
- regmap_update_bits(st->regmap, AD7380_REG_ADDR_CONFIG2,
- AD7380_CONFIG2_SDO2,
- FIELD_PREP(AD7380_CONFIG2_SDO2,
- AD7380_CONFIG2_SDO_1_WIRE));
-
-err_unoptimize:
- spi_unoptimize_message(&st->offload_msg);
+ spi_unoptimize_message(&st->offload_msg);
 
 return ret;
 }
@@ -1287,11 +1242,6 @@ static int ad7380_offload_buffer_predisable(struct iio_dev *indio_dev)
 spi_offload_trigger_disable(st->offload, st->offload_trigger);
 spi_unoptimize_message(&st->offload_msg);
 
- regmap_update_bits(st->regmap, AD7380_REG_ADDR_CONFIG2,
- AD7380_CONFIG2_SDO2,
- FIELD_PREP(AD7380_CONFIG2_SDO2,
- AD7380_CONFIG2_SDO_1_WIRE));
-
 if (st->seq) {
 ret = regmap_update_bits(st->regmap,
 AD7380_REG_ADDR_CONFIG1,
@@ -1405,8 +1355,8 @@ static irqreturn_t ad7380_trigger_handler(int irq, void *p)
 if (ret)
 goto out;
 
- iio_push_to_buffers_with_timestamp(indio_dev, &st->scan_data,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, &st->scan_data, sizeof(st->scan_data),
+ pf->timestamp);
 
 out:
 iio_trigger_notify_done(indio_dev->trig);
@@ -1866,9 +1809,9 @@ static int ad7380_init(struct ad7380_state *st, bool external_ref_en)
 
 /* SPI 1-wire mode */
 return regmap_update_bits(st->regmap, AD7380_REG_ADDR_CONFIG2,
- AD7380_CONFIG2_SDO2,
- FIELD_PREP(AD7380_CONFIG2_SDO2,
- AD7380_CONFIG2_SDO_1_WIRE));
+ AD7380_CONFIG2_SDO,
+ FIELD_PREP(AD7380_CONFIG2_SDO,
+ AD7380_NUM_SDO_LINES));
 }
 
 static int ad7380_probe_spi_offload(struct iio_dev *indio_dev,
@@ -2108,14 +2051,6 @@ static int ad7380_probe(struct spi_device *spi)
 ret = ad7380_probe_spi_offload(indio_dev, st);
 if (ret)
 return ret;
-
- /* ADI tree extension to handle HDL with multiple SDI lines. */
- ret = device_property_read_u32(dev, "adi,num-sdi", &st->num_sdi);
- if (ret == -EINVAL)
- st->num_sdi = 1; /* default */
- else if (ret)
- return dev_err_probe(dev, ret,
- "Failed to read adi,num-sdi property\n");
 }
 
 ret = ad7380_init(st, external_ref_en);
So AD have added some magic that "handles HDL with multiple SDI lines", whatever that means. That's not going to fundamentally change the behaviour of the driver.

I would agree that If you're getting -EINVAL (-22) from regmap_update_bits then your SPI interface isn't working.

Checking the EVAL-AD7386-4 datasheet, page 5 says
LK5 VLOGIC 3 Use on-board 2.3 V from U6 for VLOGIC.
If that is for the I/O, then 2.3V will be a little low for the Pi which is expecting 3.3V signals, but they don't appear to provide a schematic to confirm how that is connected. I'd measure it to confirm whether the signals are at the expected levels.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

janwit
Posts: 8
Joined: Mon Oct 20, 2025 6:45 pm

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 6:12 pm

Thank you aBUGSworstnightmare and 6by9 for your comments,

I tried your overlay aBUGSworstnightmare, but when I want to compile it
I get the following error:

Code: Select all

root@raspberrypi:/home/pi# dtc -@ -Hepapr -I dts -O dtb -o ad7380.dtbo rpi-ad738x-overlay-web.dts
Error: rpi-ad738x-overlay-web.dts:10.1-9 syntax error
FATAL ERROR: Unable to parse input tree
I checked it twice, but I don't find the syntax error.
I would agree that If you're getting -EINVAL (-22) from regmap_update_bits then your SPI interface isn't working.
Is it then a wrong overlay? I removed the init function (in which the regmap_updates do a chip reset) in the module probe and
the driver loads with the full integration in the iio systen and showing up in /sys/bus/iio/devices.

I checked the schematics aand indeed
the logic level is at 2.3V as they use the ADP166AUJZ-2.3-R7 fixed regulator.

Jan

aBUGSworstnightmare
Posts: 13432
Joined: Tue Jun 30, 2015 1:35 pm

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 6:19 pm

my advice as usual: compile your overlays in-tree. You get the errors because of the includes.
janwit wrote:
Wed Oct 22, 2025 6:12 pm
...
I tried your overlay aBUGSworstnightmare, but when I want to compile it
I get the following error:

Code: Select all

root@raspberrypi:/home/pi# dtc -@ -Hepapr -I dts -O dtb -o ad7380.dtbo rpi-ad738x-overlay-web.dts
Error: rpi-ad738x-overlay-web.dts:10.1-9 syntax error
FATAL ERROR: Unable to parse input tree
I checked it twice, but I don't find the syntax error.
.
line 10 is

Code: Select all

#include <dt-bindings/interrupt-controller/irq.h>

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 18476
Joined: Wed Dec 04, 2013 11:27 am

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 6:42 pm

janwit wrote:
Wed Oct 22, 2025 6:12 pm
I checked the schematics aand indeed
the logic level is at 2.3V as they use the ADP166AUJZ-2.3-R7 fixed regulator.
Check the voltage on MISO then.
The Pi Vih (lowest voltage to read as a logic high) is listed as 2.0V in the CM4 datasheet (it'll be similar for all the SoCs), so that is likely a little on the close side if the AD7386 is only putting out 2.3V. Running Vlogic on 3.3V would be the more logical answer.

Then again my memory says SPI hasn't got any form of acknowledgement, so I'd have expected to get back 0 instead of a failure.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

janwit
Posts: 8
Joined: Mon Oct 20, 2025 6:45 pm

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 7:46 pm

Do you see the same error when using the in-tree driver (and not the 'latest' one)?
I compiled your overlay, but this giving me:

Code: Select all

[ 5.599159] pinctrl-bcm2835 fe200000.gpio: /soc/gpio@7e200000/adc7386_pins: brcm,pull must have 1 or 1 entries
so I changed it to

Code: Select all

fragment@4 {
 target = <&gpio>;
 __overlay__ {
 adc7386_pins: adc7386_pins {
 brcm,pins = <4>; // ADC_INT
 brcm,function = <0>; // 0 = input
 brcm,pull = <2>; // 0 = none, 1 = pull down, 2 = pull up
 };
 };
 }; 
Recompiling the overlay gives the same error as I have with mine previously posted overlay..
The logs are here

aBUGSworstnightmare
Posts: 13432
Joined: Tue Jun 30, 2015 1:35 pm

Re: SPI/IIO and AD7380 driver fault

Wed Oct 22, 2025 9:25 pm

janwit wrote:
Wed Oct 22, 2025 7:46 pm
Do you see the same error when using the in-tree driver (and not the 'latest' one)?
I compiled your overlay, but this giving me:

Code: Select all

[ 5.599159] pinctrl-bcm2835 fe200000.gpio: /soc/gpio@7e200000/adc7386_pins: brcm,pull must have 1 or 1 entries
so I changed it to

Code: Select all

fragment@4 {
 target = <&gpio>;
 __overlay__ {
 adc7386_pins: adc7386_pins {
 brcm,pins = <4>; // ADC_INT
 brcm,function = <0>; // 0 = input
 brcm,pull = <2>; // 0 = none, 1 = pull down, 2 = pull up
 };
 };
 }; 
Recompiling the overlay gives the same error as I have with mine previously posted overlay..
The logs are here
that's a copy&paste error; missed that as I can't test the overlay as I don't have the device.

janwit
Posts: 8
Joined: Mon Oct 20, 2025 6:45 pm

Re: SPI/IIO and AD7380 driver fault

Mon Nov 10, 2025 10:48 am

Figured out, that the kernel module calls

Code: Select all

spi_sync_transfer()
for reading and writing using regmap with the
option

Code: Select all

.bits_per_word = 16
This actually doesn't work as the SPI driver only supports word length up to 8 bits.
An option should could be a using the auxiliary SPI device which can transmit at higher words but it unfortunately doesn't support SPI mode 3 which the chip needs.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 18476
Joined: Wed Dec 04, 2013 11:27 am

Re: SPI/IIO and AD7380 driver fault

Mon Nov 10, 2025 2:47 pm

Nice find.

I'm slightly surprised that something wasn't logging an error.
The SPI driver advertises the mask of supported transfer lengths, and indeed appears to validate it (https://elixir.bootlin.com/linux/v6.17. ... 3938-L3949). The AD7380 driver appears to be returning that error code, so that sort of implies that whatever is calling the driver isn't checking the return code.

Pi5 does use a different SPI controller to the earlier boards, and that does support 16bit transfers.
I don't know enough about SPI to advise as to whether there is a workaround on the earlier boards.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

18 posts • Page 1 of 1

Return to "Interfacing (DSI, CSI, I2C, etc.)"

AltStyle によって変換されたページ (->オリジナル) /