summaryrefslogtreecommitdiffstats
path: root/include/mfd/mc13xxx.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mfd/mc13xxx.h')
-rw-r--r--include/mfd/mc13xxx.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
index d351c473f4..b38918084d 100644
--- a/include/mfd/mc13xxx.h
+++ b/include/mfd/mc13xxx.h
@@ -16,6 +16,10 @@
#define MC13XXX_REG_IDENTIFICATION 0x07
+#define MC13783_TYPE 1
+#define MC13892_TYPE 2
+#define MC34708_TYPE 3
+
#define MC13783_REG_INT_STATUS0 0x00
#define MC13783_REG_INT_MASK0 0x01
#define MC13783_REG_INT_SENSE0 0x02
@@ -168,6 +172,7 @@ struct mc13xxx;
#ifdef CONFIG_MFD_MC13XXX
extern struct mc13xxx *mc13xxx_get(void);
+extern int mc13xxx_type(struct mc13xxx *mc13xxx);
extern int mc13xxx_revision(struct mc13xxx *mc13xxx);
extern int mc13xxx_reg_read(struct mc13xxx *mc13xxx, u8 reg, u32 *val);
extern int mc13xxx_reg_write(struct mc13xxx *mc13xxx, u8 reg, u32 val);
@@ -179,6 +184,11 @@ static inline struct mc13xxx *mc13xxx_get(void)
return NULL;
}
+static inline int mc13xxx_type(struct mc13xxx *mc13xxx)
+{
+ return -ENODEV;
+}
+
static inline int mc13xxx_revision(struct mc13xxx *mc13xxx)
{
return -ENODEV;
@@ -205,4 +215,13 @@ static inline int mc13xxx_register_init_callback(void(*callback)(struct mc13xxx
}
#endif
+#ifdef CONFIG_MC13XXX_ADC
+int mc13xxx_adc_probe(struct device_d *dev, struct mc13xxx *mc_dev);
+#else
+static inline int mc13xxx_adc_probe(struct device_d *dev, struct mc13xxx *mc_dev)
+{
+ return 0;
+}
+#endif
+
#endif /* __MFD_MC13XXX_H */