]> Git Repo - J-u-boot.git/commit
pinctrl: stm32: Add get_pins_count() ops
authorPatrice Chotard <[email protected]>
Wed, 24 Oct 2018 12:10:18 +0000 (14:10 +0200)
committerTom Rini <[email protected]>
Fri, 16 Nov 2018 21:51:56 +0000 (16:51 -0500)
commit8f651ca60ba1e574c2b836195ea882c01143922f
treefeb9d494eed4d15a942c06dcdef3fa39b8790212
parentd5a8313905f54ebdf128ac428c3cf58a2ebcbda2
pinctrl: stm32: Add get_pins_count() ops

Add get_pins_count ops to obtain the number of pins
owns by a pin-controller.
On STM32 SoCs bindings, each pin-controller owns
several gpio banks. Each GPIO bank can own up to 16 pins.

To obtain the total pins count, walk through each sub-nodes
(ie GPIO banks) and sum each GPIO banks pins number. For that
in probe() we build a list with each GPIO device reference found.
This list will also be used with future get_pin_muxing and get_pin_name
ops to speed up and optimize walk through all GPIO banks.

As this code is common to all STM32 SoCs, this code is put
under SPL_BUILD compilation flag to avoid to increase SPL code size
for STM32F7 which is limited to 32Ko.

Signed-off-by: Patrice Chotard <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
drivers/pinctrl/pinctrl_stm32.c
This page took 0.039565 seconds and 4 git commands to generate.