summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/nxp/pinctrl-s32.h
diff options
context:
space:
mode:
authorChester Lin <clin@suse.com>2023-03-27 08:27:52 +0200
committerLinus Walleij <linus.walleij@linaro.org>2023-03-27 23:35:35 +0200
commit8ff169e8448ccbc569f2cc8767a4f34f3dbbc160 (patch)
tree33c8684d43596157f41e0901b22a139c63999ea8 /drivers/pinctrl/nxp/pinctrl-s32.h
parentpinctrl: s32cc: refactor pin config parsing (diff)
downloadlinux-8ff169e8448ccbc569f2cc8767a4f34f3dbbc160.tar.xz
linux-8ff169e8448ccbc569f2cc8767a4f34f3dbbc160.zip
pinctrl: s32cc: embed generic struct pingroup
Use generic data structure to describe pin control groups in S32 SoC family and drop duplicated struct members. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Chester Lin <clin@suse.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20230327062754.3326-4-clin@suse.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nxp/pinctrl-s32.h')
-rw-r--r--drivers/pinctrl/nxp/pinctrl-s32.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/pinctrl/nxp/pinctrl-s32.h b/drivers/pinctrl/nxp/pinctrl-s32.h
index 545bf16b988d..850cd668f406 100644
--- a/drivers/pinctrl/nxp/pinctrl-s32.h
+++ b/drivers/pinctrl/nxp/pinctrl-s32.h
@@ -15,16 +15,12 @@ struct platform_device;
/**
* struct s32_pin_group - describes an S32 pin group
- * @name: the name of this specific pin group
- * @npins: the number of pins in this group array, i.e. the number of
- * elements in pin_ids and pin_sss so we can iterate over that array
- * @pin_ids: an array of pin IDs in this group
- * @pin_sss: an array of source signal select configs paired with pin_ids
+ * @data: generic data describes group name, number of pins, and a pin array in
+ this group.
+ * @pin_sss: an array of source signal select configs paired with pin array.
*/
struct s32_pin_group {
- const char *name;
- unsigned int npins;
- unsigned int *pin_ids;
+ struct pingroup data;
unsigned int *pin_sss;
};