summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/core.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-12-11 19:57:57 +0100
committerLinus Walleij <linus.walleij@linaro.org>2023-12-12 00:47:52 +0100
commit85174ad7c30fca29a354221e01fad82c0d00d644 (patch)
treee205b29bcd1466b81713395d9b3b06eb01c9cb43 /drivers/pinctrl/core.h
parentpinctrl: ingenic: Use C99 initializers in PINCTRL_PIN_GROUP() (diff)
downloadlinux-85174ad7c30fca29a354221e01fad82c0d00d644.tar.xz
linux-85174ad7c30fca29a354221e01fad82c0d00d644.zip
pinctrl: core: Embed struct pingroup into struct group_desc
struct group_desc is a particular version of the struct pingroup with associated opaque data. Start switching pin control core and drivers to use it explicitly. 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-5-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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
index bf971e6a7846..a3b75ec7b54b 100644
--- a/drivers/pinctrl/core.h
+++ b/drivers/pinctrl/core.h
@@ -194,14 +194,18 @@ struct pinctrl_maps {
#ifdef CONFIG_GENERIC_PINCTRL_GROUPS
+#include <linux/pinctrl/pinctrl.h>
+
/**
* struct group_desc - generic pin group descriptor
+ * @grp: generic data of the pin group (name and pins)
* @name: name of the pin group
* @pins: array of pins that belong to the group
* @num_pins: number of pins in the group
* @data: pin controller driver specific data
*/
struct group_desc {
+ struct pingroup grp;
const char *name;
const unsigned int *pins;
int num_pins;
@@ -211,6 +215,7 @@ struct group_desc {
/* Convenience macro to define a generic pin group descriptor */
#define PINCTRL_GROUP_DESC(_name, _pins, _num_pins, _data) \
(struct group_desc) { \
+ .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
.name = _name, \
.pins = _pins, \
.num_pins = _num_pins, \