summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorMichael Heinemann <posted@heine.so>2017-07-07 16:23:54 +0200
committerSebastian Reichel <sre@kernel.org>2017-07-24 14:08:52 +0200
commit0188155a234bf77c7588bdedf3b77cc87bfeb7df (patch)
tree7c2ef7b3d5876525ac70725a8e88838e6eb1b4eb /drivers/power
parent520eccdfe187591a51ea9ab4c1a024ae4d0f68d9 (diff)
power: supply: sbs-battery: correct capacity mode selection bits
The capacity mode bit is bit 15. Currently it is written as default initialized enum and never shifted. This leads to a behaviour where the BATTERY_MODE is not correctly recognized and set again. This commit initializes the enum accordingly. Signed-off-by: Michael Heinemann <committed@heine.so> Tested-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/sbs-battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c
index f7059459f0fb..e8065af085bd 100644
--- a/drivers/power/supply/sbs-battery.c
+++ b/drivers/power/supply/sbs-battery.c
@@ -60,8 +60,8 @@ enum {
#define BATTERY_MODE_OFFSET 0x03
#define BATTERY_MODE_MASK 0x8000
enum sbs_battery_mode {
- BATTERY_MODE_AMPS,
- BATTERY_MODE_WATTS
+ BATTERY_MODE_AMPS = 0,
+ BATTERY_MODE_WATTS = 0x8000
};
/* manufacturer access defines */