Starting in 2.6.33, the kernel has an updated GPIO driver for the CS5535.  This conforms 
more to the GPIO abstraction described in Documentation/gpio.txt under the section 
"Sysfs Interface for Userspace".


Index: package/kernel/modules/other.mk
===================================================================
--- package/kernel/modules/other.mk     (revision 25095)
+++ package/kernel/modules/other.mk     (working copy)
@@ -167,15 +167,9 @@
   SUBMENU:=$(OTHER_MENU)
   TITLE:=AMD CS5535/CS5536 GPIO driver
   DEPENDS:=@TARGET_x86
-  KCONFIG:=CONFIG_CS5535_GPIO \
-          CONFIG_GPIO_CS5535
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.32)),1) 
+  KCONFIG:=CONFIG_CS5535_GPIO
   FILES:=$(LINUX_DIR)/drivers/char/cs5535_gpio.ko
   AUTOLOAD:=$(call AutoLoad,50,cs5535_gpio)
-else
-  FILES:=$(LINUX_DIR)/drivers/gpio/cs5535-gpio.ko
-  AUTOLOAD:=$(call AutoLoad,50,cs5535-gpio)
-endif
 endef
 
 define KernelPackage/gpio-cs5535/description
@@ -185,6 +179,24 @@
 $(eval $(call KernelPackage,gpio-cs5535))
 
 
+define KernelPackage/gpio-cs5535-new
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=AMD CS5535/CS5536 GPIO driver with improved sysfs support
+  DEPENDS:=@TARGET_x86
+ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.33)),1) 
+  KCONFIG:=CONFIG_GPIO_CS5535 CONFIG_PCI CONFIG_GPIOLIB
+  FILES:=$(LINUX_DIR)/drivers/gpio/cs5535-gpio.ko
+  AUTOLOAD:=$(call AutoLoad,50,cs5535-gpio)
+endif
+endef
+
+define KernelPackage/gpio-cs5535-new/description
+ This package contains the new AMD CS5535/CS5536 GPIO driver
+endef
+
+$(eval $(call KernelPackage,gpio-cs5535-new))
+
+
 define KernelPackage/gpio-dev
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Generic GPIO char device support
Index: target/linux/x86/config-default
===================================================================
--- target/linux/x86/config-default     (revision 25095)
+++ target/linux/x86/config-default     (working copy)
@@ -72,6 +72,7 @@
 # CONFIG_CPU_SUP_TRANSMETA_32 is not set
 # CONFIG_CPU_SUP_UMC_32 is not set
 # CONFIG_CS5535_GPIO is not set
+# CONFIG_GPIO_CS5535 is not set
 # CONFIG_CS89x0 is not set
 # CONFIG_DCDBAS is not set
 # CONFIG_DEBUG_BOOT_PARAMS is not set
Index: target/linux/x86/geos/config-default
===================================================================
--- target/linux/x86/geos/config-default        (revision 25095)
+++ target/linux/x86/geos/config-default        (working copy)
@@ -26,3 +26,4 @@
 CONFIG_X86_TSC=y
 CONFIG_X86_USE_3DNOW=y
 CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_GPIOLIB=y
Index: target/linux/x86/geos/target.mk
===================================================================
--- target/linux/x86/geos/target.mk     (revision 25095)
+++ target/linux/x86/geos/target.mk     (working copy)
@@ -2,7 +2,7 @@
 FEATURES:=squashfs jffs2 ext4 pci usb gpio
 DEFAULT_PACKAGES += kmod-ata-via-sata \
             kmod-crypto-hw-geode kmod-crypto-ocf \
-            kmod-gpio-cs5535 kmod-gpio-nsc \
+            kmod-gpio-cs5535-new kmod-gpio-nsc \
             kmod-wdt-geode kmod-hwmon-core kmod-hwmon-lm90 \
             kmod-8139cp kmod-solos-pci \
             kmod-i2c-core kmod-i2c-gpio \
Index: target/linux/x86/Makefile
===================================================================
--- target/linux/x86/Makefile   (revision 25095)
+++ target/linux/x86/Makefile   (working copy)
@@ -12,7 +12,7 @@
 FEATURES:=squashfs jffs2 ext4 vdi vmdk pcmcia targz
 SUBTARGETS=generic olpc xen_domu ep80579 net5501 kvm_guest geos
 
-LINUX_VERSION:=2.6.32.27
+LINUX_VERSION:=2.6.37
 
 include $(INCLUDE_DIR)/target.mk
 
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to