diff options
author | Tony Lindgren <tony@atomide.com> | 2016-12-27 20:20:01 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-01-03 11:26:18 +0300 |
commit | a76edc89b100e4fefb2a5c00cd8cd557437659e7 (patch) | |
tree | 0131d6cad80d2ed78c97b485b0a2d9cf2a446877 /drivers/pinctrl/core.h | |
parent | c033a718f615b6b3ddc83ce3e0a217c30bd09cb5 (diff) | |
download | linux-a76edc89b100e4fefb2a5c00cd8cd557437659e7.tar.xz |
pinctrl: core: Add generic pinctrl functions for managing groups
We can add generic helpers for function handling for cases where the pin
controller driver does not need to use static arrays.
Signed-off-by: Tony Lindgren <tony@atomide.com>
[Renamed the Kconfig item and moved things around]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.h')
-rw-r--r-- | drivers/pinctrl/core.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index b04c59bf9701..ad812a2d7248 100644 --- a/drivers/pinctrl/core.h +++ b/drivers/pinctrl/core.h @@ -26,6 +26,8 @@ struct pinctrl_gpio_range; * this radix tree * @pin_group_tree: optionally each pin group can be stored in this radix tree * @num_groups: optionally number of groups can be kept here + * @pin_function_tree: optionally each function can be stored in this radix tree + * @num_functions: optionally number of functions can be kept here * @gpio_ranges: a list of GPIO ranges that is handled by this pin controller, * ranges are added to this list at runtime * @dev: the device entry for this pin controller @@ -47,6 +49,10 @@ struct pinctrl_dev { struct radix_tree_root pin_group_tree; unsigned int num_groups; #endif +#ifdef CONFIG_GENERIC_PINMUX_FUNCTIONS + struct radix_tree_root pin_function_tree; + unsigned int num_functions; +#endif struct list_head gpio_ranges; struct device *dev; struct module *owner; |