PXA25x: GPIO driver fails probe due to resource conflict with pinctrl driver

From: Jonathan Neuschäfer
Date: Wed Dec 07 2022 - 06:26:17 EST


Hello,

I am currently trying to bring up Linux 6.1-rcX on a PXA255 board, using a
devicetree. One problem I encountered is that the PXA GPIO driver fails to
probe because it uses the same MMIO register range as the pinctrl driver:

[ 0.666169] pxa25x-pinctrl 40e00054.pinctrl: initialized pxa2xx pinctrl driver
[ 0.694407] pxa-gpio 40e00000.gpio: can't request region for resource [mem 0x40e00000-0x40e0ffff]
[ 0.695050] pxa-gpio: probe of 40e00000.gpio failed with error -16

Before I try to fix this myself: Is GPIO on PXA25x currently expected to
work and when has it last been seen working?

What would be a good way to fix this?

I've considered calling into pinctrl-pxa25x directly from pxa-gpio and
passing in the GPIO driver's register mapping, rather than mapping the
registers again in pinctrl-pxa25x. This seems like it should address the
kernel's requirement that resources shouldn't overlap, but some
additional locking between GPIO driver and pinctrl driver might be
neccessary to keep register accesses consistent/atomic.


Best regards,
Jonathan

Attachment: signature.asc
Description: PGP signature