From 23750196ef472e9249958d5165b0bb292518c710 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Wed, 14 Dec 2011 09:30:08 +0100 Subject: [PATCH] pinctrl: add a group-specific hog macro To create elegant tables for pinmux hogs on the PXA MMP platform, we need this hog macro that can specify both function and group in one go. Acked-by: Stephen Warren Acked-by: Haojian Zhuang Signed-off-by: Linus Walleij --- include/linux/pinctrl/machine.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h index ad430e05a7b..d0aecb7f6fb 100644 --- a/include/linux/pinctrl/machine.h +++ b/include/linux/pinctrl/machine.h @@ -73,6 +73,15 @@ struct pinmux_map { { .name = a, .ctrl_dev_name = b, .function = c, \ .hog_on_boot = true } +/* + * Convenience macro to map a system function onto a certain pinctrl device + * using a specified group, to be hogged by the pinmux core until the system + * shuts down. + */ +#define PINMUX_MAP_SYS_HOG_GROUP(a, b, c, d) \ + { .name = a, .ctrl_dev_name = b, .function = c, .group = d, \ + .hog_on_boot = true } + #ifdef CONFIG_PINMUX extern int pinmux_register_mappings(struct pinmux_map const *map, -- 2.39.5