Re: [PATCH 4.16 269/272] pinctrl: msm: Use dynamic GPIO numbering

Linus Walleij
2018-06-07T07:25:20Z

On Thu, May 31, 2018 at 1:21 PM, Sebastian Gottschall
<s.gottschall@dd-wrt.com> wrote:

> this patch creates a regression for me. on ipq8064 the systems gpios now
> start somewhere in the sky
(...)
> this broke my userspace gpio handling. i can override this, but still it
> doesnt look correct since there is a hole at the beginng likelly reserved by
> unused arm gpios

Out of curiosity: what is this userspace?

We do not break userspace, so I guess we should put in some hack
to keep the base 0 on ipq8064 then, but as pointed out by Bjorn
there will be problems when we get multiple gpiochips in later
platforms so it is just a stopgap solution.

Have you looked into using the new character device with your
userspace, either as shown in the examples:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/gpio

or using libgpiod:
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/

Yours,
Linus Walleij