summaryrefslogtreecommitdiff
path: root/drivers/power/sprd_2713_fgu.h
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
committerYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
commit8e4bff4cab0ddac6060645b0715210484d02ff40 (patch)
tree3a5c3024371a04692a3a6d9974d001cdff8ebf84 /drivers/power/sprd_2713_fgu.h
Initial file dump from open source releaseHEADmaster
Diffstat (limited to 'drivers/power/sprd_2713_fgu.h')
-rw-r--r--drivers/power/sprd_2713_fgu.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/power/sprd_2713_fgu.h b/drivers/power/sprd_2713_fgu.h
new file mode 100644
index 00000000..6077c1d5
--- /dev/null
+++ b/drivers/power/sprd_2713_fgu.h
@@ -0,0 +1,28 @@
+
+#ifndef _SPRD_2713_FGU_H_
+#define _SPRD_2713_FGU_H_
+#include <linux/sprd_battery_common.h>
+#include <linux/types.h>
+#if defined(CONFIG_SPRD_2713_POWER) || defined(CONFIG_SPRD_EXT_IC_POWER)
+#include "sprd_2713_charge.h"
+#endif
+
+#define SPRDBAT_FGUADC_CAL_NO 0
+#define SPRDBAT_FGUADC_CAL_NV 1
+#define SPRDBAT_FGUADC_CAL_CHIP 2
+
+int sprdfgu_init(struct sprd_battery_platform_data *pdata);
+int sprdfgu_reset(void);
+void sprdfgu_record_cap(u32 cap);
+uint32_t sprdfgu_read_capacity(void);
+uint32_t sprdfgu_poweron_capacity(void);
+int sprdfgu_read_soc(void);
+int sprdfgu_read_batcurrent(void);
+uint32_t sprdfgu_read_vbat_vol(void);
+uint32_t sprdfgu_read_vbat_ocv(void);
+int sprdfgu_register_notifier(struct notifier_block *nb);
+int sprdfgu_unregister_notifier(struct notifier_block *nb);
+void sprdfgu_adp_status_set(int plugin);
+void sprdfgu_pm_op(int is_suspend);
+
+#endif