pinctrl: add a group-specific hog macro
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 14 Dec 2011 08:30:08 +0000 (09:30 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 3 Jan 2012 08:10:06 +0000 (09:10 +0100)
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 <swarren@nvidia.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
include/linux/pinctrl/machine.h

index ad430e05a7ba236c395be3a08e431d957968e54c..d0aecb7f6fb9f56e9fb5de32487ebe33f078ad9a 100644 (file)
@@ -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,
This page took 0.026088 seconds and 5 git commands to generate.