From: Jonathan Cameron <jic23@kernel.org>
To: Eva Rachel Retuya <eraretuya@gmail.com>,
linux-iio@vger.kernel.org, outreachy-kernel@googlegroups.com
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de,
pmeerw@pmeerw.net, gregkh@linuxfoundation.org
Subject: Re: [PATCH v4 1/2] staging: iio: ad7606: fix improper setting of oversampling pins
Date: Sat, 8 Oct 2016 17:44:15 +0100 [thread overview]
Message-ID: <1f33d844-e8da-c2fc-0a0a-7e32a8be8fc0@kernel.org> (raw)
In-Reply-To: <b1ac6778d27e1406a8fd83b329266fce6144248e.1475942324.git.eraretuya@gmail.com>
On 08/10/16 17:05, Eva Rachel Retuya wrote:
> 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>
I've applied this to the togreg branch of iio.git, but not currently marked
it for stable. Primarily because it has been broken for a very long time.
If anyone wants this in stable, then feel free to shout out and we can send the
request to stable once it has merged.
Applied to the togreg branch and pushed out as testing for the autobuilders to
play with it.
Thanks,
Jonathan
> ---
> drivers/staging/iio/adc/ad7606_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c
> index f79ee61..cbd6bc5 100644
> --- a/drivers/staging/iio/adc/ad7606_core.c
> +++ b/drivers/staging/iio/adc/ad7606_core.c
> @@ -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);
>
>
next prev parent reply other threads:[~2016-10-08 16:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-08 16:05 [PATCH v4 0/2] staging: iio: ad7606: oversampling_ratio clean-up Eva Rachel Retuya
2016-10-08 16:05 ` [PATCH v4 1/2] staging: iio: ad7606: fix improper setting of oversampling pins Eva Rachel Retuya
2016-10-08 16:44 ` Jonathan Cameron [this message]
2016-10-08 16:05 ` [PATCH v4 2/2] staging: iio: ad7606: implement IIO_CHAN_INFO_OVERSAMPLING_RATIO Eva Rachel Retuya
2016-10-08 16:45 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f33d844-e8da-c2fc-0a0a-7e32a8be8fc0@kernel.org \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=eraretuya@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).