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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150225214441.GK13695@earth>
Date:	Wed, 25 Feb 2015 22:44:42 +0100
From:	Sebastian Reichel <sre@...nel.org>
To:	Pavel Machek <pavel@....cz>
Cc:	kernel list <linux-kernel@...r.kernel.org>,
	Greg KH <greg@...ah.com>, dbaryshkov@...il.com,
	dwmw2@...radead.org, linux-pm@...r.kernel.org,
	Pali Rohár <pali.rohar@...il.com>
Subject: Re: Mess in the /sysfs: class/power_supply/bq2415x

Hi Pavel,

On Sat, Jan 31, 2015 at 10:39:19PM +0100, Pavel Machek wrote:
> So we have multiple values in one sysfs file:
> 
> root@...0:/sys/class/power_supply# cat bq24150a-0/registers
> 0x00=0x50
> 0x01=0xc8
> 0x02=0x8e
> 0x03=0x4b
> 0x04=0x99
> 
> (should this go to debugfs somewhere?)

I guess this should be dropped in favour of debugfs. A standardized
debugfs node will be exported automatically if the driver is
converted to regmap.

> Unobvious and undocumented entries:
> 
> root@...0:/sys/class/power_supply# cat bq24150a-0/boost_status
> 0
> pavel@duo:/data/l/linux-n900$ grep -ri boost_status Documentation/
> pavel@duo:/data/l/linux-n900$ grep -ri termination_current Documentation/
> pavel@duo:/data/l/linux-n900$ grep -ri current_now Documentation/
> pavel@duo:/data/l/linux-n900$ grep -ri time_to_empty_avg Documentation/
> pavel@duo:/data/l/linux-n900$

Anton seems to have missed making Pali to write a Documentation
patch. Pali: Can you do so, please?

> And different units in different parts of tree:
> 
> (these are mA)
> 
> root@...0:/sys/class/power_supply# cat bq24150a-0/current_limit
> 1800
> root@...0:/sys/class/power_supply# cat bq24150a-0/termination_current
> 100
> 
> (and this is in uA)
> 
> root@...0:/sys/class/power_supply# cat bq27200-0/current_now
> 12138
> 
> (I believe uA is right, so it is bq24150a that should be fixed....?)

> Ok, of course questions are: do we need to do something with it? If
> so, what?

For consistency it should be uA, but I guess this would introduce a
regression for Maemo people. Pali?

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ