diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-15 16:04:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-15 16:04:24 +0200 |
commit | bcb392871813ef9e233645557d6dd85bb1a6f41a (patch) | |
tree | 87ab70fa9c3de7e4c446c7043576003351108201 /drivers/staging | |
parent | f0b9d875faa4499afe3381404c3795e9da84bc00 (diff) | |
parent | 928edefbc18cd8433f7df235c6e09a9306e7d580 (diff) |
Merge tag 'iio-fixes-for-5.7b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
iio-fixes-for-5.7b Second set of fixes for IIO in the 5.7 cycle.
Usual mixed bag of breakage in new code and ancient bugs.
ad2s1210
- Fix missing CS change needed to actually read anything.
atlas-sensor
- Avoid clashing scan index with the timestamp channel.
sca3000
- Fix a randomly placed get_device in an error message print.
st_lsm6dsx
- Fix missing unlock in error path.
stm32-adc
- Fix which device is used to request DMA to ensure it's one
that has actually been registered at point of use.
stm32-dfsdm
- Fix which device is used to request DMA to ensure it's one
that has actually been registered at poitn of use.
ti-ads8344
- Fix channel selection.
vf610 dac
- Fix some missing error handling code.
* tag 'iio-fixes-for-5.7b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
iio: sca3000: Remove an erroneous 'get_device()'
iio: adc: stm32-dfsdm: fix device used to request dma
iio: adc: stm32-adc: fix device used to request dma
iio: adc: ti-ads8344: Fix channel selection
staging: iio: ad2s1210: Fix SPI reading
iio: dac: vf610: Fix an error handling path in 'vf610_dac_probe()'
iio: imu: st_lsm6dsx: unlock on error in st_lsm6dsx_shub_write_raw()
iio: chemical: atlas-sensor: correct DO-SM channels
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/iio/resolver/ad2s1210.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index 4b25a3a314ed..ed404355ea4c 100644 --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -130,17 +130,24 @@ static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data) static int ad2s1210_config_read(struct ad2s1210_state *st, unsigned char address) { - struct spi_transfer xfer = { - .len = 2, - .rx_buf = st->rx, - .tx_buf = st->tx, + struct spi_transfer xfers[] = { + { + .len = 1, + .rx_buf = &st->rx[0], + .tx_buf = &st->tx[0], + .cs_change = 1, + }, { + .len = 1, + .rx_buf = &st->rx[1], + .tx_buf = &st->tx[1], + }, }; int ret = 0; ad2s1210_set_mode(MOD_CONFIG, st); st->tx[0] = address | AD2S1210_MSB_IS_HIGH; st->tx[1] = AD2S1210_REG_FAULT; - ret = spi_sync_transfer(st->sdev, &xfer, 1); + ret = spi_sync_transfer(st->sdev, xfers, 2); if (ret < 0) return ret; |