diff options
-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, | |||
107 | return bq24735_write_word(client, reg, tmp); | 107 | return bq24735_write_word(client, reg, tmp); |
108 | } | 108 | } |
109 | 109 | ||
110 | static inline int bq24735_enable_charging(struct bq24735 *charger) | ||
111 | { | ||
112 | if (charger->pdata->ext_control) | ||
113 | return 0; | ||
114 | |||
115 | return bq24735_update_word(charger->client, BQ24735_CHG_OPT, | ||
116 | BQ24735_CHG_OPT_CHARGE_DISABLE, 0); | ||
117 | } | ||
118 | |||
119 | static inline int bq24735_disable_charging(struct bq24735 *charger) | ||
120 | { | ||
121 | if (charger->pdata->ext_control) | ||
122 | return 0; | ||
123 | |||
124 | return bq24735_update_word(charger->client, BQ24735_CHG_OPT, | ||
125 | BQ24735_CHG_OPT_CHARGE_DISABLE, | ||
126 | BQ24735_CHG_OPT_CHARGE_DISABLE); | ||
127 | } | ||
128 | |||
129 | static int bq24735_config_charger(struct bq24735 *charger) | 110 | static int bq24735_config_charger(struct bq24735 *charger) |
130 | { | 111 | { |
131 | struct bq24735_platform *pdata = charger->pdata; | 112 | struct bq24735_platform *pdata = charger->pdata; |
@@ -177,6 +158,25 @@ static int bq24735_config_charger(struct bq24735 *charger) | |||
177 | return 0; | 158 | return 0; |
178 | } | 159 | } |
179 | 160 | ||
161 | static inline int bq24735_enable_charging(struct bq24735 *charger) | ||
162 | { | ||
163 | if (charger->pdata->ext_control) | ||
164 | return 0; | ||
165 | |||
166 | return bq24735_update_word(charger->client, BQ24735_CHG_OPT, | ||
167 | BQ24735_CHG_OPT_CHARGE_DISABLE, 0); | ||
168 | } | ||
169 | |||
170 | static inline int bq24735_disable_charging(struct bq24735 *charger) | ||
171 | { | ||
172 | if (charger->pdata->ext_control) | ||
173 | return 0; | ||
174 | |||
175 | return bq24735_update_word(charger->client, BQ24735_CHG_OPT, | ||
176 | BQ24735_CHG_OPT_CHARGE_DISABLE, | ||
177 | BQ24735_CHG_OPT_CHARGE_DISABLE); | ||
178 | } | ||
179 | |||
180 | static bool bq24735_charger_is_present(struct bq24735 *charger) | 180 | static bool bq24735_charger_is_present(struct bq24735 *charger) |
181 | { | 181 | { |
182 | if (charger->status_gpio) { | 182 | if (charger->status_gpio) { |