Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iio: adc: at91: fix wrong channel number in triggered buffer mode
commit aea835f upstream. When channels are registered, the hardware channel number is not the actual iio channel number. This is because the driver is probed with a certain number of accessible channels. Some pins are routed and some not, depending on the description of the board in the DT. Because of that, channels 0,1,2,3 can correspond to hardware channels 2,3,4,5 for example. In the buffered triggered case, we need to do the translation accordingly. Fixed the channel number to stop reading the wrong channel. Fixes: 0e589d5 ("ARM: AT91: IIO: Add AT91 ADC driver.") Cc: Maxime Ripard <[email protected]> Signed-off-by: Eugen Hristev <[email protected]> Acked-by: Ludovic Desroches <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information