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-next>] [day] [month] [year] [list]
Date:	Fri, 7 Aug 2009 19:19:07 -0700
From:	Brian Swetland <swetland@...gle.com>
To:	Anton Vorontsov <cbou@...l.ru>,
	David Woodhouse <dwmw2@...radead.org>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: power_supply class/framework question

(feel free to redirect me to a different mailing list if there's a
more appropriate place to ask this question)

I'm working on cleaning up some code to more correctly use the power
supply framework (have the battery driver receive notification from
the wall/usb power supplies, etc), and ran into a slight snag.  For
mobile usb powered devices, we need to know how much current can
safely be consumed by the charge circuit -- generally this is one of:
none, <500mA or 1000mA, which correspond to "no power supply", "usb
power supply", or "wall power supply".

I can use power_supply_am_i_supplied() to determine if I'm receiving
power, but there's no way to determine either how much (if I have one
power supply that indicates max current available) or which supply (if
I define a separate "ac" and "usb" power supply).

I'd be happy to throw together some patches to handle this, but was
wondering if there was any preference in how such information would be
made available.

Thanks,

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