Skip to content
Snippets Groups Projects
Commit 8f651ca6 authored by Patrice Chotard's avatar Patrice Chotard Committed by Tom Rini
Browse files

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: default avatarPatrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
parent d5a83139
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment