Bug Fix Patch export_user_gpios.patch for phyCARD-S PD10.2.0 (BSP002) ----------------------------------------------------------------------------- In the phyCARD-S BSP PD10.2.0 PHYTEC supports expansion boards (PEB) for all phyCARDs. The expansion boards contain support for a second Ethernet interface, CAN, and GPIO. They use the GPIOs 95, 89 and 133 of the phyCARD-S. The GPIOs are requested by the kernel and not available for export in the userspace. With this patch the kernel explicit exports the GPIOs to userspace. How do I apply the patch to my phyCARD-S PD10.2.0 BSP? ------------------------------------------------------ 1. Follow the instructions of the 'QuickStart Manual OSELAS.BSP() phyCARDs' Chapter 1 to set up the required working environment and Chapter 2 to build the phyCARD BSP. 2. Change to the main BSP folder cd OSELAS.BSP-Phytec-phyCORE-i.MX27-PD11.1.0 3. Copy the patch to the patch stack of the linux kernel cp /path/to/export_user_gpios.patch configs/phyCARD-S-2010.08.0/patches/linux-2.6.33.7/generic/ 4. Add the Patch to the series file: echo export_user_gpios.patch >> configs/phyCARD-S-2010.08.0/patches/linux-2.6.33.7/generic/series 5. Clean the kernel and rebuild the Kernel with the patch. ptxdist-2010.08.0 clean kernel ptxdist-2010.08.0 targetinstall kernel 6. Now you find the new kernel with the bug fix included under: OSELAS.BSP-Phytec-phyCORE-i.MX27-PD11.1.0/platform-phyCARD-S/images/linuximage Now update the kernel on your module. Now you should see the GPIOs allready supported in the sysfs: root@phyCARD:~ ll /sys/class/gpio/ /sys/class/gpio/export /sys/class/gpio/gpiochip160/ /sys/class/gpio/gpio133/ /sys/class/gpio/gpiochip32/ /sys/class/gpio/gpio89/ /sys/class/gpio/gpiochip64/ /sys/class/gpio/gpio95/ /sys/class/gpio/gpiochip96/ /sys/class/gpio/gpiochip0/ /sys/class/gpio/unexport /sys/class/gpio/gpiochip128/