mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
staging: iio: ad7606: fix improper setting of oversampling pins
commitb321a38d24
upstream. The oversampling ratio is controlled using the oversampling pins, OS [2:0] with OS2 being the MSB control bit, and OS0 the LSB control bit. The gpio connected to the OS2 pin is not being set correctly, only OS0 and OS1 pins are being set. Fix the typo to allow proper control of the oversampling pins. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Fixes:b9618c0
("staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4") Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fc322290fc
commit
a673f99884
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ static ssize_t ad7606_store_oversampling_ratio(struct device *dev,
|
|||
mutex_lock(&indio_dev->mlock);
|
||||
gpio_set_value(st->pdata->gpio_os0, (ret >> 0) & 1);
|
||||
gpio_set_value(st->pdata->gpio_os1, (ret >> 1) & 1);
|
||||
gpio_set_value(st->pdata->gpio_os1, (ret >> 2) & 1);
|
||||
gpio_set_value(st->pdata->gpio_os2, (ret >> 2) & 1);
|
||||
st->oversampling = lval;
|
||||
mutex_unlock(&indio_dev->mlock);
|
||||
|
||||
|
|
Loading…
Reference in a new issue