mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Marek Belisko <marek@goldelico.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	hns@goldelico.com
Subject: Re: [PATCH 1/2] iio: adc: twl4030_madc: Fix calculation of the temperature sense current
Date: Sun, 07 Jun 2015 17:25:35 +0100	[thread overview]
Message-ID: <5574707F.6000109@kernel.org> (raw)
In-Reply-To: <1432842619-7251-1-git-send-email-marek@goldelico.com>

On 28/05/15 20:50, Marek Belisko wrote:
> From: "H. Nikolaus Schaller" <hns@goldelico.com>
> 
> The bit mask to read the setting of the constant current source
> for measuring the NTC voltage was the wrong one. Since default
> value is initialized to the lowest level (000 = 10uA) the difference
> was probably never noticed in practice.
I'm going to take that literally and apply it via the slow route on
the basis that a bug no one noticed doesn't need fixing fast!
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> Signed-off-by: Marek Belisko <marek@goldelico.com>
Applied to the togreg branch of iio.git - initially pushed out as
testing for the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/iio/adc/twl4030-madc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c
> index 94c5f05..6d2d429 100644
> --- a/drivers/iio/adc/twl4030-madc.c
> +++ b/drivers/iio/adc/twl4030-madc.c
> @@ -235,7 +235,7 @@ static int twl4030battery_temperature(int raw_volt)
>  	if (ret < 0)
>  		return ret;
>  
> -	curr = ((val & TWL4030_BCI_ITHEN) + 1) * 10;
> +	curr = ((val & TWL4030_BCI_ITHSENS) + 1) * 10;
>  	/* Getting and calculating the thermistor resistance in ohms */
>  	res = volt * 1000 / curr;
>  	/* calculating temperature */
> 


  parent reply	other threads:[~2015-06-07 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 19:50 Marek Belisko
2015-05-28 19:50 ` [PATCH 2/2] iio: adc: twl4030_madc: Fix description of twl4030_madc_set_current_generator() Marek Belisko
2015-06-07 16:25 ` Jonathan Cameron [this message]
2015-06-07 16:33   ` [PATCH 1/2] iio: adc: twl4030_madc: Fix calculation of the temperature sense current Dr. H. Nikolaus Schaller

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=5574707F.6000109@kernel.org \
    --to=jic23@kernel.org \
    --cc=hns@goldelico.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek@goldelico.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

all inboxes | Powered by JetHome®