summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2018-12-03 10:52:51 +0100
committerTom Rini <trini@konsulko.com>2018-12-07 08:13:47 -0500
commitdbf928dd2634a682e6d549e6dd61e3f2a0e5db90 (patch)
treeed7c1475dc616518f772d148f3e8bc762f4f7c61 /arch/arm/mach-stm32mp
parent043550415b09c6ffd2d9c0af28cc977bfae9f166 (diff)
gpio: stm32f7: Add gpio bank holes management
In some STM32 SoC packages, GPIO bank has not always 16 gpios. Several cases can occur, gpio hole can be located at the beginning, middle or end of the gpio bank or a combination of these 3 configurations. For that, gpio bindings offer the gpio-ranges DT property which described the gpio bank mapping. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'arch/arm/mach-stm32mp')
-rw-r--r--arch/arm/mach-stm32mp/include/mach/gpio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-stm32mp/include/mach/gpio.h b/arch/arm/mach-stm32mp/include/mach/gpio.h
index 5151150b8d..46bef21f79 100644
--- a/arch/arm/mach-stm32mp/include/mach/gpio.h
+++ b/arch/arm/mach-stm32mp/include/mach/gpio.h
@@ -110,5 +110,9 @@ struct stm32_gpio_regs {
struct stm32_gpio_priv {
struct stm32_gpio_regs *regs;
+ unsigned int gpio_range;
};
+
+int stm32_offset_to_index(struct udevice *dev, unsigned int offset);
+
#endif /* _STM32_GPIO_H_ */