aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/nomadik/pinctrl-nomadik.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-06-21 14:29:04 +0300
committerLinus Walleij <linus.walleij@linaro.org>2022-08-25 13:58:38 +0200
commit39b707fa7aba7cbfd7d53be50b6098e620f7a6d4 (patch)
treed4db7ba98d03a42d9ddc3363ebb2a1c4e16808ea /drivers/pinctrl/nomadik/pinctrl-nomadik.h
parentpinctrl: bcm: Convert drivers to use struct pingroup and PINCTRL_PINGROUP() (diff)
downloadlinux-dev-39b707fa7aba7cbfd7d53be50b6098e620f7a6d4.tar.xz
linux-dev-39b707fa7aba7cbfd7d53be50b6098e620f7a6d4.zip
pinctrl: nomadik: Convert drivers to use struct pingroup and PINCTRL_PINGROUP()
The pin control header provides struct pingroup and PINCTRL_PINGROUP() macro. Utilize them instead of open coded variants in the driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220621112904.65674-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nomadik/pinctrl-nomadik.h')
-rw-r--r--drivers/pinctrl/nomadik/pinctrl-nomadik.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.h b/drivers/pinctrl/nomadik/pinctrl-nomadik.h
index ae0bac06639f..820f07f4db32 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.h
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.h
@@ -105,21 +105,21 @@ struct nmk_function {
/**
* struct nmk_pingroup - describes a Nomadik pin group
- * @name: the name of this specific pin group
- * @pins: an array of discrete physical pins used in this group, taken
- * from the driver-local pin enumeration space
- * @num_pins: the number of pins in this group array, i.e. the number of
- * elements in .pins so we can iterate over that array
+ * @grp: Generic data of the pin group (name and pins)
* @altsetting: the altsetting to apply to all pins in this group to
* configure them to be used by a function
*/
struct nmk_pingroup {
- const char *name;
- const unsigned int *pins;
- const unsigned npins;
+ struct pingroup grp;
int altsetting;
};
+#define NMK_PIN_GROUP(a, b) \
+ { \
+ .grp = PINCTRL_PINGROUP(#a, a##_pins, ARRAY_SIZE(a##_pins)), \
+ .altsetting = b, \
+ }
+
/**
* struct nmk_pinctrl_soc_data - Nomadik pin controller per-SoC configuration
* @pins: An array describing all pins the pin controller affects.