diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2015-05-06 08:19:13 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2015-05-06 08:45:19 -0400 |
| commit | 8c4c2016345feefcd289ce2479eb70286d30825a (patch) | |
| tree | 91e32d3a1ead85db13b279da466fd147bc04cb4f /include/linux/pinctrl | |
| parent | fa76a3db7093a527333c380df82a0f158d9b8299 (diff) | |
pinctrl: move strict option to pinmux_ops
While the pinmux_ops are ideally just a vtable for pin mux
calls, the "strict" setting belongs so intuitively with the
pin multiplexing that we should move it here anyway. Putting
it in the top pinctrl_desc makes no sense.
Cc: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/pinctrl')
| -rw-r--r-- | include/linux/pinctrl/pinctrl.h | 3 | ||||
| -rw-r--r-- | include/linux/pinctrl/pinmux.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index fc6b0348c375..66e4697516de 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h | |||
| @@ -114,8 +114,6 @@ struct pinctrl_ops { | |||
| 114 | * of the pins field above | 114 | * of the pins field above |
| 115 | * @pctlops: pin control operation vtable, to support global concepts like | 115 | * @pctlops: pin control operation vtable, to support global concepts like |
| 116 | * grouping of pins, this is optional. | 116 | * grouping of pins, this is optional. |
| 117 | * @strict: check both gpio_owner and mux_owner strictly before approving | ||
| 118 | the pin request | ||
| 119 | * @pmxops: pinmux operations vtable, if you support pinmuxing in your driver | 117 | * @pmxops: pinmux operations vtable, if you support pinmuxing in your driver |
| 120 | * @confops: pin config operations vtable, if you support pin configuration in | 118 | * @confops: pin config operations vtable, if you support pin configuration in |
| 121 | * your driver | 119 | * your driver |
| @@ -134,7 +132,6 @@ struct pinctrl_desc { | |||
| 134 | const struct pinctrl_ops *pctlops; | 132 | const struct pinctrl_ops *pctlops; |
| 135 | const struct pinmux_ops *pmxops; | 133 | const struct pinmux_ops *pmxops; |
| 136 | const struct pinconf_ops *confops; | 134 | const struct pinconf_ops *confops; |
| 137 | bool strict; | ||
| 138 | struct module *owner; | 135 | struct module *owner; |
| 139 | #ifdef CONFIG_GENERIC_PINCONF | 136 | #ifdef CONFIG_GENERIC_PINCONF |
| 140 | unsigned int num_custom_params; | 137 | unsigned int num_custom_params; |
diff --git a/include/linux/pinctrl/pinmux.h b/include/linux/pinctrl/pinmux.h index 511bda9ed4bf..d3740fa7073f 100644 --- a/include/linux/pinctrl/pinmux.h +++ b/include/linux/pinctrl/pinmux.h | |||
| @@ -56,6 +56,9 @@ struct pinctrl_dev; | |||
| 56 | * depending on whether the GPIO is configured as input or output, | 56 | * depending on whether the GPIO is configured as input or output, |
| 57 | * a direction selector function may be implemented as a backing | 57 | * a direction selector function may be implemented as a backing |
| 58 | * to the GPIO controllers that need pin muxing. | 58 | * to the GPIO controllers that need pin muxing. |
| 59 | * @strict: do not allow simultaneous use of the same pin for GPIO and another | ||
| 60 | * function. Check both gpio_owner and mux_owner strictly before approving | ||
| 61 | * the pin request. | ||
| 59 | */ | 62 | */ |
| 60 | struct pinmux_ops { | 63 | struct pinmux_ops { |
| 61 | int (*request) (struct pinctrl_dev *pctldev, unsigned offset); | 64 | int (*request) (struct pinctrl_dev *pctldev, unsigned offset); |
| @@ -79,6 +82,7 @@ struct pinmux_ops { | |||
| 79 | struct pinctrl_gpio_range *range, | 82 | struct pinctrl_gpio_range *range, |
| 80 | unsigned offset, | 83 | unsigned offset, |
| 81 | bool input); | 84 | bool input); |
| 85 | bool strict; | ||
| 82 | }; | 86 | }; |
| 83 | 87 | ||
| 84 | #endif /* CONFIG_PINMUX */ | 88 | #endif /* CONFIG_PINMUX */ |
