diff options
| author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-23 14:02:19 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-23 14:02:19 -0500 |
| commit | 99a85b901eb54f62ff0c3fd6eb56e60b7b9f15c8 (patch) | |
| tree | 0c6637b7d2172e079c30e966847326767cbaf45c /include/linux/pinctrl | |
| parent | 135f9be9194cf7778eb73594aa55791b229cf27c (diff) | |
| parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
Merge tag 'v4.0-rc1' into patchwork
Linux 34.0-rc1
* tag 'v4.0-rc1': (8947 commits)
Linux 4.0-rc1
autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
procfs: fix race between symlink removals and traversals
debugfs: leave freeing a symlink body until inode eviction
Documentation/filesystems/Locking: ->get_sb() is long gone
trylock_super(): replacement for grab_super_passive()
fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
SELinux: Use d_is_positive() rather than testing dentry->d_inode
Smack: Use d_is_positive() rather than testing dentry->d_inode
TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()
Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode
Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb
VFS: Split DCACHE_FILE_TYPE into regular and special types
VFS: Add a fallthrough flag for marking virtual dentries
VFS: Add a whiteout dentry type
VFS: Introduce inode-getting helpers for layered/unioned fs environments
kernel: make READ_ONCE() valid on const arguments
blk-throttle: check stats_cpu before reading it from sysfs
...
Diffstat (limited to 'include/linux/pinctrl')
| -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 */ |
