Daniel Mack <daniel@xxxxxxxxxx> writes: > Hi, > > I have to get back to this one. The fall-out that made me implement the patch > below in the first place was fixed with the following patch: > > e41f76830d (ARM: pxa: dts: add gpio-ranges to gpio controller) > > ... but now another issue came up. > > To recap, the pxa3xx driver uses the pinctrl-single driver since a while which > does not implement a .gpio_set_direction() callback. The pinmux core will simply > return 0 in this case, and the pxa3xx gpio driver hence thinks the pinctrl > driver did its job and returns as well. > > This effectively makes pxa_gpio_direction_{input,output} no-ops. Interestingly, > I only noticed that when I tried to use the w1-gpio driver which makes use of > gpiolib's open-drain emulation. All other use-cases work just fine. > > So the question is how this is supposed to work. I see two options: > > 1) Apply the patch below, so we don't use use the pinctrl driver on PXA3xx. > > 2) Change pinmux_gpio_direction() and make it return -ENOSYS or something in > case there is no .gpio_set_direction() implementation. I'm not sure whether > that's a good idea though, and what the side-effects would be. Linus, this question is rather for you : is it normal that whether an pincontroller is available or not, pinctrl_gpio_direction_input() returns 0 (as stated in the function pinmux_gpio_direction()). If that is the case, how a gpio driver can know if the gpio direction will be handled in the pin controller and not take action itself ? As for Daniel, there is another solution, ie remove this from pxa_gpio_direction_input() and pxa_gpio_direction_output(): if (!ret) return 0; Cheers. -- Robert -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html