aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/pcf50633.h22
-rw-r--r--include/linux/rtc/pcf50633.h13
2 files changed, 35 insertions, 0 deletions
diff --git a/include/linux/pcf50633.h b/include/linux/pcf50633.h
index 4f1a08daa9d..8a79f64c960 100644
--- a/include/linux/pcf50633.h
+++ b/include/linux/pcf50633.h
@@ -5,6 +5,28 @@
#include <linux/resume-dependency.h>
#include <linux/regulator/machine.h>
+#define PCF50633_FIDX_CHG_ENABLED 0 /* Charger enabled */
+#define PCF50633_FIDX_CHG_PRESENT 1 /* Charger present */
+#define PCF50633_FIDX_CHG_ERR 3 /* Charger Error */
+#define PCF50633_FIDX_CHG_PROT 4 /* Charger Protection */
+#define PCF50633_FIDX_CHG_READY 5 /* Charging completed */
+#define PCF50633_FIDX_PWR_PRESSED 8
+#define PCF50633_FIDX_RTC_SECOND 9
+#define PCF50633_FIDX_USB_PRESENT 10
+
+#define PCF50633_F_CHG_ENABLED (1 << PCF50633_FIDX_CHG_ENABLED)
+#define PCF50633_F_CHG_PRESENT (1 << PCF50633_FIDX_CHG_PRESENT)
+#define PCF50633_F_CHG_ERR (1 << PCF50633_FIDX_CHG_ERR)
+#define PCF50633_F_CHG_PROT (1 << PCF50633_FIDX_CHG_PROT)
+#define PCF50633_F_CHG_READY (1 << PCF50633_FIDX_CHG_READY)
+
+#define PCF50633_F_CHG_MASK 0x000000fc
+
+#define PCF50633_F_PWR_PRESSED (1 << PCF50633_FIDX_PWR_PRESSED)
+
+#define PCF50633_F_RTC_SECOND (1 << PCF50633_FIDX_RTC_SECOND)
+#define PCF50633_F_USB_PRESENT (1 << PCF50633_FIDX_USB_PRESENT)
+
/* public in-kernel pcf50633 api */
enum pcf50633_regulator_id {
PCF50633_REGULATOR_AUTO,
diff --git a/include/linux/rtc/pcf50633.h b/include/linux/rtc/pcf50633.h
new file mode 100644
index 00000000000..4fc5898ed5d
--- /dev/null
+++ b/include/linux/rtc/pcf50633.h
@@ -0,0 +1,13 @@
+#ifndef __LINUX_RTC_PCF50633_H
+#define __LINUX_RTC_PCF50633_H
+
+
+enum pcf50633_rtc_event {
+ PCF50633_RTC_EVENT_ALARM,
+ PCF50633_RTC_EVENT_SECOND,
+};
+
+void pcf50633_rtc_handle_event(struct pcf50633_data *pcf,
+ enum pcf50633_rtc_event evt);
+
+#endif