lkml.org 
[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/5] max17042: Fix value scaling for VCELL and avgVCELL
Date
Jason Wortham <Jason.Wortham@maxim-ic.com> writes:

> 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.

About the multiplier. why are the multipliers 83? 83*8==664 uV.

>
> --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,


\
 
 \ /
  Last update: 2012-03-14 00:21    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site