From: Tom Rini Date: Sat, 17 Nov 2018 08:33:25 -0500 Subject: [U-Boot] [U-Boot, v4, 06/11] pinctrl: stm32: Add get_pins_count() ops In-Reply-To: <1540383023-1807-7-git-send-email-patrice.chotard@st.com> References: <1540383023-1807-7-git-send-email-patrice.chotard@st.com> Message-ID: <20181117133325.GE11247@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Oct 24, 2018 at 02:10:18PM +0200, Patrice Chotard 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 > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: