hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/pinctrl/stm32/pinctrl-stm32.h
....@@ -1,4 +1,4 @@
1
-// SPDX-License-Identifier: GPL-2.0
1
+/* SPDX-License-Identifier: GPL-2.0 */
22 /*
33 * Copyright (C) Maxime Coquelin 2015
44 * Copyright (C) STMicroelectronics 2017
....@@ -18,6 +18,12 @@
1818 #define STM32_PIN_AF(x) ((x) + 1)
1919 #define STM32_PIN_ANALOG (STM32_PIN_AF(15) + 1)
2020
21
+/* package information */
22
+#define STM32MP_PKG_AA BIT(0)
23
+#define STM32MP_PKG_AB BIT(1)
24
+#define STM32MP_PKG_AC BIT(2)
25
+#define STM32MP_PKG_AD BIT(3)
26
+
2127 struct stm32_desc_function {
2228 const char *name;
2329 const unsigned char num;
....@@ -26,6 +32,7 @@
2632 struct stm32_desc_pin {
2733 struct pinctrl_pin_desc pin;
2834 const struct stm32_desc_function *functions;
35
+ const unsigned int pkg;
2936 };
3037
3138 #define STM32_PIN(_pin, ...) \
....@@ -35,6 +42,13 @@
3542 __VA_ARGS__, { } }, \
3643 }
3744
45
+#define STM32_PIN_PKG(_pin, _pkg, ...) \
46
+ { \
47
+ .pin = _pin, \
48
+ .pkg = _pkg, \
49
+ .functions = (struct stm32_desc_function[]){ \
50
+ __VA_ARGS__, { } }, \
51
+ }
3852 #define STM32_FUNCTION(_num, _name) \
3953 { \
4054 .num = _num, \
....@@ -51,5 +65,7 @@
5165 int stm32_pctl_probe(struct platform_device *pdev);
5266 void stm32_pmx_get_mode(struct stm32_gpio_bank *bank,
5367 int pin, u32 *mode, u32 *alt);
68
+int stm32_pinctrl_resume(struct device *dev);
69
+
5470 #endif /* __PINCTRL_STM32_H */
5571