diff options
author | Peter Rosin <peda@axentia.se> | 2016-12-20 14:33:00 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2017-01-05 00:00:41 +0300 |
commit | 2e66585ca255df195278a50143e0bccf26d735d6 (patch) | |
tree | 9d855b7312f49b3418f93cebd9800671e7f1f4af /drivers/power/supply/bq24735-charger.c | |
parent | 5b903a1555e1d5b6e12ede53d5d8dc86fef94a03 (diff) | |
download | linux-2e66585ca255df195278a50143e0bccf26d735d6.tar.xz |
power: supply: bq24735: move down bq24735_{en,dis}able_charging
bq24735_enable_charging() needs to call bq24735_config_charging(),
which is something to change later, this is just a preparatory patch.
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/supply/bq24735-charger.c')
-rw-r--r-- | drivers/power/supply/bq24735-charger.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/power/supply/bq24735-charger.c b/drivers/power/supply/bq24735-charger.c index 8a0242c13b7e..2787c19d6696 100644 --- a/drivers/power/supply/bq24735-charger.c +++ b/drivers/power/supply/bq24735-charger.c @@ -107,25 +107,6 @@ static int bq24735_update_word(struct i2c_client *client, u8 reg, return bq24735_write_word(client, reg, tmp); } -static inline int bq24735_enable_charging(struct bq24735 *charger) -{ - if (charger->pdata->ext_control) - return 0; - - return bq24735_update_word(charger->client, BQ24735_CHG_OPT, - BQ24735_CHG_OPT_CHARGE_DISABLE, 0); -} - -static inline int bq24735_disable_charging(struct bq24735 *charger) -{ - if (charger->pdata->ext_control) - return 0; - - return bq24735_update_word(charger->client, BQ24735_CHG_OPT, - BQ24735_CHG_OPT_CHARGE_DISABLE, - BQ24735_CHG_OPT_CHARGE_DISABLE); -} - static int bq24735_config_charger(struct bq24735 *charger) { struct bq24735_platform *pdata = charger->pdata; @@ -177,6 +158,25 @@ static int bq24735_config_charger(struct bq24735 *charger) return 0; } +static inline int bq24735_enable_charging(struct bq24735 *charger) +{ + if (charger->pdata->ext_control) + return 0; + + return bq24735_update_word(charger->client, BQ24735_CHG_OPT, + BQ24735_CHG_OPT_CHARGE_DISABLE, 0); +} + +static inline int bq24735_disable_charging(struct bq24735 *charger) +{ + if (charger->pdata->ext_control) + return 0; + + return bq24735_update_word(charger->client, BQ24735_CHG_OPT, + BQ24735_CHG_OPT_CHARGE_DISABLE, + BQ24735_CHG_OPT_CHARGE_DISABLE); +} + static bool bq24735_charger_is_present(struct bq24735 *charger) { if (charger->status_gpio) { |