diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 17:08:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 17:08:46 -0400 |
commit | 7bf97e1d5a94b6a71815771bb9452fc2c022c966 (patch) | |
tree | f89082dbd33a51a79c9a9c0dddb29e2b11b8207e /drivers/of | |
parent | 30304e5a79d424eb2c8707b3ff0e9b8bf6ab3e8f (diff) | |
parent | c77c8a6fd3d57b586ff5ecb5ab5b32ca4f54fe75 (diff) |
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
Pull GPIO changes for v3.4 from Grant Likely:
"Primarily gpio device driver changes with some minor side effects
under arch/arm and arch/x86. Also includes a few core changes such as
explicitly supporting (electrical) open source and open drain outputs
and some help for parsing gpio devicetree properties."
Fix up context conflict due to Laxman Dewangan adding sleep control for
the tps65910 driver separately for gpio's and regulators.
* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
gpio/ep93xx: Remove unused inline function and useless pr_err message
gpio/sodaville: Mark broken due to core irqdomain migration
gpio/omap: fix redundant decoding of gpio offset
gpio/omap: fix incorrect update to context.irqenable1
gpio/omap: fix incorrect context restore logic in omap_gpio_runtime_*
gpio/omap: fix missing dataout context save in _set_gpio_dataout_reg
gpio/omap: fix _set_gpio_irqenable implementation
gpio/omap: fix trigger type to unsigned
gpio/omap: fix wakeup_en register update in _set_gpio_wakeup()
gpio: tegra: tegra_gpio_config shouldn't be __init
gpio/davinci: fix enabling unbanked GPIO IRQs
gpio/davinci: fix oops on unbanked gpio irq request
gpio/omap: Fix section warning for omap_mpuio_alloc_gc()
ARM: tegra: export tegra_gpio_{en,dis}able
gpio/gpio-stmpe: Fix the value returned by _get_value routine
Documentation/gpio.txt: Explain expected pinctrl interaction
GPIO: LPC32xx: Add output reading to GPO P3
GPIO: LPC32xx: Fix missing bit selection mask
gpio/omap: fix wakeups on level-triggered GPIOs
gpio/omap: Fix IRQ handling for SPARSE_IRQ
...
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/gpio.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/of/gpio.c b/drivers/of/gpio.c index 7e62d15d60f6..bba81216b4db 100644 --- a/drivers/of/gpio.c +++ b/drivers/of/gpio.c | |||
@@ -78,8 +78,9 @@ err0: | |||
78 | EXPORT_SYMBOL(of_get_named_gpio_flags); | 78 | EXPORT_SYMBOL(of_get_named_gpio_flags); |
79 | 79 | ||
80 | /** | 80 | /** |
81 | * of_gpio_count - Count GPIOs for a device | 81 | * of_gpio_named_count - Count GPIOs for a device |
82 | * @np: device node to count GPIOs for | 82 | * @np: device node to count GPIOs for |
83 | * @propname: property name containing gpio specifier(s) | ||
83 | * | 84 | * |
84 | * The function returns the count of GPIOs specified for a node. | 85 | * The function returns the count of GPIOs specified for a node. |
85 | * | 86 | * |
@@ -93,14 +94,14 @@ EXPORT_SYMBOL(of_get_named_gpio_flags); | |||
93 | * defines four GPIOs (so this function will return 4), two of which | 94 | * defines four GPIOs (so this function will return 4), two of which |
94 | * are not specified. | 95 | * are not specified. |
95 | */ | 96 | */ |
96 | unsigned int of_gpio_count(struct device_node *np) | 97 | unsigned int of_gpio_named_count(struct device_node *np, const char* propname) |
97 | { | 98 | { |
98 | unsigned int cnt = 0; | 99 | unsigned int cnt = 0; |
99 | 100 | ||
100 | do { | 101 | do { |
101 | int ret; | 102 | int ret; |
102 | 103 | ||
103 | ret = of_parse_phandle_with_args(np, "gpios", "#gpio-cells", | 104 | ret = of_parse_phandle_with_args(np, propname, "#gpio-cells", |
104 | cnt, NULL); | 105 | cnt, NULL); |
105 | /* A hole in the gpios = <> counts anyway. */ | 106 | /* A hole in the gpios = <> counts anyway. */ |
106 | if (ret < 0 && ret != -EEXIST) | 107 | if (ret < 0 && ret != -EEXIST) |
@@ -109,7 +110,7 @@ unsigned int of_gpio_count(struct device_node *np) | |||
109 | 110 | ||
110 | return cnt; | 111 | return cnt; |
111 | } | 112 | } |
112 | EXPORT_SYMBOL(of_gpio_count); | 113 | EXPORT_SYMBOL(of_gpio_named_count); |
113 | 114 | ||
114 | /** | 115 | /** |
115 | * of_gpio_simple_xlate - translate gpio_spec to the GPIO number and flags | 116 | * of_gpio_simple_xlate - translate gpio_spec to the GPIO number and flags |
@@ -228,7 +229,7 @@ void of_gpiochip_remove(struct gpio_chip *chip) | |||
228 | } | 229 | } |
229 | 230 | ||
230 | /* Private function for resolving node pointer to gpio_chip */ | 231 | /* Private function for resolving node pointer to gpio_chip */ |
231 | static int of_gpiochip_is_match(struct gpio_chip *chip, void *data) | 232 | static int of_gpiochip_is_match(struct gpio_chip *chip, const void *data) |
232 | { | 233 | { |
233 | return chip->of_node == data; | 234 | return chip->of_node == data; |
234 | } | 235 | } |