aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/power_supply.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for Note 8 (N5100 and N5110)sbrissen2013-11-111-0/+5
| | | | Change-Id: I6c9798682f9f6349b37cb452353bd0c0e6958401
* Revert "max77693: Standardize the output of the "online" property"Ricardo Cerqueira2013-09-191-2/+1
| | | | | | | | This reverts commit 1a05356029493b29f866cf04f7550243ef3ae687, the enumerator breakage introduced by change Iafbd9fb45253b02d539ac0ba114f57b3bf9eeed4 can be reverted cleanly without further impact and it's a cleaner fix Change-Id: I351c320f98691241fbe321a0b1ac54152802deb4
* smdk4412: add i925/p4noteltevzw supportsbrissen2013-06-251-0/+1
| | | | Change-Id: I17d3befd6a6538c16db0675253927068a09085c6
* d710: initial support for the Epic 4G Touch (SPH-D710)Dorian Snyder2013-06-201-2/+8
| | | | Change-Id: Iafbd9fb45253b02d539ac0ba114f57b3bf9eeed4
* merge opensource jb u5codeworkx2012-09-221-0/+37
| | | | Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2
* samsung update 1codeworkx2012-06-021-0/+17
|
* power_supply: Update power_supply_is_watt_propertyRhyland Klein2011-03-011-0/+1
| | | | | | | Update the power_supply_is_watt_property function to include POWER_NOW. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* power_supply: Add new LED trigger charging-blink-solid-fullVasily Khoruzhick2011-01-311-0/+2
| | | | | | | | | Add new trigger to power_supply LEDs. It will blink when battery is charging, and stay solid when battery is charged. It's usefull to indicate battery state when there's only one LED available. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* bq20z75: Add support for charge propertiesRhyland Klein2011-01-311-0/+44
| | | | | | | | | | | | | Adding support for charge properties for gas gauge. Also ensuring that battery mode is correct now for energy as well as charge properties by setting it on the fly. I also added 2 functions to power_supply.h to help identify the units for specific properties more easily by power supplies. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* power_supply: Introduce maximum current propertyHeikki Krogerus2010-10-061-0/+1
| | | | | | | USB only gives the maximum current allowed to draw. Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* power_supply: Add types for USB chargersHeikki Krogerus2010-10-061-1/+4
| | | | | | | | This adds power supply types for USB chargers defined in Battery Charging Specification 1.1. Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* power_supply: Add support for writeable propertiesDaniel Mack2010-05-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for writeable power supply properties and exposes them as writeable to sysfs. A power supply implementation must implement two new function calls in order to use that feature: int set_property(struct power_supply *psy, enum power_supply_property psp, const union power_supply_propval *val); int property_is_writeable(struct power_supply *psy, enum power_supply_property psp); Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Alexey Starikovskiy <astarikovskiy@suse.de> Cc: Len Brown <len.brown@intel.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Matt Reimer <mreimer@vpop.net> Cc: Evgeniy Polyakov <zbr@ioremap.net> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* power_supply: Use attribute groupsAnton Vorontsov2010-05-191-0/+1
| | | | | | | | | | | | | | This fixes a race between power supply device and initial attributes creation, plus makes it possible to implement writable properties. [Daniel Mack - removed superflous return statement and dropped .mode attribute from POWER_SUPPLY_ATTR] Suggested-by: Greg KH <gregkh@suse.de> Suggested-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Tested-by: Daniel Mack <daniel@caiaq.de>
* POWER: Add support for cycle_countAlexey Starikovskiy2010-01-151-0/+1
| | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* power_supply: get_by_name and set_charged functionalityDaniel Mack2009-07-301-0/+3
| | | | | | | | | | | | | | | | This adds a function that indicates that a battery is fully charged. It also includes functions to get a power_supply device from the class of registered devices by name reference. These can be used to find a specific battery to call power_supply_set_battery_charged() on. Some battery drivers might need this information to calibrate themselves. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Ian Molton <spyro@f2s.com> Cc: Anton Vorontsov <cbou@mail.ru> Cc: Matt Reimer <mreimer@vpop.net> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* power_supply: Add a charge_type property, and use it for olpc driverAndres Salomon2009-07-021-0/+8
| | | | | | | | | | | | | This adds a new sysfs file called 'charge_type' which displays the type of charging (unknown, n/a, trickle charge, or fast charging). This allows things like battery diagnostics to determine what the battery/EC is doing without resorting to changing the 'status' sysfs output. Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* Revert "power: remove POWER_SUPPLY_PROP_CAPACITY_LEVEL"Andres Salomon2009-07-011-0/+10
| | | | | | | | | | | | | | | This reverts commit 8efe444038a205e79b38b7ad03878824901849a8 and 4cbc76eadf56399cd11fb736b33c53aec9caab8c. Richard@laptop.org was apparently using CAPACITY_LEVEL for debugging battery/EC problems, and was upset that it was removed. This readds it. Conflicts: Documentation/power_supply_class.txt Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* ACPI: battery: add power_{now,avg} properties to power_classAlexey Starikovskiy2009-03-271-0/+2
| | | | | | | | | | ACPI has smart batteries, which work in units of energy and measure rate of (dis)charge as power, thus it is not appropriate to export it as a current_now. Current_now will still be exported to allow for userland applications to match. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* power_supply: Add cold to the POWER_SUPPLY_HEALTH report valuesMark Brown2009-01-041-0/+1
| | | | | | | | | Some systems are able to report problems with batteries being under temperature. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* power_supply: Add function to return system-wide power stateMatthew Garrett2008-09-011-0/+6
| | | | | | | | | | Certain drivers benefit from knowing whether the system is on ac or battery, for instance when determining which backlight registers to read. This adds a simple call to determine whether there's an online power supply other than any batteries. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* power_supply: add CHARGE_COUNTER property and olpc_battery support for itAndres Salomon2008-05-131-0/+1
| | | | | | | | | | | | | This adds PROP_CHARGE_COUNTER to the power supply class (documenting it as well). The OLPC battery driver uses this for spitting out its ACR values (in uAh). We have some rounding errors (the data sheet claims 416.7, the math actually works out to 416.666667, so we're forced to choose between overflows or precision loss. I chose precision loss, and stuck w/ data sheet values), but I don't think anyone will care that much. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* ACPI: battery: add sysfs serial numbermaximilian attems2008-02-051-0/+1
| | | | | | | | | | | | egrep serial /proc/acpi/battery/BAT0/info serial number: 32090 serial number can tell you from the imminent danger of beeing set on fire. Signed-off-by: maximilian attems <max@stro.at> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* power_supply: add few more values and propsDmitry Baryshkov2008-02-021-0/+3
| | | | | | | | Add LiMn (one of the most common for small non-rechargable batteries) battery technology and voltage_min/_max properties support. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
* power: remove POWER_SUPPLY_PROP_CAPACITY_LEVELAndres Salomon2008-02-021-10/+0
| | | | | | | | | | | | | | | | | | | | | | | The CAPACITY_LEVEL stuff defines various levels of charge; however, what is the difference between them? What differentiates between HIGH and NORMAL, LOW and CRITICAL, etc? As it appears that these are fairly arbitrary, we end up making such policy decisions in the kernel (or in hardware). This is the sort of decision that should be made in userspace, not in the kernel. If the hardware does not support _CAPACITY and it cannot be easily calculated, then perhaps the driver should register a custom CAPACITY_LEVEL attribute; however, userspace should not become accustomed to looking for such a thing, and we should certainly not encourage drivers to provide CAPACITY_LEVEL stubs. The following removes support for POWER_SUPPLY_PROP_CAPACITY_LEVEL. The OLPC battery driver is the only driver making use of this, so it's removed from there as well. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [BATTERY] Universal power supply class (was: battery class)Anton Vorontsov2007-07-101-0/+180
This class is result of "external power" and "battery" classes merge, as suggested by David Woodhouse. He also implemented uevent support. Here how userspace seeing it now: # ls /sys/class/power\ supply/ ac main-battery usb # cat /sys/class/power\ supply/ac/type AC # cat /sys/class/power\ supply/usb/type USB # cat /sys/class/power\ supply/main-battery/type Battery # cat /sys/class/power\ supply/ac/online 1 # cat /sys/class/power\ supply/usb/online 0 # cat /sys/class/power\ supply/main-battery/status Charging # cat /sys/class/leds/h5400\:red-left/trigger none h5400-radio timer hwtimer ac-online usb-online main-battery-charging-or-full [main-battery-charging] main-battery-full Signed-off-by: Anton Vorontsov <cbou@mail.ru> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>