diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-12-11 20:57:54 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-12-12 00:47:52 +0100 |
commit | 383da0c7f25428de5ad09dc2cfed7cd43c4fb6ba (patch) | |
tree | 2c43a52abfec7bef9fbc4f1201883a559f189fe7 /drivers/pinctrl/core.h | |
parent | 78b778e3630cac5e384a5f23401f5fc2fc1fd723 (diff) | |
download | linux-stable-383da0c7f25428de5ad09dc2cfed7cd43c4fb6ba.tar.gz linux-stable-383da0c7f25428de5ad09dc2cfed7cd43c4fb6ba.tar.bz2 linux-stable-383da0c7f25428de5ad09dc2cfed7cd43c4fb6ba.zip |
pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC()
Add PINCTRL_GROUP_DESC() macro for inline use.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231211190321.307330-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.h')
-rw-r--r-- | drivers/pinctrl/core.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index 8ef4b536bca5..bf971e6a7846 100644 --- a/drivers/pinctrl/core.h +++ b/drivers/pinctrl/core.h @@ -208,6 +208,15 @@ struct group_desc { void *data; }; +/* Convenience macro to define a generic pin group descriptor */ +#define PINCTRL_GROUP_DESC(_name, _pins, _num_pins, _data) \ +(struct group_desc) { \ + .name = _name, \ + .pins = _pins, \ + .num_pins = _num_pins, \ + .data = _data, \ +} + int pinctrl_generic_get_group_count(struct pinctrl_dev *pctldev); const char *pinctrl_generic_get_group_name(struct pinctrl_dev *pctldev, |