diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 19:58:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 19:58:23 -0400 |
commit | 3d1482fe7a835a18cb45894ed67f15466b60190f (patch) | |
tree | 9a97af186208e89f4f60312b3033fedbe6dbfc5c /drivers/of | |
parent | ac1806572df55b6125ad9d117906820dacfa3145 (diff) | |
parent | 4f6a16bf019cb0bbe1deb7d3a83d3593dcce8706 (diff) |
Merge tag 'pinctrl-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control subsystem changes from Linus Walleij:
- Generic Device Tree bindings and hooks for drivers so we can move
over modern drivers to using this.
- Device Tree bindings for Tegra SoCs.
- Funneling some devicetree helper code for the drivers/of subsystem.
- New pin control drivers for:
* Freescale MXS
* Freescale i.MX51
* Freescale i.MX53
All of these use Device Tree bindings.
- Dummy pinctrl handles for stepwise migration to pinctrl, akin to
dummy regulators.
- Minor non-urgent fixes and improvments.
Fix up trivial conflicts in Documentation/driver-model/devres.txt and
drivers/pinctrl/core.c,
* tag 'pinctrl-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (46 commits)
pinctrl: pinctrl-imx: add imx51 pinctrl driver
pinctrl: pinctrl-imx: add imx53 pinctrl driver
pinctrl: pinctrl-pxa3xx: remove empty pinmux disable function
pinctrl: pinctrl-mxs: remove empty pinmux disable function
pinctrl: pinctrl-imx: remove empty pinmux disable function
pinctrl: make pinmux disable function optional
pinctrl: a minor error checking improvement for pinconf
pinctrl: mxs: skip gpio nodes for group creation
pinctrl: mxs: create group for pin config node
pinctrl: (cosmetic) fix two entries in DocBook comments
pinctrl: add more info to error msgs in pin_request
pinctrl: add pinctrl-mxs support
pinctrl: pinctrl-imx: add imx6q pinctrl driver
pinctrl: pinctrl-imx: add imx pinctrl core driver
dt: add of_get_child_count helper function
pinctrl: support gpio request deferred probing
pinctrl: add pinctrl_provide_dummies interface for platforms to use
pinctrl: enhance reporting of errors when loading from DT
pinctrl: add kerneldoc for pinctrl_ops device tree functions
pinctrl: propagate map validation errors
...
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/base.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 580644986945..d9bfd49b1935 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -1260,3 +1260,44 @@ int of_alias_get_id(struct device_node *np, const char *stem) | |||
1260 | return id; | 1260 | return id; |
1261 | } | 1261 | } |
1262 | EXPORT_SYMBOL_GPL(of_alias_get_id); | 1262 | EXPORT_SYMBOL_GPL(of_alias_get_id); |
1263 | |||
1264 | const __be32 *of_prop_next_u32(struct property *prop, const __be32 *cur, | ||
1265 | u32 *pu) | ||
1266 | { | ||
1267 | const void *curv = cur; | ||
1268 | |||
1269 | if (!prop) | ||
1270 | return NULL; | ||
1271 | |||
1272 | if (!cur) { | ||
1273 | curv = prop->value; | ||
1274 | goto out_val; | ||
1275 | } | ||
1276 | |||
1277 | curv += sizeof(*cur); | ||
1278 | if (curv >= prop->value + prop->length) | ||
1279 | return NULL; | ||
1280 | |||
1281 | out_val: | ||
1282 | *pu = be32_to_cpup(curv); | ||
1283 | return curv; | ||
1284 | } | ||
1285 | EXPORT_SYMBOL_GPL(of_prop_next_u32); | ||
1286 | |||
1287 | const char *of_prop_next_string(struct property *prop, const char *cur) | ||
1288 | { | ||
1289 | const void *curv = cur; | ||
1290 | |||
1291 | if (!prop) | ||
1292 | return NULL; | ||
1293 | |||
1294 | if (!cur) | ||
1295 | return prop->value; | ||
1296 | |||
1297 | curv += strlen(cur) + 1; | ||
1298 | if (curv >= prop->value + prop->length) | ||
1299 | return NULL; | ||
1300 | |||
1301 | return curv; | ||
1302 | } | ||
1303 | EXPORT_SYMBOL_GPL(of_prop_next_string); | ||