PXA25x: GPIO driver fails probe due to resource conflict with pinctrl driver
Robert Jarzmik
robert.jarzmik at free.fr
Fri Dec 9 00:55:41 PST 2022
"Russell King (Oracle)" <linux at armlinux.org.uk> writes:
> Does the GPIO driver talk to the pinctrl driver to switch GPIOs
> between
> input and output mode? If it does, that's fine. If not, that can
> cause
> regressions, as GPIOs may need to be switched between input and
> output
> mode at runtime (e.g. for I2C gpio-based bitbang).
It does.
Basically it tries pinctrl first, and falls back to direct
registers
access. Here is a small extract of the gpio direction manipulation
in
gpio-pxa.c :
if (pxa_gpio_has_pinctrl()) {
ret = pinctrl_gpio_direction_output(chip->base +
offset);
if (ret)
return ret;
}
spin_lock_irqsave(&gpio_lock, flags);
tmp = readl_relaxed(base + GPDR_OFFSET);
... blablabal we set the bit, and write back the register.
Cheers.
--
Robert
More information about the linux-arm-kernel
mailing list