pinctrl: at91: Bind GPIO driver to the pinctrl DT node
authorManikandan Muralidharan <manikandan.m@microchip.com>
Mon, 10 Feb 2025 06:51:41 +0000 (12:21 +0530)
committerEugen Hristev <eugen.hristev@linaro.org>
Wed, 12 Feb 2025 08:31:56 +0000 (10:31 +0200)
commit8e502c0e2c1bc026e2f0c93455b8aa43b2ddbe31
treef7f9d5ec26bd3e69366c6c5a3f14bdb1da30bda6
parent836bf51f91ccf5c1a04a95cf89e0c3692dfa78e3
pinctrl: at91: Bind GPIO driver to the pinctrl DT node

In Linux DT,the pinctrl node acts as parent nodes with all other
gpio banks as child nodes and a single driver in Linux handles both
pinctrl settings and gpio requests.Current U-Boot DT maintains both
pinctrl and gpio nodes as separate nodes and offers two different class
of U-Boot drivers: UCLASS_PINCTRL which handles pin functions and
UCLASS_GPIO which handles gpio requests. In order to align the DT
of U-Boot with the DT of Linux, a hook is been added in the pinctrl
driver to bind the gpio driver with the pinctrl driver so that
when adding gpio nodes as subnodes to pinctrl node (as per the Linux ABI),
the corresponding APIs will be redirected and handled by valid
drivers attached to the pinctrl driver.

Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
drivers/pinctrl/pinctrl-at91.c