[PATCH] ARM i.MX31: Add i2c register convenience functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alexander Kurz <akurz@xxxxxxxx>
---
 arch/arm/mach-imx/include/mach/devices-imx31.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/mach-imx/include/mach/devices-imx31.h b/arch/arm/mach-imx/include/mach/devices-imx31.h
index 63319fe..8169b98 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx31.h
+++ b/arch/arm/mach-imx/include/mach/devices-imx31.h
@@ -2,6 +2,21 @@
 #include <mach/imx31-regs.h>
 #include <mach/devices.h>
 
+static inline struct device_d *imx31_add_i2c0(void *pdata)
+{
+	return imx_add_i2c((void *)MX31_I2C1_BASE_ADDR, 0, pdata);
+}
+
+static inline struct device_d *imx31_add_i2c1(void *pdata)
+{
+	return imx_add_i2c((void *)MX31_I2C2_BASE_ADDR, 1, pdata);
+}
+
+static inline struct device_d *imx31_add_i2c2(void *pdata)
+{
+	return imx_add_i2c((void *)MX31_I2C3_BASE_ADDR, 2, pdata);
+}
+
 static inline struct device_d *imx31_add_spi0(struct spi_imx_master *pdata)
 {
 	return imx_add_spi_imx27((void *)MX31_CSPI1_BASE_ADDR, 0, pdata);
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux