Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: ad4851: add spi 3-wire support

Add support for 3-wire configuration within the driver.
By default 4-wire configuration is used.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20250626104024.8645-2-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Antoniu Miclaus and committed by
Jonathan Cameron
695b7c42 0fbd8017

+6 -4
+6 -4
drivers/iio/adc/ad4851.c
··· 444 444 if (ret) 445 445 return ret; 446 446 447 - ret = regmap_write(st->regmap, AD4851_REG_INTERFACE_CONFIG_A, 448 - AD4851_SDO_ENABLE); 449 - if (ret) 450 - return ret; 447 + if (!(st->spi->mode & SPI_3WIRE)) { 448 + ret = regmap_write(st->regmap, AD4851_REG_INTERFACE_CONFIG_A, 449 + AD4851_SDO_ENABLE); 450 + if (ret) 451 + return ret; 452 + } 451 453 452 454 ret = regmap_read(st->regmap, AD4851_REG_PRODUCT_ID_L, &product_id); 453 455 if (ret)