man-FIRE Posted October 8, 2018 Share Posted October 8, 2018 Hello, I love armbian and I know the gpio is working on the directory /sys/class/gpio/gpio(number) but I really need to use armbian + the gpio module gpio-sunxi modprobe gpio-sunxi ls /sys/class/gpio_sw/ normal_led PA10 PA13 PA18 PA20 PA6 PA9 PC2 PC7 PG7 PL10 PA0 PA11 PA14 PA19 PA21 PA7 PC0 PC3 PD14 PG8 standby_led PA1 PA12 PA15 PA2 PA3 PA8 PC1 PC4 PG6 PG9 echo 1 > /sys/class/gpio_sw/standby_led/data echo 0 > /sys/class/gpio_sw/standby_led/data is it possible to active this module with kernel 3 or 4, if yes where is possible to enable it ? in the kernel config ? Link to comment Share on other sites More sharing options...
chwe Posted October 8, 2018 Share Posted October 8, 2018 From the title: pi zero H2 So then it's placed in the wrong sub-forum. Do you plan to use BSP 3.4 Kernel or 4.x mainline? (depending on this I'll move it in the right sub-forum). In mainline GPIOs are handled either by sysFS (deprecated) or libgpiod. If you plan to have something 'future-proof' you should consider switch to a libgpiod based approach. Link to comment Share on other sites More sharing options...
man-FIRE Posted October 8, 2018 Author Share Posted October 8, 2018 BSP 3.4 Kernel with sysFS (deprecated) give me the option to active modprobe gpio-sunxi ? Link to comment Share on other sites More sharing options...
chwe Posted October 9, 2018 Share Posted October 9, 2018 https://github.com/armbian/build/blob/53acd5be582d53b87d8cfd01f35633b159b4ca3f/config/kernel/linux-sun8i-default.config#L2014-L2016 with the 3.4 kernel you can use GPIO-sunxi and sysfs: https://github.com/armbian/build/blob/53acd5be582d53b87d8cfd01f35633b159b4ca3f/config/kernel/linux-sun8i-default.config#L1979 but 3.4 is an old kernel, and if your board doesn't do any hw accelerated videodecoding I would go for a recent 4.14.y kernel with armbian next were we still offer sysfs and additionally you've the opportunity to use libgpiod. Link to comment Share on other sites More sharing options...
Recommended Posts