linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Christian Eggers <ceggers@arri.de>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: light: as73211: Fix AS73211_CREG1_GAIN_1
Date: Sat, 29 Aug 2020 16:41:25 +0100	[thread overview]
Message-ID: <20200829164125.540f5667@archlinux> (raw)
In-Reply-To: <CAHp75VfBMXPyH80d0hrUqohC4wvgBNSSNp4N86JcfiWSfWHs+w@mail.gmail.com>

On Wed, 26 Aug 2020 19:11:37 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Wed, Aug 26, 2020 at 12:55 PM Christian Eggers <ceggers@arri.de> wrote:
> >
> > Wrong value was introduced during review process.  
> 
> Ooops, long reviews have their outcomes...
> 
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

Thanks.  Add I hadn't pushed this out yet in a non rebasing branch
I have folded it into the original patch.

thanks,

Jonathan

> 
> > Signed-off-by: Christian Eggers <ceggers@arri.de>
> > ---
> > Patch against jic23/iio.git, branch testing
> >
> >  drivers/iio/light/as73211.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c
> > index 3383aaacbf52..e76747b99b92 100644
> > --- a/drivers/iio/light/as73211.c
> > +++ b/drivers/iio/light/as73211.c
> > @@ -56,7 +56,7 @@
> >  #define AS73211_AGEN_MUT(x)       FIELD_PREP(AS73211_AGEN_MUT_MASK, (x))
> >
> >  #define AS73211_CREG1_GAIN_MASK   GENMASK(7, 4)
> > -#define AS73211_CREG1_GAIN_1      13
> > +#define AS73211_CREG1_GAIN_1      11
> >  #define AS73211_CREG1_TIME_MASK   GENMASK(3, 0)
> >
> >  #define AS73211_CREG3_CCLK_MASK   GENMASK(1, 0)
> > @@ -217,7 +217,7 @@ static void as73211_integration_time_calc_avail(struct as73211_data *data)
> >
> >  static unsigned int as73211_gain(struct as73211_data *data)
> >  {
> > -       /* gain can be calculated from CREG1 as 2^(13 - CREG1_GAIN) */
> > +       /* gain can be calculated from CREG1 as 2^(11 - CREG1_GAIN) */
> >         return BIT(AS73211_CREG1_GAIN_1 - FIELD_GET(AS73211_CREG1_GAIN_MASK, data->creg1));
> >  }
> >
> > @@ -473,7 +473,7 @@ static int _as73211_write_raw(struct iio_dev *indio_dev,
> >                 if (val < 0 || !is_power_of_2(val) || val2)
> >                         return -EINVAL;
> >
> > -               /* gain can be calculated from CREG1 as 2^(13 - CREG1_GAIN) */
> > +               /* gain can be calculated from CREG1 as 2^(11 - CREG1_GAIN) */
> >                 reg_bits = AS73211_CREG1_GAIN_1 - ilog2(val);
> >                 if (!FIELD_FIT(AS73211_CREG1_GAIN_MASK, reg_bits))
> >                         return -EINVAL;
> > --
> > Christian Eggers
> > Embedded software developer
> >
> > Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
> > Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918
> > Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
> > Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477
> > Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler
> >  
> 
> 


      reply	other threads:[~2020-08-29 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  9:52 [PATCH] iio: light: as73211: Fix AS73211_CREG1_GAIN_1 Christian Eggers
2020-08-26 16:11 ` Andy Shevchenko
2020-08-29 15:41   ` Jonathan Cameron [this message]

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=20200829164125.540f5667@archlinux \
    --to=jic23@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=ceggers@arri.de \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).