diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 14:23:13 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 14:23:13 -0500 |
| commit | ce01e871a1d44cc97cdd7e5ba6cb0c3613c15552 (patch) | |
| tree | f1f3c8a0022d34d3da54700b0e48a1d7be48fe50 /include/linux | |
| parent | a1df7efedab047a8ea4d5850737f03d3679726a7 (diff) | |
| parent | f724e05baaf0677151c339c0249a05876c779a1d (diff) | |
Merge tag 'pinctrl-v3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pincontrol updates from Linus Walleij:
:This is the bulk of pin control changes for the v3.20 cycle:
Framework changes and enhancements:
- Passing -DDEBUG recursively to subdir drivers so we get debug
messages properly turned on.
- Infer map type from DT property in the groups parsing code in the
generic pinconfig code.
- Support for custom parameter passing in generic pin config. This
is used when you are using the generic pin config, but want to add
a few custom properties that no other driver will use.
New drivers:
- Driver for the Xilinx Zynq
- Driver for the AmLogic Meson SoCs
New features in drivers:
- Sleep support (suspend/resume) for the Cherryview driver
- mvebeu a38x can now mux a UART on pins MPP19 and MPP20
- Migrated the qualcomm driver to generic pin config handling of
extended config options in the core code.
- Support BUS1 and AUDIO in the Exynos pin controller.
- Add some missing functions in the sun6i driver.
- Add support for the A31S variant in the sun6i driver.
- EMEv2 support in the Renesas PFC driver.
- Add support for Qualcomm MSM8916 in the qcom driver.
Deleted features
- Drop support for the SiRF Marco that was never released to the
market.
- Drop SH7372 support as the support for this platform is removed
from the kernel"
* tag 'pinctrl-v3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (40 commits)
sh-pfc: emev2 - Fix mangled author name
pinctrl: cherryview: Configure HiZ pins to be input when requested as GPIOs
pinctrl: imx25: fix numbering for pins
pinctrl: pinctrl-imx: don't use invalid value of conf_reg
pinctrl: qcom: delete pin_config_get/set pinconf operations
pinctrl: qcom: Add msm8916 pinctrl driver
DT: pinctrl: Document Qualcomm MSM8916 pinctrl binding
pinctrl: qcom: increase variable size for register offsets
pinctrl: hide PCONFDUMP in #ifdef
pinctrl: rockchip: Only mask interrupts; never disable
pinctrl: zynq: Fix usb0 pins
pinctrl: sh-pfc: sh7372: Remove DT binding documentation
pinctrl: sh-pfc: sh7372: Remove PFC support
sh-pfc: Add emev2 pinmux support
sh-pfc: add macro to define pinmux without function
pinctrl: add driver for Amlogic Meson SoCs
staging: drivers: pinctrl: Fixed checkpatch.pl warnings
pinctrl: exynos: Add AUDIO pin controller for exynos7
sh-pfc: r8a7790: add MLB+ pin group
sh-pfc: r8a7791: add MLB+ pin group
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pinctrl/consumer.h | 6 | ||||
| -rw-r--r-- | include/linux/pinctrl/pinconf-generic.h | 29 | ||||
| -rw-r--r-- | include/linux/pinctrl/pinctrl.h | 12 |
3 files changed, 44 insertions, 3 deletions
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index 18eccefea06e..72c0415d6c21 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h | |||
| @@ -82,7 +82,7 @@ static inline int pinctrl_gpio_direction_output(unsigned gpio) | |||
| 82 | 82 | ||
| 83 | static inline struct pinctrl * __must_check pinctrl_get(struct device *dev) | 83 | static inline struct pinctrl * __must_check pinctrl_get(struct device *dev) |
| 84 | { | 84 | { |
| 85 | return NULL; | 85 | return ERR_PTR(-ENOSYS); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | static inline void pinctrl_put(struct pinctrl *p) | 88 | static inline void pinctrl_put(struct pinctrl *p) |
| @@ -93,7 +93,7 @@ static inline struct pinctrl_state * __must_check pinctrl_lookup_state( | |||
| 93 | struct pinctrl *p, | 93 | struct pinctrl *p, |
| 94 | const char *name) | 94 | const char *name) |
| 95 | { | 95 | { |
| 96 | return NULL; | 96 | return ERR_PTR(-ENOSYS); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | static inline int pinctrl_select_state(struct pinctrl *p, | 99 | static inline int pinctrl_select_state(struct pinctrl *p, |
| @@ -104,7 +104,7 @@ static inline int pinctrl_select_state(struct pinctrl *p, | |||
| 104 | 104 | ||
| 105 | static inline struct pinctrl * __must_check devm_pinctrl_get(struct device *dev) | 105 | static inline struct pinctrl * __must_check devm_pinctrl_get(struct device *dev) |
| 106 | { | 106 | { |
| 107 | return NULL; | 107 | return ERR_PTR(-ENOSYS); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | static inline void devm_pinctrl_put(struct pinctrl *p) | 110 | static inline void devm_pinctrl_put(struct pinctrl *p) |
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index d578a60eff23..fe65962b264f 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h | |||
| @@ -115,6 +115,18 @@ enum pin_config_param { | |||
| 115 | PIN_CONFIG_END = 0x7FFF, | 115 | PIN_CONFIG_END = 0x7FFF, |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | #ifdef CONFIG_DEBUG_FS | ||
| 119 | #define PCONFDUMP(a, b, c, d) { .param = a, .display = b, .format = c, \ | ||
| 120 | .has_arg = d } | ||
| 121 | |||
| 122 | struct pin_config_item { | ||
| 123 | const enum pin_config_param param; | ||
| 124 | const char * const display; | ||
| 125 | const char * const format; | ||
| 126 | bool has_arg; | ||
| 127 | }; | ||
| 128 | #endif /* CONFIG_DEBUG_FS */ | ||
| 129 | |||
| 118 | /* | 130 | /* |
| 119 | * Helpful configuration macro to be used in tables etc. | 131 | * Helpful configuration macro to be used in tables etc. |
| 120 | */ | 132 | */ |
| @@ -150,6 +162,12 @@ static inline unsigned long pinconf_to_config_packed(enum pin_config_param param | |||
| 150 | struct pinctrl_dev; | 162 | struct pinctrl_dev; |
| 151 | struct pinctrl_map; | 163 | struct pinctrl_map; |
| 152 | 164 | ||
| 165 | struct pinconf_generic_params { | ||
| 166 | const char * const property; | ||
| 167 | enum pin_config_param param; | ||
| 168 | u32 default_value; | ||
| 169 | }; | ||
| 170 | |||
| 153 | int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev, | 171 | int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev, |
| 154 | struct device_node *np, struct pinctrl_map **map, | 172 | struct device_node *np, struct pinctrl_map **map, |
| 155 | unsigned *reserved_maps, unsigned *num_maps, | 173 | unsigned *reserved_maps, unsigned *num_maps, |
| @@ -174,6 +192,17 @@ static inline int pinconf_generic_dt_node_to_map_pin( | |||
| 174 | PIN_MAP_TYPE_CONFIGS_PIN); | 192 | PIN_MAP_TYPE_CONFIGS_PIN); |
| 175 | } | 193 | } |
| 176 | 194 | ||
| 195 | static inline int pinconf_generic_dt_node_to_map_all( | ||
| 196 | struct pinctrl_dev *pctldev, struct device_node *np_config, | ||
| 197 | struct pinctrl_map **map, unsigned *num_maps) | ||
| 198 | { | ||
| 199 | /* | ||
| 200 | * passing the type as PIN_MAP_TYPE_INVALID causes the underlying parser | ||
| 201 | * to infer the map type from the DT properties used. | ||
| 202 | */ | ||
| 203 | return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps, | ||
| 204 | PIN_MAP_TYPE_INVALID); | ||
| 205 | } | ||
| 177 | #endif | 206 | #endif |
| 178 | 207 | ||
| 179 | #endif /* CONFIG_GENERIC_PINCONF */ | 208 | #endif /* CONFIG_GENERIC_PINCONF */ |
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index cc8e1aff0e28..66e4697516de 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h | |||
| @@ -24,6 +24,7 @@ struct pinctrl_dev; | |||
| 24 | struct pinctrl_map; | 24 | struct pinctrl_map; |
| 25 | struct pinmux_ops; | 25 | struct pinmux_ops; |
| 26 | struct pinconf_ops; | 26 | struct pinconf_ops; |
| 27 | struct pin_config_item; | ||
| 27 | struct gpio_chip; | 28 | struct gpio_chip; |
| 28 | struct device_node; | 29 | struct device_node; |
| 29 | 30 | ||
| @@ -117,6 +118,12 @@ struct pinctrl_ops { | |||
| 117 | * @confops: pin config operations vtable, if you support pin configuration in | 118 | * @confops: pin config operations vtable, if you support pin configuration in |
| 118 | * your driver | 119 | * your driver |
| 119 | * @owner: module providing the pin controller, used for refcounting | 120 | * @owner: module providing the pin controller, used for refcounting |
| 121 | * @num_custom_params: Number of driver-specific custom parameters to be parsed | ||
| 122 | * from the hardware description | ||
| 123 | * @custom_params: List of driver_specific custom parameters to be parsed from | ||
| 124 | * the hardware description | ||
| 125 | * @custom_conf_items: Information how to print @params in debugfs, must be | ||
| 126 | * the same size as the @custom_params, i.e. @num_custom_params | ||
| 120 | */ | 127 | */ |
| 121 | struct pinctrl_desc { | 128 | struct pinctrl_desc { |
| 122 | const char *name; | 129 | const char *name; |
| @@ -126,6 +133,11 @@ struct pinctrl_desc { | |||
| 126 | const struct pinmux_ops *pmxops; | 133 | const struct pinmux_ops *pmxops; |
| 127 | const struct pinconf_ops *confops; | 134 | const struct pinconf_ops *confops; |
| 128 | struct module *owner; | 135 | struct module *owner; |
| 136 | #ifdef CONFIG_GENERIC_PINCONF | ||
| 137 | unsigned int num_custom_params; | ||
| 138 | const struct pinconf_generic_params *custom_params; | ||
| 139 | const struct pin_config_item *custom_conf_items; | ||
| 140 | #endif | ||
| 129 | }; | 141 | }; |
| 130 | 142 | ||
| 131 | /* External interface to pin controller */ | 143 | /* External interface to pin controller */ |
