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>
This commit is contained in:
parent
3b5dd3a494
commit
c65a8b5112
2 changed files with 12 additions and 31 deletions
|
@ -28,10 +28,6 @@ struct bq24735_platform {
|
|||
|
||||
const char *name;
|
||||
|
||||
int status_gpio;
|
||||
int status_gpio_active_low;
|
||||
bool status_gpio_valid;
|
||||
|
||||
bool ext_control;
|
||||
|
||||
char **supplied_to;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue