summaryrefslogtreecommitdiff
path: root/include/linux/mfd/axp20x.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mfd/axp20x.h')
-rw-r--r--include/linux/mfd/axp20x.h51
1 files changed, 14 insertions, 37 deletions
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
index a4860bc9b73d..0d9a1ff38393 100644
--- a/include/linux/mfd/axp20x.h
+++ b/include/linux/mfd/axp20x.h
@@ -13,7 +13,7 @@
#include <linux/regmap.h>
-enum {
+enum axp20x_variants {
AXP152_ID = 0,
AXP202_ID,
AXP209_ID,
@@ -235,10 +235,20 @@ enum {
#define AXP22X_BATLOW_THRES1 0xe6
/* AXP288 specific registers */
+#define AXP288_POWER_REASON 0x02
+#define AXP288_BC_GLOBAL 0x2c
+#define AXP288_BC_VBUS_CNTL 0x2d
+#define AXP288_BC_USB_STAT 0x2e
+#define AXP288_BC_DET_STAT 0x2f
#define AXP288_PMIC_ADC_H 0x56
#define AXP288_PMIC_ADC_L 0x57
+#define AXP288_TS_ADC_H 0x58
+#define AXP288_TS_ADC_L 0x59
+#define AXP288_GP_ADC_H 0x5a
+#define AXP288_GP_ADC_L 0x5b
#define AXP288_ADC_TS_PIN_CTRL 0x84
-#define AXP288_PMIC_ADC_EN 0x84
+#define AXP288_RT_BATT_V_H 0xa0
+#define AXP288_RT_BATT_V_L 0xa1
/* Fuel Gauge */
#define AXP288_FG_RDC1_REG 0xba
@@ -515,14 +525,10 @@ enum axp809_irqs {
AXP809_IRQ_GPIO0_INPUT,
};
-#define AXP288_TS_ADC_H 0x58
-#define AXP288_TS_ADC_L 0x59
-#define AXP288_GP_ADC_H 0x5a
-#define AXP288_GP_ADC_L 0x5b
-
struct axp20x_dev {
struct device *dev;
int irq;
+ unsigned long irq_flags;
struct regmap *regmap;
struct regmap_irq_chip_data *regmap_irqc;
long variant;
@@ -532,35 +538,6 @@ struct axp20x_dev {
const struct regmap_irq_chip *regmap_irq_chip;
};
-#define BATTID_LEN 64
-#define OCV_CURVE_SIZE 32
-#define MAX_THERM_CURVE_SIZE 25
-#define PD_DEF_MIN_TEMP 0
-#define PD_DEF_MAX_TEMP 55
-
-struct axp20x_fg_pdata {
- char battid[BATTID_LEN + 1];
- int design_cap;
- int min_volt;
- int max_volt;
- int max_temp;
- int min_temp;
- int cap1;
- int cap0;
- int rdc1;
- int rdc0;
- int ocv_curve[OCV_CURVE_SIZE];
- int tcsz;
- int thermistor_curve[MAX_THERM_CURVE_SIZE][2];
-};
-
-struct axp20x_chrg_pdata {
- int max_cc;
- int max_cv;
- int def_cc;
- int def_cv;
-};
-
struct axp288_extcon_pdata {
/* GPIO pin control to switch D+/D- lines b/w PMIC and SOC */
struct gpio_desc *gpio_mux_cntl;
@@ -611,7 +588,7 @@ int axp20x_match_device(struct axp20x_dev *axp20x);
int axp20x_device_probe(struct axp20x_dev *axp20x);
/**
- * axp20x_device_probe(): Remove a axp20x device
+ * axp20x_device_remove(): Remove a axp20x device
*
* @axp20x: axp20x device to remove
*