On 24 October 2018 at 06:10, Patrice Chotard <patrice.chot...@st.com> wrote:
> 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 <patrice.chot...@st.com>
> ---
>
> Changes in v4:
>  - Fix check of uclass_get_device_by_name() return value, in any error
>    case, continue with the next child.
>
> Changes in v3: None
> Changes in v2: None
>
>  drivers/pinctrl/pinctrl_stm32.c | 90 
> ++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 85 insertions(+), 5 deletions(-)

Reviewed-by: Simon Glass <s...@chromium.org>
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to