Commit 003cbe04 authored by Basavaraj Natikar's avatar Basavaraj Natikar Committed by Linus Walleij

pinctrl: Add pingroup and define PINCTRL_PINGROUP

Add 'struct pingroup' to represent pingroup and 'PINCTRL_PINGROUP'
macro for inline use. Both are used to manage and represent
larger number of pingroups.
Signed-off-by: default avatarBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220601152900.1012813-2-Basavaraj.Natikar@amd.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f2906aa8
......@@ -26,6 +26,26 @@ struct pin_config_item;
struct gpio_chip;
struct device_node;
/**
* struct pingroup - provides information on pingroup
* @name: a name for pingroup
* @pins: an array of pins in the pingroup
* @npins: number of pins in the pingroup
*/
struct pingroup {
const char *name;
const unsigned int *pins;
size_t npins;
};
/* Convenience macro to define a single named or anonymous pingroup */
#define PINCTRL_PINGROUP(_name, _pins, _npins) \
(struct pingroup){ \
.name = _name, \
.pins = _pins, \
.npins = _npins, \
}
/**
* struct pinctrl_pin_desc - boards/machines provide information on their
* pins, pads or other muxable units in this struct
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment