Skip to contentSkip to conversation

i2c: i2c-riic: add support for Renesas RIIC

PATCH New Yoshihiro Shimoda 1 participant 1 message Jul 20, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 i2c: i2c-riic: add support for Renesas RIIC

This driver supports the RIIC module. The SH7757 has it. The driver doesn't use any IRQ handler. This is because the module has errata in interrupts of TXI and RXI. So, we cannot use the interrupts for transfer.

---
about v2:
- fix Makefile for the list alphabetically sorted
- fix ICMR1_BC
- fix riic_[clear,set]_bit
- add error indication in riic_set_clock()
- add more comment about no IRQ in git log
- fix return value and some error log in riic_probe()

 drivers/i2c/busses/Kconfig    |    9 +
 drivers/i2c/busses/Makefile   |    1 +
 drivers/i2c/busses/i2c-riic.c |  600 +++++++++++++++++++++++++++++++++++++++++
 include/linux/i2c/riic.h      |   29 ++
 4 files changed, 639 insertions(+), 0 deletions(-)
 create mode 100644 drivers/i2c/busses/i2c-riic.c
 create mode 100644 include/linux/i2c/riic.h
drivers/i2c/busses/Kconfig +9 -0
index 646068e..e057344 100644
@@ -687,6 +687,15 @@ config I2C_EG20T
 	  ML7213/ML7223 is companion chip for Intel Atom E6xx series.
 	  ML7213/ML7223 is completely compatible for Intel EG20T PCH.
 
+config I2C_RIIC
+	tristate "Renesas RIIC controller"
+	depends on SUPERH
+	help
+	  This driver supports the RIIC module of the Renesas SH7757.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-riic.
+
 comment "External I2C/SMBus adapter drivers"
 
 config I2C_DIOLAN_U2C
drivers/i2c/busses/Makefile +1 -0
index e6cf294..93ca34f 100644
@@ -55,6 +55,7 @@ obj-$(CONFIG_I2C_PNX)		+= i2c-pnx.o
 obj-$(CONFIG_I2C_PUV3)		+= i2c-puv3.o
 obj-$(CONFIG_I2C_PXA)		+= i2c-pxa.o
 obj-$(CONFIG_I2C_PXA_PCI)	+= i2c-pxa-pci.o
+obj-$(CONFIG_I2C_RIIC)          += i2c-riic.o
 obj-$(CONFIG_I2C_S3C2410)	+= i2c-s3c2410.o
 obj-$(CONFIG_I2C_S6000)		+= i2c-s6000.o
 obj-$(CONFIG_I2C_SH7760)	+= i2c-sh7760.o
drivers/i2c/busses/i2c-riic.c new file +600 -0

600 lines not on this page · raw message

include/linux/i2c/riic.h new file +29 -0
new file mode 100644
index 0000000..5839381
@@ -0,0 +1,29 @@
+/*
+ * RIIC bus driver
+ *
+ * Copyright (C) 2011  Renesas Solutions Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef _RIIC_H_
+#define _RIIC_H_
+
+struct riic_platform_data {
+	int	clock;		/* i2c clock (kHZ) */
+};
+
+#endif
+
Signature · 1 line
1.7.1