On Thu, Jun 26, 2014 at 1:07 PM, Tushar Behera trblinux@gmail.com wrote:
/sys/class/gpio/export is there if generic gpiolib support and gpio sysfs support is enabled. I am not sure if it is still valid to 'export' the gpios defined via pin-control. Adding Linus Walleij to clarify on this.
Linus,
Is it still okay to export GPIOs via /sys/class/gpio/export for Exynos case where we are using pin-control to configure the GPIO pins?
The generic answer is that /sys/class/gpip/export is a dangerous place and should be avoided. This interface was merged into the kernel at a time when the GPIO subsystem was orphaned and had no real maintainer :-(
The suggestion upstream from my side is to rewrite the subsystem to use char devices like /dev/gpiochip0/...
But if there are bugs in the sysfs interface we should try to fix them for sure ... I just don't have this hardware so cannot work on it unless I get it. The bug is probably generic, in gpiolib.
Yours, Linus Walleij