diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 10:40:45 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 10:40:45 -0400 |
commit | b8250dc4192c6adab0b9a713a11bf19afc462c96 (patch) | |
tree | 830299d0edad314367e075012ef9ca841a3026d1 /drivers/gpio | |
parent | 56734ee2835caaf62168c28281403b61b5826841 (diff) | |
parent | 7a9819950f47dbf319895ee78220f2761f3687a3 (diff) |
Merge tag 'omap-for-v3.10/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
From Tony Lindgren <tony@atomide.com>:
Changes needed for enabling SOC_BUS for the SoC revision
information. Also enable few HW errata workarounds for omap4.
* tag 'omap-for-v3.10/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (236 commits)
ARM: OMAP4: Enable fix for Cortex-A9 erratas
ARM: OMAP2+: Export SoC information to userspace
ARM: OMAP2+: SoC name and revision unification
ARM: OMAP2+: Move common part of late init into common function
Includes an update to Linux 3.9-rc6
Conflicts:
arch/arm/mach-omap2/cclock44xx_data.c
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-ich.c | 2 | ||||
-rw-r--r-- | drivers/gpio/gpio-stmpe.c | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-ich.c b/drivers/gpio/gpio-ich.c index f9dbd503fc40..de3c317bd3e2 100644 --- a/drivers/gpio/gpio-ich.c +++ b/drivers/gpio/gpio-ich.c | |||
@@ -214,7 +214,7 @@ static int ichx_gpio_request(struct gpio_chip *chip, unsigned nr) | |||
214 | * If it can't be trusted, assume that the pin can be used as a GPIO. | 214 | * If it can't be trusted, assume that the pin can be used as a GPIO. |
215 | */ | 215 | */ |
216 | if (ichx_priv.desc->use_sel_ignore[nr / 32] & (1 << (nr & 0x1f))) | 216 | if (ichx_priv.desc->use_sel_ignore[nr / 32] & (1 << (nr & 0x1f))) |
217 | return 1; | 217 | return 0; |
218 | 218 | ||
219 | return ichx_read_bit(GPIO_USE_SEL, nr) ? 0 : -ENODEV; | 219 | return ichx_read_bit(GPIO_USE_SEL, nr) ? 0 : -ENODEV; |
220 | } | 220 | } |
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c index 770476a9da87..3ce5bc38ac31 100644 --- a/drivers/gpio/gpio-stmpe.c +++ b/drivers/gpio/gpio-stmpe.c | |||
@@ -307,11 +307,15 @@ static const struct irq_domain_ops stmpe_gpio_irq_simple_ops = { | |||
307 | .xlate = irq_domain_xlate_twocell, | 307 | .xlate = irq_domain_xlate_twocell, |
308 | }; | 308 | }; |
309 | 309 | ||
310 | static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio) | 310 | static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio, |
311 | struct device_node *np) | ||
311 | { | 312 | { |
312 | int base = stmpe_gpio->irq_base; | 313 | int base = 0; |
313 | 314 | ||
314 | stmpe_gpio->domain = irq_domain_add_simple(NULL, | 315 | if (!np) |
316 | base = stmpe_gpio->irq_base; | ||
317 | |||
318 | stmpe_gpio->domain = irq_domain_add_simple(np, | ||
315 | stmpe_gpio->chip.ngpio, base, | 319 | stmpe_gpio->chip.ngpio, base, |
316 | &stmpe_gpio_irq_simple_ops, stmpe_gpio); | 320 | &stmpe_gpio_irq_simple_ops, stmpe_gpio); |
317 | if (!stmpe_gpio->domain) { | 321 | if (!stmpe_gpio->domain) { |
@@ -346,6 +350,9 @@ static int stmpe_gpio_probe(struct platform_device *pdev) | |||
346 | stmpe_gpio->chip = template_chip; | 350 | stmpe_gpio->chip = template_chip; |
347 | stmpe_gpio->chip.ngpio = stmpe->num_gpios; | 351 | stmpe_gpio->chip.ngpio = stmpe->num_gpios; |
348 | stmpe_gpio->chip.dev = &pdev->dev; | 352 | stmpe_gpio->chip.dev = &pdev->dev; |
353 | #ifdef CONFIG_OF | ||
354 | stmpe_gpio->chip.of_node = np; | ||
355 | #endif | ||
349 | stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1; | 356 | stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1; |
350 | 357 | ||
351 | if (pdata) | 358 | if (pdata) |
@@ -366,7 +373,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev) | |||
366 | goto out_free; | 373 | goto out_free; |
367 | 374 | ||
368 | if (irq >= 0) { | 375 | if (irq >= 0) { |
369 | ret = stmpe_gpio_irq_init(stmpe_gpio); | 376 | ret = stmpe_gpio_irq_init(stmpe_gpio, np); |
370 | if (ret) | 377 | if (ret) |
371 | goto out_disable; | 378 | goto out_disable; |
372 | 379 | ||