public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: kernel list <linux-kernel@vger.kernel.org>, Greg KH <greg@kroah.com>
Cc: sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org,
	linux-pm@vger.kernel.org
Subject: Mess in the /sysfs: class/power_supply
Date: Sat, 31 Jan 2015 22:39:19 +0100	[thread overview]
Message-ID: <20150131213919.GA16133@amd> (raw)

Hi!

So we have multiple values in one sysfs file:

root@n900:/sys/class/power_supply# cat bq24150a-0/registers
0x00=0x50
0x01=0xc8
0x02=0x8e
0x03=0x4b
0x04=0x99

(should this go to debugfs somewhere?)

Unobvious and undocumented entries:

root@n900:/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$


And different units in different parts of tree:

(these are mA)

root@n900:/sys/class/power_supply# cat bq24150a-0/current_limit
1800
root@n900:/sys/class/power_supply# cat bq24150a-0/termination_current
100

(and this is in uA)

root@n900:/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?

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

             reply	other threads:[~2015-01-31 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-31 21:39 Pavel Machek [this message]
2015-02-25 21:44 ` Mess in the /sysfs: class/power_supply/bq2415x Sebastian Reichel
2015-02-25 22:01   ` Pali Rohár

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=20150131213919.GA16133@amd \
    --to=pavel@ucw.cz \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox