diff options
Diffstat (limited to 'include/linux/pinctrl/machine.h')
-rw-r--r-- | include/linux/pinctrl/machine.h | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h index 88863531d862..d0aecb7f6fb9 100644 --- a/include/linux/pinctrl/machine.h +++ b/include/linux/pinctrl/machine.h | |||
@@ -48,7 +48,7 @@ struct pinmux_map { | |||
48 | const char *group; | 48 | const char *group; |
49 | struct device *dev; | 49 | struct device *dev; |
50 | const char *dev_name; | 50 | const char *dev_name; |
51 | const bool hog_on_boot; | 51 | bool hog_on_boot; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* | 54 | /* |
@@ -66,30 +66,22 @@ struct pinmux_map { | |||
66 | { .name = a, .ctrl_dev_name = b, .function = c } | 66 | { .name = a, .ctrl_dev_name = b, .function = c } |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * Convenience macro to map a function onto the primary device pinctrl device | 69 | * Convenience macro to map a system function onto a certain pinctrl device, |
70 | * this is especially helpful on systems that have only one pin controller | 70 | * to be hogged by the pinmux core until the system shuts down. |
71 | * or need to set up a lot of mappings on the primary controller. | ||
72 | */ | ||
73 | #define PINMUX_MAP_PRIMARY(a, b, c) \ | ||
74 | { .name = a, .ctrl_dev_name = "pinctrl.0", .function = b, \ | ||
75 | .dev_name = c } | ||
76 | |||
77 | /* | ||
78 | * Convenience macro to map a system function onto the primary pinctrl device. | ||
79 | * System functions are not assigned to a particular device. | ||
80 | */ | 71 | */ |
81 | #define PINMUX_MAP_PRIMARY_SYS(a, b) \ | 72 | #define PINMUX_MAP_SYS_HOG(a, b, c) \ |
82 | { .name = a, .ctrl_dev_name = "pinctrl.0", .function = b } | 73 | { .name = a, .ctrl_dev_name = b, .function = c, \ |
74 | .hog_on_boot = true } | ||
83 | 75 | ||
84 | /* | 76 | /* |
85 | * Convenience macro to map a system function onto the primary pinctrl device, | 77 | * Convenience macro to map a system function onto a certain pinctrl device |
86 | * to be hogged by the pinmux core until the system shuts down. | 78 | * using a specified group, to be hogged by the pinmux core until the system |
79 | * shuts down. | ||
87 | */ | 80 | */ |
88 | #define PINMUX_MAP_PRIMARY_SYS_HOG(a, b) \ | 81 | #define PINMUX_MAP_SYS_HOG_GROUP(a, b, c, d) \ |
89 | { .name = a, .ctrl_dev_name = "pinctrl.0", .function = b, \ | 82 | { .name = a, .ctrl_dev_name = b, .function = c, .group = d, \ |
90 | .hog_on_boot = true } | 83 | .hog_on_boot = true } |
91 | 84 | ||
92 | |||
93 | #ifdef CONFIG_PINMUX | 85 | #ifdef CONFIG_PINMUX |
94 | 86 | ||
95 | extern int pinmux_register_mappings(struct pinmux_map const *map, | 87 | extern int pinmux_register_mappings(struct pinmux_map const *map, |