[PATCH v4 03/15] pinctrl: airoha: replace struct function_desc with struct pinfunction
Andy Shevchenko
andy.shevchenko at gmail.com
Wed Aug 13 09:57:00 PDT 2025
On Tue, Aug 12, 2025 at 10:27 AM Bartosz Golaszewski <brgl at bgdev.pl> wrote:
>
> From: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
>
> struct function_desc is a wrapper around struct pinfunction with an
> additional void *data pointer. This driver doesn't use the data pointer.
> We're also working towards reducing the usage of struct function_desc in
> pinctrl drivers - they should only be created by pinmux core and
> accessed by drivers using pinmux_generic_get_function(). Replace the
> struct function_desc objects in this driver with smaller struct
> pinfunction instances.
...
> #define PINCTRL_FUNC_DESC(id) \
> { \
> .desc = { \
> - .func = { \
> - .name = #id, \
> - .groups = id##_groups, \
> - .ngroups = ARRAY_SIZE(id##_groups), \
> - } \
> + .name = #id, \
> + .groups = id##_groups, \
> + .ngroups = ARRAY_SIZE(id##_groups), \
Can this use PINCTRL_PINFUNCITON() ?
> }, \
> .groups = id##_func_group, \
> .group_size = ARRAY_SIZE(id##_func_group), \
> };
--
With Best Regards,
Andy Shevchenko
More information about the Linux-mediatek
mailing list