lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 11 Aug 2011 10:19:29 +0200
From:	Simon INIZAN <simon.inizan@...bie.fr>
To:	"Barnes, Clifton A." <cabarnes@...esign-llc.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ