power: supply: bq24735-charger: Request status GPIO with initial input setup
authorPaul Kocialkowski <contact@paulk.fr>
Fri, 2 Sep 2016 22:09:53 +0000 (00:09 +0200)
committerSebastian Reichel <sre@kernel.org>
Mon, 5 Sep 2016 10:59:49 +0000 (12:59 +0200)
commitc65a8b51123a14f6960e4238bfa4673d54ee183a
tree6c71dafdd88c4ff44c84b4b809229df38061b889
parent3b5dd3a49496220b35af83c96e3d2ff5716550ae
power: supply: bq24735-charger: Request status GPIO with initial input setup

This requests the status GPIO with initial input setup. It is required
to read the GPIO status at probe time and thus correctly avoid sending
I2C messages when AC is not plugged.

When requesting the GPIO without initial input setup, it always reads 0
which causes probe to fail as it assumes the charger is connected, sends
I2C messages and fails.

While at it, this switches the driver over to gpiod API.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/bq24735-charger.c
include/linux/power/bq24735-charger.h