Skip to content

Commit fccfb9c

Browse files
dbogdanjic23
authored andcommitted
iio: ad_sigma_delta: select channel when reading register
The desired channel has to be selected in order to correctly fill the buffer with the corresponding data. The `ad_sd_write_reg()` already does this, but for the `ad_sd_read_reg_raw()` this was omitted. Fixes: af30084 ("iio:adc: Add common code for ADI Sigma Delta devices") Signed-off-by: Dragos Bogdan <[email protected]> Signed-off-by: Alexandru Ardelean <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent f6a7bf2 commit fccfb9c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/iio/adc/ad_sigma_delta.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ static int ad_sd_read_reg_raw(struct ad_sigma_delta *sigma_delta,
121121
if (sigma_delta->info->has_registers) {
122122
data[0] = reg << sigma_delta->info->addr_shift;
123123
data[0] |= sigma_delta->info->read_mask;
124+
data[0] |= sigma_delta->comm;
124125
spi_message_add_tail(&t[0], &m);
125126
}
126127
spi_message_add_tail(&t[1], &m);

0 commit comments

Comments
 (0)