On Sun, 11 Nov 2018 at 09:55, Robert Jarzmik <robert.jarzmik@xxxxxxx> wrote: > > Greg <greguu@xxxxxxxx> writes: > > > I forgot to mention that the issue occurs when platform PINCTRL is > > disabled in .config. > > Ok, let's talk about the issue then. The report I have from you is : > > The issue I found is that even if PINCTRL is disabled in .config it needs to > > be specified also in gpio-pxa.c to return false for PXA27X_GPIO as > > otherwise we have issues with our keyboard. > > This is a bit blurry, what are these "issues" exactly ? And are you talking > about the support in arch/arm/mach-pxa/poodle.c, where I don't see any keyboard > support ? > The gpio matrix keypard on the Zaurus C3x00 (see spitz.c) does not work properly. Noticeable are that rshift+c does nothing where as lshift+c creates C. Opposite it is for rshift+a vs lshift+a, here only rshift works. This affects a few other combinations using the rshift or lshift buttons. > Moreover, having pxa_gpio_has_pinctrl() return false bypasses this code : > ret = pinctrl_gpio_direction_input(chip->base + offset); > if (!ret) > return 0; > But when CONFIG_PINCTRL=n, we have : > static inline int pinctrl_gpio_direction_input(unsigned gpio) > { > return 0; > } > > Which means your change shouldn't make any difference if you really have > CONFIG_PINCTRL=n. > I am at a very wild guess here, but could it be how the "offset" is added/calculated, causing this odd issue for only the somewhat "special" pxa27x spitz GPIO matrix keyboard ? Just had a second look and can confirm that "# CONFIG_PINCTRL is not set" for this build in .config and returning false for pxa_gpio_has_pinctrl() seems to cured it. Cheers, Gregor