summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinmux.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-05-30 10:55:15 +0200
committerLinus Walleij <linus.walleij@linaro.org>2024-06-17 09:24:22 +0200
commit37997d7b55aa7a534e4fffdbe9a0388de4857b7e (patch)
tree5c1ee9026c61ce601d46c53b2231ba60faf3ec59 /drivers/pinctrl/pinmux.c
parentpinctrl: pinmux: Add a convenient define PINCTRL_FUNCTION_DESC() (diff)
downloadlinux-37997d7b55aa7a534e4fffdbe9a0388de4857b7e.tar.xz
linux-37997d7b55aa7a534e4fffdbe9a0388de4857b7e.zip
pinctrl: pinmux: Embed struct pinfunction into struct function_desc
struct function_desc is a particular version of the struct pinfunction with associated opaque data. Start switching pin control core and drivers to use it explicitly. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240530085745.1539925-7-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinmux.c')
-rw-r--r--drivers/pinctrl/pinmux.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index 8d69fa1b0bff..aae71a37219b 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -796,7 +796,7 @@ pinmux_generic_get_function_name(struct pinctrl_dev *pctldev,
if (!function)
return NULL;
- return function->name;
+ return function->func.name;
}
EXPORT_SYMBOL_GPL(pinmux_generic_get_function_name);
@@ -805,12 +805,12 @@ EXPORT_SYMBOL_GPL(pinmux_generic_get_function_name);
* @pctldev: pin controller device
* @selector: function number
* @groups: array of pin groups
- * @num_groups: number of pin groups
+ * @ngroups: number of pin groups
*/
int pinmux_generic_get_function_groups(struct pinctrl_dev *pctldev,
unsigned int selector,
const char * const **groups,
- unsigned int * const num_groups)
+ unsigned int * const ngroups)
{
struct function_desc *function;
@@ -821,8 +821,8 @@ int pinmux_generic_get_function_groups(struct pinctrl_dev *pctldev,
__func__, selector);
return -EINVAL;
}
- *groups = function->group_names;
- *num_groups = function->num_group_names;
+ *groups = function->func.groups;
+ *ngroups = function->func.ngroups;
return 0;
}