]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adc: ad7768-1: set MOSI idle state to prevent accidental reset
authorJonathan Santos <Jonathan.Santos@analog.com>
Thu, 6 Mar 2025 21:00:43 +0000 (18:00 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:24 +0000 (14:39 +0200)
commit967570b52826741f51d5ebdbeff264e425c426ce
treeef47564aa2ea702f8d82cfa05eb4dc963bfde8dd
parentdd6391006379d7c3ff42936dfa28bb76555b70d4
iio: adc: ad7768-1: set MOSI idle state to prevent accidental reset

[ Upstream commit 2416cec859299be04d021b4cf98eff814f345af7 ]

Datasheet recommends Setting the MOSI idle state to high in order to
prevent accidental reset of the device when SCLK is free running.
This happens when the controller clocks out a 1 followed by 63 zeros
while the CS is held low.

Check if SPI controller supports SPI_MOSI_IDLE_HIGH flag and set it.

Fixes: a5f8c7da3dbe ("iio: adc: Add AD7768-1 ADC basic support")
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://patch.msgid.link/c2a2b0f3d54829079763a5511359a1fa80516cfb.1741268122.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/ad7768-1.c