sbs-battery: make writes to ManufacturerAccess optional
authorGuenter Roeck <linux@roeck-us.net>
Fri, 9 Sep 2016 02:10:00 +0000 (19:10 -0700)
committerSebastian Reichel <sre@kernel.org>
Mon, 19 Sep 2016 19:02:17 +0000 (21:02 +0200)
commit17c6d3979e5bbff1de36a4e89015fa09ac495d27
treeef0dd71aebc4183c4c7c00baadc7fa1ef8cc9e7d
parent0610735928ee47870e083d5901caa371089216f1
sbs-battery: make writes to ManufacturerAccess optional

According to the Smart Battery Data Specification, the use
of ManufacturerAcess (register 0x0) is implementation-defined.
It appears that some batteries use writes to this register
in order to implement certain functionality, but others may
simply NAK all writes to it. As a result, write failures to
ManufacturerAccess should not be used as an indicator of
battery presence, nor as a failure to enter sleep mode.

The failed write access was seen with SANYO AP13J3K.

Cc: Brian Norris <briannorris@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/sbs-battery.c