OpenCores I2C bus driver
Subsystems (2)
PATCH 1/1 OpenCores I2C bus driver
Hi,
The following patch adds support for the OpenCores I2C controller IP core (See http://www.opencores.org/projects.cgi/web/i2c/overview).
Signed-off-by Peter Korsgaard <[email protected]>
---
drivers/i2c/busses/Kconfig | 11 + drivers/i2c/busses/Makefile | 1 drivers/i2c/busses/i2c-ocores.c | 358 ++++++++++++++++++++++++++++++++++++++++ include/linux/i2c-ocores.h | 20 ++ 4 files changed, 390 insertions(+)
drivers/i2c/busses/Kconfig +11 -0
@@ -517,4 +517,15 @@ This driver can also be built as a module. If so, the module will be called i2c-mv64xxx. +config I2C_OCORES + tristate "OpenCores I2C Controller" + depends on I2C + help + If you say yes to this option, support will be included for the + OpenCores I2C controller. For details see + http://www.opencores.org/projects.cgi/web/i2c/overview + + This driver can also be built as a module. If so, the module + will be called i2c-ocores. + endmenu
drivers/i2c/busses/Makefile +1 -0
@@ -40,6 +40,7 @@ obj-$(CONFIG_I2C_VIA) += i2c-via.o obj-$(CONFIG_I2C_VIAPRO) += i2c-viapro.o obj-$(CONFIG_I2C_VOODOO3) += i2c-voodoo3.o +obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o obj-$(CONFIG_SCx200_ACB) += scx200_acb.o obj-$(CONFIG_SCx200_I2C) += scx200_i2c.o
drivers/i2c/busses/i2c-ocores.c new file +358 -0
358 lines not on this page · raw message
include/linux/i2c-ocores.h new file +20 -0
@@ -0,0 +1,20 @@ +/* +* i2c-ocores.h - definitions for the i2c-ocores interface +* +* Peter Korsgaard <[email protected]> +* +* This file is licensed under the terms of the GNU General Public License +* version 2. This program is licensed "as is" without any warranty of any +* kind, whether express or implied. +*/ + +#ifndef _LINUX_I2C_OCORES_H +#define _LINUX_I2C_OCORES_H + +struct ocores_i2c_platform_data { +u32 regstep;/* distance between registers */ +u32 clock_khz;/* input clock in KHz */ +}; + +#endif /* _LINUX_I2C_OCORES_H */ +
Signature · 1 line
Bye, Peter Korsgaard
Quoted 6 lines · Peter Korsgaard
Hi,
The following patch adds support for the OpenCores I2C controller IP core (See http://www.opencores.org/projects.cgi/web/i2c/overview).
Signed-off-by Peter Korsgaard <jacmet at sunsite.dk>
Very cool... I'm glad to see opencores stuff making it into the
upstream kernel.
One day I hope to see the OpenRISC port in the upstream kernel...
Jeff