summaryrefslogtreecommitdiffstats
path: root/include/i2c
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2010-06-09 10:05:04 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2010-06-10 08:39:26 +0200
commit514387711f2d7c5e3476ca80354d989797d088f4 (patch)
treefa9aa6d0387a4992bf6f6f25e94a7210428b536b /include/i2c
parentc672f6fcd7ed9fce05b6fd39d1b85dd61980063a (diff)
downloadbarebox-514387711f2d7c5e3476ca80354d989797d088f4.tar.gz
barebox-514387711f2d7c5e3476ca80354d989797d088f4.tar.xz
i2c: add driver for the MC34704 PMIC
Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/i2c')
-rw-r--r--include/i2c/mc34704.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/i2c/mc34704.h b/include/i2c/mc34704.h
new file mode 100644
index 0000000000..a3723d72a9
--- /dev/null
+++ b/include/i2c/mc34704.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2009 Marc Kleine-Budde <mkl@pengutronix.de>
+ * Copyright (C) 2010 Baruch Siach <baruch@tkos.co.il>
+ *
+ * This file is released under the GPLv2
+ *
+ * Derived from:
+ * - arch-mxc/pmic_external.h -- contains interface of the PMIC protocol driver
+ * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ */
+
+#ifndef __I2C_MC34704_H
+#define __I2C_MC34704_H
+
+struct mc34704 {
+ struct cdev cdev;
+ struct i2c_client *client;
+};
+
+extern struct mc34704 *mc34704_get(void);
+
+extern int mc34704_reg_read(struct mc34704 *mc34704, u8 reg, u8 *val);
+extern int mc34704_reg_write(struct mc34704 *mc34704, u8 reg, u8 val);
+
+#endif /* __I2C_MC34704_H */