From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: Antoniu Miclaus <antoniu.miclaus@analog.com>,
krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: admv1013: add mixer_vgate corner cases
Date: Mon, 28 Aug 2023 19:07:09 +0100 [thread overview]
Message-ID: <20230828190709.32228a9e@jic23-huawei> (raw)
In-Reply-To: <2df639c71d3a6e876efddd5ba18c56ca68a4ccaa.camel@gmail.com>
On Tue, 08 Aug 2023 08:32:51 +0200
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Mon, 2023-08-07 at 17:38 +0300, Antoniu Miclaus wrote:
> > Include the corner cases in the computation of the MIXER_VGATE register
> > value.
> >
> > According to the datasheet: The MIXER_VGATE values follows the VCM such
> > as, that for a 0V to 1.8V VCM, MIXER_VGATE = 23.89 VCM + 81, and for a >
> > 1.8V to 2.6V VCM, MIXER_VGATE = 23.75 VCM + 1.25.
> >
> > Fixes: da35a7b526d9 ("iio: frequency: admv1013: add support for ADMV1013")
> > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> > ---
>
> Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.
Was a but of fuzz due to other fixes but I would be surprised if that was
a problem.
Thanks,
Jonathan
>
> > drivers/iio/frequency/admv1013.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/iio/frequency/admv1013.c
> > b/drivers/iio/frequency/admv1013.c
> > index 9bf8337806fc..df29f1216b9a 100644
> > --- a/drivers/iio/frequency/admv1013.c
> > +++ b/drivers/iio/frequency/admv1013.c
> > @@ -348,9 +348,9 @@ static int admv1013_update_mixer_vgate(struct
> > admv1013_state *st)
> >
> > vcm = regulator_get_voltage(st->reg);
> >
> > - if (vcm < 1800000)
> > + if (vcm <= 1800000)
> > mixer_vgate = (2389 * vcm / 1000000 + 8100) / 100;
> > - else if (vcm > 1800000 && vcm < 2600000)
> > + else if (vcm > 1800000 && vcm <= 2600000)
> > mixer_vgate = (2375 * vcm / 1000000 + 125) / 100;
> > else
> > return -EINVAL;
>
prev parent reply other threads:[~2023-08-28 18:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 14:38 [PATCH] iio: admv1013: add mixer_vgate corner cases Antoniu Miclaus
2023-08-08 6:32 ` Nuno Sá
2023-08-28 18:07 ` 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=20230828190709.32228a9e@jic23-huawei \
--to=jic23@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noname.nuno@gmail.com \
/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