Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Mohammed Billoo <mab.kernel@gmail.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Marek Vasut" <marex@denx.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Biju Das" <biju.das.jz@bp.renesas.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ti-ads1015: Use correct pga upper bound
Date: Sun, 7 Jan 2024 16:15:24 +0000	[thread overview]
Message-ID: <20240107161524.7dc72a3f@jic23-huawei> (raw)
In-Reply-To: <20240106174836.1086714-1-mab.kernel@gmail.com>

On Sat,  6 Jan 2024 12:48:35 -0500
Mohammed Billoo <mab.kernel@gmail.com> wrote:

> The devicetree binding and datasheets (for both the ADS1015 and
> ADS1115) show that the PGA index should have a maximum value of 5,
> and not 6.
> 
> Signed-off-by: Mohammed Billoo <mab.kernel@gmail.com>

Hi Mohammed,

Seems correct, but I'm curious - did you see an actual problem with
setting the value to 6?  From my reading of the ads1115 datasheet
6 and 7 should be functionally identical to 5.

Anyhow, good to clean it up anyway so applied to the togreg branch of
iio.git but that tree will be rebased on rc1 once available so for
now I'll just push it as testing for 0-day to get started on testing it.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/ti-ads1015.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
> index 6799ea49dbc7..6ae967e4d8fa 100644
> --- a/drivers/iio/adc/ti-ads1015.c
> +++ b/drivers/iio/adc/ti-ads1015.c
> @@ -925,7 +925,7 @@ static int ads1015_client_get_channels_config(struct i2c_client *client)
>  
>  		if (!fwnode_property_read_u32(node, "ti,gain", &pval)) {
>  			pga = pval;
> -			if (pga > 6) {
> +			if (pga > 5) {
>  				dev_err(dev, "invalid gain on %pfw\n", node);
>  				fwnode_handle_put(node);
>  				return -EINVAL;


  reply	other threads:[~2024-01-07 16:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-06 17:48 [PATCH] iio: adc: ti-ads1015: Use correct pga upper bound Mohammed Billoo
2024-01-07 16:15 ` Jonathan Cameron [this message]
2024-01-08 13:37   ` Mohammed Billoo

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=20240107161524.7dc72a3f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mab.kernel@gmail.com \
    --cc=marex@denx.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /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