lkml.org 
[lkml]   [2011]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] w1: Add Maxim/Dallas DS2780 Stand-Alone Fuel Gauge IC support.
On 31/05/2011 14:42, Barnes, Clifton A. wrote:
> On Monday, May 30, 2011, Simon INIZAN wrote:
>
>> However from time to time I a getting stuck in the driver.
> Getting stuck meaning a deadlock? Is it during a read on a
> sysfs file? Are you using the driver compiled in or as a
> module?
I have tested the driver with the fix you provided me, I am not getting
a deadlock anymore.

>> FYI, I am using the GPIO 1-wire driver, and from time to time the gauge is not responding to the w1 queries.
> Is this the same condition you're talking about above? Does this mean that sometimes
> the sysfs file returns and sometimes it hangs?
>
It seems I am getting some flipped bits on the 1-wire bus (using the
w1-gpio master),
this is not directly related to your driver but it makes the results not
very reliable
on my platform (sometimes the rsgain is wrong, so are the currents).
I am getting a 1-wire bus analyzer to investigate the issue.



In the get_current function, you are returning:

sense_res = 1000 / sense_res_raw;
*current_uA = current_raw * (DS2780_CURRENT_UNITS / sense_res);


Which means that we are getting current (in µA) = current_raw (in
µV/Ohms) * sense_res_raw (in Ohms).
I have replaced it with

sense_res = sense_res_raw;
*current_uA = current_raw * (DS2780_CURRENT_UNITS / sense_res);


Which gives me more consistent results with my measures.

Simon

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-08-11 10:27    [W:0.035 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site