summaryrefslogtreecommitdiff
path: root/include/linux/power
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2013-07-12 19:31:58 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:31:18 -0700
commit3978d435a55c62ab4ce87d2ddd1eba591fe96b51 (patch)
tree15530b2c17d68cd1ced41049b385cf8247227805 /include/linux/power
parent05609ec53ef11a04745eec699578a3b2b7588a7a (diff)
power: bq2419x-charger: remove unused driver file
Use bq2419x-charger.c for the BQ2419X charger driver and remove the other files like bq2419x-generic, bq2419x-i2c, bq2419x-platform as it was done to split the bq2419x charger functionality in to two parts: registration and generic. This was done to reuse the driver in palma charger but now palma charger driver is independent of this driver, it is no more used. Hence using original bq2419x-charger file as driver and removing other files. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/239173 (cherry picked from commit 8508e6f22e13946bcfe9effbf87b15b92c01a342) Change-Id: I6258512710c474dcf449cdb4245d531394140545 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/248377 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'include/linux/power')
-rw-r--r--include/linux/power/bq2419x-charger.h75
1 files changed, 7 insertions, 68 deletions
diff --git a/include/linux/power/bq2419x-charger.h b/include/linux/power/bq2419x-charger.h
index efa68ac295df..9ab5d2b9ecaf 100644
--- a/include/linux/power/bq2419x-charger.h
+++ b/include/linux/power/bq2419x-charger.h
@@ -1,7 +1,7 @@
/*
* bq2419x-charger.h -- BQ24190/BQ24192/BQ24192i/BQ24193 Charger driver
*
- * Copyright (C) 2012 - 2013 NVIDIA Corporation
+ * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
* Author: Laxman Dewangan <ldewangan@nvidia.com>
* Author: Syed Rafiuddin <srafiuddin@nvidia.com>
@@ -25,18 +25,6 @@
#ifndef __LINUX_POWER_BQ2419X_CHARGER_H
#define __LINUX_POWER_BQ2419X_CHARGER_H
-#include <linux/kthread.h>
-#include <linux/sched.h>
-#include <linux/time.h>
-#include <linux/timer.h>
-#include <linux/power_supply.h>
-#include <linux/regmap.h>
-#include <linux/regulator/driver.h>
-#include <linux/regulator/machine.h>
-#include <linux/slab.h>
-#include <linux/rtc.h>
-#include <linux/alarmtimer.h>
-#include <linux/power/battery-charger-gauge-comm.h>
/* Register definitions */
#define BQ2419X_INPUT_SRC_REG 0x00
@@ -57,16 +45,15 @@
#define BQ2419X_ENABLE_CHARGE_MASK 0x30
#define BQ2419X_ENABLE_CHARGE 0x10
+#define BQ2419X_DISABLE_CHARGE 0x00
#define BQ2419X_ENABLE_VBUS 0x20
#define BQ2419X_REG0 0x0
#define BQ2419X_EN_HIZ BIT(7)
-#define BQ2419X_CHRG_CTRL_REG_3A 0xC0
-#define BQ2419x_OTP_CURRENT_500MA 0x32
-
#define BQ2419X_WD 0x5
#define BQ2419X_WD_MASK 0x30
+#define BQ2419X_EN_SFT_TIMER_MASK BIT(3)
#define BQ2419X_WD_DISABLE 0x00
#define BQ2419X_WD_40ms 0x10
#define BQ2419X_WD_80ms 0x20
@@ -98,6 +85,8 @@
#define BQ2419x_NVCHARGER_INPUT_VOL_SEL 0x40
#define BQ2419x_DEFAULT_INPUT_VOL_SEL 0x30
+#define BQ2419x_CHARGING_CURRENT_STEP_DELAY_US 1000
+
#define BQ2419X_MAX_REGS (BQ2419X_REVISION_REG + 1)
/*
@@ -117,8 +106,8 @@ struct bq2419x_vbus_platform_data {
* struct bq2419x_charger_platform_data - bq2419x charger platform data.
*/
struct bq2419x_charger_platform_data {
- unsigned use_mains:1;
- unsigned use_usb:1;
+ int use_usb;
+ int use_mains;
void (*update_status)(int, int);
int (*battery_check)(void);
@@ -130,7 +119,6 @@ struct bq2419x_charger_platform_data {
int num_consumer_supplies;
struct regulator_consumer_supply *consumer_supplies;
int chg_restart_time;
- int is_battery_present;
};
/*
@@ -141,53 +129,4 @@ struct bq2419x_platform_data {
struct bq2419x_charger_platform_data *bcharger_pdata;
};
-struct bq2419x_chip {
- struct device *dev;
- struct regmap *regmap;
- int irq;
- int gpio_otg_iusb;
- int wdt_refresh_timeout;
- int wdt_time_sec;
-
- struct power_supply ac;
- struct power_supply usb;
- struct mutex mutex;
- int ac_online;
- int usb_online;
- int in_current_limit;
- unsigned use_mains:1;
- unsigned use_usb:1;
- int rtc_alarm_time;
-
- struct regulator_dev *chg_rdev;
- struct regulator_desc chg_reg_desc;
- struct regulator_init_data chg_reg_init_data;
-
- struct regulator_dev *vbus_rdev;
- struct regulator_desc vbus_reg_desc;
- struct regulator_init_data vbus_reg_init_data;
-
- struct battery_charger_dev *bc_dev;
- int chg_status;
-
- struct kthread_worker bq_kworker;
- struct task_struct *bq_kworker_task;
- struct kthread_work bq_wdt_work;
- struct rtc_device *rtc;
- int stop_thread;
- int suspended;
- int chg_restart_timeout;
- int chg_restart_time;
- int use_regmap;
- struct palmas *palmas;
-};
-
-enum bq2419x_chip_id {
- PALMAS_CHARGER,
-};
-
-int bq2419x_hw_init(struct bq2419x_chip *bq2419x,
- struct bq2419x_platform_data *pdata);
-
-int bq2419x_resource_cleanup(struct bq2419x_chip *bq2419x);
#endif /* __LINUX_POWER_BQ2419X_CHARGER_H */