All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wortham <Jason.Wortham@maxim-ic.com>
To: Dirk Brandewie <dirk.brandewie@gmail.com>
Cc: bruce robertson <bruce.e.robertson@intel.com>,
	Anton Vorontsov <cbouatmailru@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dg77.kim@samsung.com" <dg77.kim@samsung.com>,
	"kyungmin.park@samsung.com" <kyungmin.park@samsung.com>,
	"myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>
Subject: RE: [PATCH 4/5] max17042: Fix value scaling for VCELL and avgVCELL
Date: Tue, 13 Mar 2012 17:04:25 -0700	[thread overview]
Message-ID: <26513DAD5DB1304EAC06B61C2DD20C270DB5ECE589@ITSVLEX06.it.maxim-ic.internal> (raw)
In-Reply-To: <4F5FD151.104@gmail.com>

Ok, the datasheet is written that way as a commitment about the hardware ADC accuracy/resolution.  However, the ADC performs a set of 8x samples, and as a result will have an average which provides some additional "fake" resolution.  Even though this extra resolution isn't strong in an analog way, it's still useful information.

But I guess I'm really splitting hairs here since it's such a small resolution.

--Jason

-----Original Message-----
From: Dirk Brandewie [mailto:dirk.brandewie@gmail.com] 
Sent: Tuesday, March 13, 2012 3:59 PM
To: Jason Wortham
Cc: bruce robertson; Anton Vorontsov; dirk.brandewie@gmail.com; linux-kernel@vger.kernel.org; dg77.kim@samsung.com; kyungmin.park@samsung.com; myungjoo.ham@samsung.com
Subject: Re: [PATCH 4/5] max17042: Fix value scaling for VCELL and avgVCELL

On 03/13/2012 02:04 PM, Jason Wortham wrote:
> The bottom 3 bits are still functional bits and aren't required to be masked.  Arguably these bits are below the hardware accuracy of the ADC, however, they still provide some averaging information.
>

The datasheet for the 17042 shows the bottom three bits as don't care that
was the reason for the mask.

If Jason says it is still accurate without the mask I am fine with it.

--Dirk
> --Jason
>
> -----Original Message-----
> From: bruce robertson [mailto:bruce.e.robertson@intel.com]
> Sent: Tuesday, March 13, 2012 2:00 PM
> To: Anton Vorontsov
> Cc: dirk.brandewie@gmail.com; linux-kernel@vger.kernel.org; dg77.kim@samsung.com; kyungmin.park@samsung.com; myungjoo.ham@samsung.com; Jason Wortham
> Subject: Re: [PATCH 4/5] max17042: Fix value scaling for VCELL and avgVCELL
>
> Anton Vorontsov<cbouatmailru@gmail.com>  writes:
>
>> On Tue, Jan 24, 2012 at 09:26:07AM -0800, dirk.brandewie@gmail.com wrote:
>>> From: Bruce Robertson<bruce.e.robertson@intel.com>
>>>
>>> The bottom three bits of the register are don't care bits.  The LSB
>>> value is 625 uV.  Adjust the returned values appropriately
>>>
>>> Signed-off-by: Bruce Robertson<bruce.e.robertson@intel.com>
>>> Signed-off-by: Dirk Brandewie<dirk.brandewie@gmail.com>
>>> Acked-by: MyungJoo Ham<myungjoo.ham@samsung.com>
>>
>> I guess this was fixed long ago by the following patch:
>>
>> commit cf7a8c03db792894f436db5f3ffc44d947b9b068
>> Author: MyungJoo Ham<myungjoo.ham@samsung.com>
>> Date:   Wed Aug 17 10:18:34 2011 +0900
>>
>>      max17042_battery: Bugfix of incorrect voltage register value interpretation
>>
>>      The calculation had error in getting voltage values from
>>      MAX17042 registers. The least bit denotes 78.125uV (625/8).
>
> The multipliers I see in the patch are 83 making the voltages somewhat
> high and the low 3 bits are not masked off. I'm probably misreading the code.
>
>>
>>      Signed-off-by: MyungJoo Ham<myungjoo.ham@samsung.com>
>>      Signed-off-by: Philip Rakity<prakity@marvell.com>
>>      Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
>>      Signed-off-by: Anton Vorontsov<cbouatmailru@gmail.com>
>>
>> Thanks,


  reply	other threads:[~2012-03-14  0:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24 17:26 [PATCH 0/5] MAX17042 add support for maxim POR procedure dirk.brandewie
2012-01-24 17:26 ` [PATCH 1/5] max17042: Align register definitions with data sheet and init appnote dirk.brandewie
2012-01-24 17:26 ` [PATCH 2/5] max17042: Add POR init procedure from Maxim appnote dirk.brandewie
2012-01-24 17:26 ` [PATCH 3/5] max17042: Add support for signalling change in SOC dirk.brandewie
2012-01-24 17:26 ` [PATCH 4/5] max17042: Fix value scaling for VCELL and avgVCELL dirk.brandewie
2012-03-13 18:19   ` Anton Vorontsov
2012-03-13 21:00     ` bruce robertson
2012-03-13 21:04       ` Jason Wortham
2012-03-13 22:59         ` Dirk Brandewie
2012-03-14  0:04           ` Jason Wortham [this message]
2012-03-13 23:18         ` bruce robertson
2012-03-14  0:37           ` Jason Wortham
2012-01-24 17:26 ` [PATCH 5/5] max17042: Change capacity property to use reported SOC register dirk.brandewie
2012-03-13 18:34   ` Anton Vorontsov
2012-03-13 22:54     ` Dirk Brandewie
2012-02-28 16:17 ` [PATCH 0/5] MAX17042 add support for maxim POR procedure Dirk Brandewie
2012-03-13 18:48 ` Anton Vorontsov

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=26513DAD5DB1304EAC06B61C2DD20C270DB5ECE589@ITSVLEX06.it.maxim-ic.internal \
    --to=jason.wortham@maxim-ic.com \
    --cc=bruce.e.robertson@intel.com \
    --cc=cbouatmailru@gmail.com \
    --cc=dg77.kim@samsung.com \
    --cc=dirk.brandewie@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.