diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-06-19 13:16:48 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:33:41 -0700 |
commit | 7180a5464027187ba4794fc0619a6640e0ba245c (patch) | |
tree | cdd493a073ed97540ab8adaa9d2b989fcde8303e /drivers | |
parent | 08ae6a3539f7eb6257a475750ea1acf67af523ba (diff) |
power: sbs-battery: remove exported API for charger status update
Battery gauge driver, sbs-battery, have the communication with charger
driver through battery-charger-gauge communication framework and so
no need to export the API for same purpose.
Removing the status_update() API.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/240070
(cherry picked from commit 91447f03fe459dfb74938f316fa89feb651de92f)
Change-Id: Ib161f7f8189c44beb8bc42deeafe3ae10d222423
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/253349
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/sbs-battery.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/drivers/power/sbs-battery.c b/drivers/power/sbs-battery.c index 30f5f07d1c39..2f1c4a966da1 100644 --- a/drivers/power/sbs-battery.c +++ b/drivers/power/sbs-battery.c @@ -158,7 +158,6 @@ struct sbs_info { int shutdown_complete; struct mutex mutex; }; -struct sbs_info *tchip; static int sbs_read_word_data(struct i2c_client *client, u8 address) { @@ -586,37 +585,6 @@ static void sbs_external_power_changed(struct power_supply *psy) chip->poll_time = chip->plat_data.poll_retry_count; } -void sbs_update(void) -{ - int ret; - - if (tchip != NULL) { - ret = sbs_read_word_data(tchip->client, - sbs_data[REG_STATUS].addr); - /* if the read failed, give up on this work */ - if (ret < 0) { - tchip->poll_time = 0; - return; - } - - if (ret & BATTERY_FULL_CHARGED) - ret = POWER_SUPPLY_STATUS_FULL; - else if (ret & BATTERY_FULL_DISCHARGED) - ret = POWER_SUPPLY_STATUS_NOT_CHARGING; - else if (ret & BATTERY_DISCHARGING) - ret = POWER_SUPPLY_STATUS_DISCHARGING; - else - ret = POWER_SUPPLY_STATUS_CHARGING; - - if (tchip->last_state != ret) { - tchip->poll_time = 0; - power_supply_changed(&tchip->power_supply); - return; - } - } -} -EXPORT_SYMBOL_GPL(sbs_update); - static int sbs_update_battery_status(struct battery_gauge_dev *bg_dev, enum battery_charger_status status) { @@ -662,7 +630,7 @@ static void sbs_delayed_work(struct work_struct *work) chip = container_of(work, struct sbs_info, work.work); - power_supply_changed(&tchip->power_supply); + power_supply_changed(&chip->power_supply); schedule_delayed_work(&chip->work, HZ*2); } @@ -787,8 +755,6 @@ static int sbs_probe(struct i2c_client *client, chip->last_state = POWER_SUPPLY_STATUS_UNKNOWN; chip->power_supply.external_power_changed = sbs_external_power_changed; - tchip = chip; - pdata = sbs_of_populate_pdata(client); if (pdata) { chip->gpio_detect = gpio_is_valid(pdata->battery_detect); |