2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
11 PKG_NAME
:=i2c-gpio-custom
14 include $(INCLUDE_DIR
)/package.mk
16 define KernelPackage
/i2c-gpio-custom
18 TITLE
:=Custom GPIO-based I2C device
19 DEPENDS
:=@GPIO_SUPPORT kmod-i2c-core
+kmod-i2c-gpio
20 FILES
:=$(PKG_BUILD_DIR
)/i2c-gpio-custom.
$(LINUX_KMOD_SUFFIX
)
21 AUTOLOAD
:=$(call AutoLoad
,58,i2c-gpio-custom
)
25 define KernelPackage
/i2c-gpio-custom
/description
26 Kernel module for register a custom i2c-gpio platform device.
30 CONFIG_I2C_GPIO_CUSTOM
=m
33 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=m
,%,$(filter %=m
,$(EXTRA_KCONFIG
)))) \
34 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=y
,%,$(filter %=y
,$(EXTRA_KCONFIG
)))) \
37 ARCH
="$(LINUX_KARCH)" \
38 CROSS_COMPILE
="$(TARGET_CROSS)" \
39 SUBDIRS
="$(PKG_BUILD_DIR)" \
40 EXTRA_CFLAGS
="$(EXTRA_CFLAGS)" \
41 LINUXINCLUDE
="-I$(LINUX_DIR)/include -include linux/autoconf.h" \
45 mkdir
-p
$(PKG_BUILD_DIR
)
46 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
50 $(MAKE
) -C
"$(LINUX_DIR)" \
55 $(eval
$(call KernelPackage
,i2c-gpio-custom
))