| .. | .. |
|---|
| 1 | | -// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * Copyright (C) Maxime Coquelin 2015 |
|---|
| 4 | 4 | * Copyright (C) STMicroelectronics 2017 |
|---|
| .. | .. |
|---|
| 18 | 18 | #define STM32_PIN_AF(x) ((x) + 1) |
|---|
| 19 | 19 | #define STM32_PIN_ANALOG (STM32_PIN_AF(15) + 1) |
|---|
| 20 | 20 | |
|---|
| 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 | + |
|---|
| 21 | 27 | struct stm32_desc_function { |
|---|
| 22 | 28 | const char *name; |
|---|
| 23 | 29 | const unsigned char num; |
|---|
| .. | .. |
|---|
| 26 | 32 | struct stm32_desc_pin { |
|---|
| 27 | 33 | struct pinctrl_pin_desc pin; |
|---|
| 28 | 34 | const struct stm32_desc_function *functions; |
|---|
| 35 | + const unsigned int pkg; |
|---|
| 29 | 36 | }; |
|---|
| 30 | 37 | |
|---|
| 31 | 38 | #define STM32_PIN(_pin, ...) \ |
|---|
| .. | .. |
|---|
| 35 | 42 | __VA_ARGS__, { } }, \ |
|---|
| 36 | 43 | } |
|---|
| 37 | 44 | |
|---|
| 45 | +#define STM32_PIN_PKG(_pin, _pkg, ...) \ |
|---|
| 46 | + { \ |
|---|
| 47 | + .pin = _pin, \ |
|---|
| 48 | + .pkg = _pkg, \ |
|---|
| 49 | + .functions = (struct stm32_desc_function[]){ \ |
|---|
| 50 | + __VA_ARGS__, { } }, \ |
|---|
| 51 | + } |
|---|
| 38 | 52 | #define STM32_FUNCTION(_num, _name) \ |
|---|
| 39 | 53 | { \ |
|---|
| 40 | 54 | .num = _num, \ |
|---|
| .. | .. |
|---|
| 51 | 65 | int stm32_pctl_probe(struct platform_device *pdev); |
|---|
| 52 | 66 | void stm32_pmx_get_mode(struct stm32_gpio_bank *bank, |
|---|
| 53 | 67 | int pin, u32 *mode, u32 *alt); |
|---|
| 68 | +int stm32_pinctrl_resume(struct device *dev); |
|---|
| 69 | + |
|---|
| 54 | 70 | #endif /* __PINCTRL_STM32_H */ |
|---|
| 55 | 71 | |
|---|