Add I2C driver framework

This I2C driver framework has some major differences compared to libi2c.

* It is compatible to the Linux I2C user-space API.

* It uses generic IMFS nodes and thus reduces the levels of indirection.

* The drivers don't have to mess around with minor numbers to get their
  state information.

* No arbitrary bus controller model is assumed.  The main task of an I2C
  bus controller driver is to process I2C messages.  How this is done is
  private to the driver.

* Scatter/gather operations are supported (I2C_M_NOSTART).
This commit is contained in:
Sebastian Huber committed 2014-11-20 10:30:06 +01:00
1 parent b6f218867b
commit 41c5f1b779
12 files changed
+1413

No files matched your search

+11
View File
@@ -1,12 +1,23 @@
include $(top_srcdir)/automake/compile.am
include $(top_srcdir)/automake/multilib.am
include_devdir = $(includedir)/dev
include_dev_HEADERS =
include_dev_i2cdir = $(includedir)/dev/i2c
include_dev_i2c_HEADERS =
include_dev_i2c_HEADERS += include/dev/i2c/i2c.h
include_linuxdir = $(includedir)/linux
include_linux_HEADERS =
include_linux_HEADERS += include/linux/i2c.h
include_linux_HEADERS += include/linux/i2c-dev.h
noinst_LIBRARIES = libdev.a
libdev_a_SOURCES =
libdev_a_SOURCES += i2c/i2c-bus.c
libdev_a_SOURCES += i2c/i2c-dev.c
include $(srcdir)/preinstall.am
include $(top_srcdir)/automake/local.am
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+9
View File
@@ -18,6 +18,15 @@ $(PROJECT_INCLUDE)/dev/$(dirstamp):
@: > $(PROJECT_INCLUDE)/dev/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/dev/$(dirstamp)
$(PROJECT_INCLUDE)/dev/i2c/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)/dev/i2c
@: > $(PROJECT_INCLUDE)/dev/i2c/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/dev/i2c/$(dirstamp)
$(PROJECT_INCLUDE)/dev/i2c/i2c.h: include/dev/i2c/i2c.h $(PROJECT_INCLUDE)/dev/i2c/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/dev/i2c/i2c.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/dev/i2c/i2c.h
$(PROJECT_INCLUDE)/linux/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)/linux
@: > $(PROJECT_INCLUDE)/linux/$(dirstamp)
+1
View File
@@ -8,6 +8,7 @@ project_lib_LIBRARIES = librtemscpu.a
librtemscpu_a_SOURCES =
TMP_LIBS =
TMP_LIBS += ../dev/libdev.a
TMP_LIBS += ../score/cpu/@RTEMS_CPU@/libscorecpu.a
TMP_LIBS += ../score/libscore.a
TMP_LIBS += ../sapi/libsapi.a
+1
View File
@@ -1,6 +1,7 @@
ACLOCAL_AMFLAGS = -I ../aclocal
_SUBDIRS = POSIX
_SUBDIRS += i2c01
_SUBDIRS += newlib01
_SUBDIRS += block17
_SUBDIRS += exit02
+1
View File
@@ -66,6 +66,7 @@ AS_IF([test x"$HAVE_LIBDL" = x"yes"],[
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
i2c01/Makefile
newlib01/Makefile
block17/Makefile
exit02/Makefile
+19
View File
@@ -0,0 +1,19 @@
rtems_tests_PROGRAMS = i2c01
i2c01_SOURCES = init.c
dist_rtems_tests_DATA = i2c01.scn i2c01.doc
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/../automake/leaf.am
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(i2c01_OBJECTS)
LINK_LIBS = $(i2c01_LDLIBS)
i2c01$(EXEEXT): $(i2c01_OBJECTS) $(i2c01_DEPENDENCIES)
@rm -f i2c01$(EXEEXT)
$(make-exe)
include $(top_srcdir)/../automake/local.am
+11
View File
@@ -0,0 +1,11 @@
This file describes the directives and concepts tested by this test set.
test set name: i2c01
directives:
TBD
concepts:
- Ensure that the I2C driver framework works.
+2
View File
@@ -0,0 +1,2 @@
*** BEGIN OF TEST I2C 1 ***
*** END OF TEST I2C 1 ***
File diff suppressed because it is too large. Load diff