aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/cpcap-battery.c
AgeCommit message (Collapse)Author
2018-12-05power: supply: cpcap-battery: make array cpcap_battery_irqs static, shrinks ↵Colin Ian King
object size Don't populate the array cpcap_battery_irqs on the stack but instead make it static. Makes the object code smaller by 99 bytes: Before: text data bss dec hex filename 13673 2448 0 16121 3ef9 cpcap-battery.o After: text data bss dec hex filename 13510 2512 0 16022 3e96 cpcap-battery.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2017-12-01power: supply: cpcap-battery: Fix platform_get_irq_byname's error checkingArvind Yadav
The platform_get_irq_byname() function returns -1 if an error occurs. zero or positive number on success. platform_get_irq_byname() error checking for zero is not correct. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-06-08power: supply: cpcap-battery: Add a battery driverTony Lindgren
On the CPCAP PMIC we can use the ADCs for monitoring the battery, and there is also a coulomb counter. So let's add basic support for the battery driver. I did not add any capacity prediction as that should probably be done in the user space. Or at least user space should tell the kernel some battery statistics and then the kernel driver could display the capacity based on that. Cc: devicetree@vger.kernel.org Cc: Marcel Partap <mpartap@gmx.net> Cc: Michael Scott <michael.scott@linaro.org> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>