summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorPraneeth Bajjuri <praneeth@ti.com>2015-01-22 15:36:35 -0600
committerPraneeth Bajjuri <praneeth@ti.com>2015-01-22 18:32:23 -0600
commit944373614bd4cdb2b683baa8bcd72e2c4dca53f9 (patch)
tree1516a71093ec152f644495d055bdf15975f7f9be /drivers/power
parent2c0bedb6fc11067ff8da0052c9b09157f7d858ea (diff)
parent2bd3cb5bc1f59c6476359b1a268f69c98639438e (diff)
Merge branch 'p-android-3.14' into p-ti-linux-3.14.y-android
* p-android-3.14: (191 commits) selinux: Remove obsolete selinux_audit_data initialization. usb: gadget: mtp/ptp: Migrate functions to the USB_FUNCTION interface selinux: make the netif cache namespace aware selinux: correctly label /proc inodes in use before the policy is loaded selinux: fix a problem with IPv6 traffic denials in selinux_ip_postroute() selinux: fix inode security list corruption selinux: put the mmap() DAC controls before the MAC controls selinux: reduce the number of calls to synchronize_net() when flushing caches pstore: selinux: add security in-core xattr support for pstore and debugfs pstore: add pmsg pstore: handle zero-sized prz in series pstore: remove superfluous memory size check pstore: use scnprintf pstore: clarify clearing of _read_cnt in ramoops_context prctl: make PR_SET_TIMERSLACK_PID pid namespace aware prctl: fix misplaced PR_SET_TIMERSLACK_PID case ARM: 8120/1: crypto: sha512: add ARM NEON implementation ARM: 8119/1: crypto: sha1: add ARM NEON implementation ARM: 8118/1: crypto: sha1/make use of common SHA-1 structures crypto: arm-aes - fix encryption of unaligned data ... Conflicts due to patches from google android-3.14 and also since the branch is not in sync with 3.14.29 stable branch. Conflicts: arch/arm64/include/asm/unistd32.h fs/pstore/inode.c kernel/futex.c Change-Id: I8e8be540d9e76abc118c093451e21ec4628df5ce Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/power_supply_sysfs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index 7566e15701e..6650f8fe548 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -105,7 +105,10 @@ static ssize_t power_supply_show_property(struct device *dev,
else if (off >= POWER_SUPPLY_PROP_MODEL_NAME)
return sprintf(buf, "%s\n", value.strval);
- return sprintf(buf, "%d\n", value.intval);
+ if (off == POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT)
+ return sprintf(buf, "%lld\n", value.int64val);
+ else
+ return sprintf(buf, "%d\n", value.intval);
}
static ssize_t power_supply_store_property(struct device *dev,
@@ -193,6 +196,8 @@ static struct device_attribute power_supply_attrs[] = {
POWER_SUPPLY_ATTR(usb_hc),
POWER_SUPPLY_ATTR(usb_otg),
POWER_SUPPLY_ATTR(charge_enabled),
+ /* Local extensions of type int64_t */
+ POWER_SUPPLY_ATTR(charge_counter_ext),
/* Properties of type `const char *' */
POWER_SUPPLY_ATTR(model_name),
POWER_SUPPLY_ATTR(manufacturer),