power: supply: twl4030-charger: don't check if battery is present
authorH. Nikolaus Schaller <hns@goldelico.com>
Fri, 14 Apr 2017 19:29:38 +0000 (21:29 +0200)
committerSebastian Reichel <sre@kernel.org>
Mon, 1 May 2017 09:41:37 +0000 (11:41 +0200)
commit19a2ee69c20255157738402b6fdbcf5d708dad80
tree319d79b056c52e2184d9bf43416a9b8e271de1e0
parent3fb319c2cdcd10f775f4d4a05a7d12fa1a5679c1
power: supply: twl4030-charger: don't check if battery is present

We can't assume that the battery is or stays present after probing
on devices with replaceable battery.

On some devices (e.g. GTA04 or OpenPanodra) it can be removed
and even be hot swapped by the user while device continues to operate
through external AC or USB power (as long as system power consumption
remains below ca. 500mA as provided by USB). Under certain conditions
it is possible to boot without battery.

So it makes no sense to check for this situation during probe and make
the charger driver (and its status reports) completely non-operational if
the battery can be inserted later.

Tested on: GTA04 and OpenPandora.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/twl4030_charger.c