[PATCH] pinctrl: sunxi: set pin function as input on export
Linus Walleij
linus.walleij at linaro.org
Mon Feb 15 14:04:26 PST 2016
On Mon, Feb 8, 2016 at 3:37 PM, Krzysztof Adamski
<krzysztof.adamski at tieto.com> wrote:
> Default function of a pin in sunxi SoCs is "disabled". By default gpios
> exported by sysfs are set as input and indeed, when reading "direction"
> file you will get "in". The "value" pin won't return proper value,
> though, confusing user of this interface.
>
> This patch sets direction of a GPIO as input when exporting it.
>
> Signed-off-by: Krzysztof Adamski <krzysztof.adamski at tieto.com>
As maxime says it's not a sunxi problem.
So maybe it is wrong to set pins to either input or output when
exporting them, I suspect they should be exported as is.
Also: the sysfs ABI is deprecated. I suggest you invest your time
in working on the new chardev ABI.
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list