diff options
author | Alexandre Torgue <alexandre.torgue@st.com> | 2019-04-10 14:30:21 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-04-23 11:46:58 +0300 |
commit | cc528862d961d007d3d72e827897a38b297bc6c8 (patch) | |
tree | 2ce12e7bb6e1cbae4709d1858b44b1352abb8049 /drivers/pinctrl/stm32/pinctrl-stm32.h | |
parent | 966d9b928f626a54a0c27c0fdae1e3dfe9bab416 (diff) | |
download | linux-cc528862d961d007d3d72e827897a38b297bc6c8.tar.xz |
pinctrl: stm32: introduce package support
A same SoC can be available in several packages. Differences between
packages are only the numbers of available balls. In order not to write
a driver for each new package, same driver (ex: pinctrl-stm32mp157.c) will
be used. This patch introduces the "package" property for each pin. So on a
same driver, it will be possible to indicate on which package the pin is
available. The package information will be got from the device tree.
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/stm32/pinctrl-stm32.h')
-rw-r--r-- | drivers/pinctrl/stm32/pinctrl-stm32.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.h b/drivers/pinctrl/stm32/pinctrl-stm32.h index 473a6238a27b..8acdf4811470 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.h +++ b/drivers/pinctrl/stm32/pinctrl-stm32.h @@ -26,6 +26,7 @@ struct stm32_desc_function { struct stm32_desc_pin { struct pinctrl_pin_desc pin; const struct stm32_desc_function *functions; + const unsigned int pkg; }; #define STM32_PIN(_pin, ...) \ @@ -35,6 +36,13 @@ struct stm32_desc_pin { __VA_ARGS__, { } }, \ } +#define STM32_PIN_PKG(_pin, _pkg, ...) \ + { \ + .pin = _pin, \ + .pkg = _pkg, \ + .functions = (struct stm32_desc_function[]){ \ + __VA_ARGS__, { } }, \ + } #define STM32_FUNCTION(_num, _name) \ { \ .num = _num, \ |