diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-02-21 02:32:19 -0500 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-02-21 02:32:19 -0500 |
| commit | 3f60db4bde17088feed5f143582d7661cdbb9a01 (patch) | |
| tree | 21a7866ae6d199cfa8f619ced9500687bdf84f18 /drivers/gpio | |
| parent | 5e36097889725dbe4f098c3f1e93cb2f21cae6ee (diff) | |
| parent | b01543dfe67bb1d191998e90d20534dc354de059 (diff) | |
Merge commit 'v3.3-rc4'
Diffstat (limited to 'drivers/gpio')
| -rw-r--r-- | drivers/gpio/gpio-lpc32xx.c | 2 | ||||
| -rw-r--r-- | drivers/gpio/gpio-ml-ioh.c | 1 | ||||
| -rw-r--r-- | drivers/gpio/gpio-pch.c | 1 | ||||
| -rw-r--r-- | drivers/gpio/gpio-samsung.c | 23 |
4 files changed, 16 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c index 5b6948081f8f..ddfacc5ce56d 100644 --- a/drivers/gpio/gpio-lpc32xx.c +++ b/drivers/gpio/gpio-lpc32xx.c | |||
| @@ -96,7 +96,7 @@ static const char *gpio_p2_names[LPC32XX_GPIO_P2_MAX] = { | |||
| 96 | }; | 96 | }; |
| 97 | 97 | ||
| 98 | static const char *gpio_p3_names[LPC32XX_GPIO_P3_MAX] = { | 98 | static const char *gpio_p3_names[LPC32XX_GPIO_P3_MAX] = { |
| 99 | "gpi000", "gpio01", "gpio02", "gpio03", | 99 | "gpio00", "gpio01", "gpio02", "gpio03", |
| 100 | "gpio04", "gpio05" | 100 | "gpio04", "gpio05" |
| 101 | }; | 101 | }; |
| 102 | 102 | ||
diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c index 03d6dd5dcb77..f0febe5b8221 100644 --- a/drivers/gpio/gpio-ml-ioh.c +++ b/drivers/gpio/gpio-ml-ioh.c | |||
| @@ -448,6 +448,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev, | |||
| 448 | chip->reg = chip->base; | 448 | chip->reg = chip->base; |
| 449 | chip->ch = i; | 449 | chip->ch = i; |
| 450 | mutex_init(&chip->lock); | 450 | mutex_init(&chip->lock); |
| 451 | spin_lock_init(&chip->spinlock); | ||
| 451 | ioh_gpio_setup(chip, num_ports[i]); | 452 | ioh_gpio_setup(chip, num_ports[i]); |
| 452 | ret = gpiochip_add(&chip->gpio); | 453 | ret = gpiochip_add(&chip->gpio); |
| 453 | if (ret) { | 454 | if (ret) { |
diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c index 68fa55e86eb1..e8729cc2ba2b 100644 --- a/drivers/gpio/gpio-pch.c +++ b/drivers/gpio/gpio-pch.c | |||
| @@ -392,6 +392,7 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev, | |||
| 392 | chip->reg = chip->base; | 392 | chip->reg = chip->base; |
| 393 | pci_set_drvdata(pdev, chip); | 393 | pci_set_drvdata(pdev, chip); |
| 394 | mutex_init(&chip->lock); | 394 | mutex_init(&chip->lock); |
| 395 | spin_lock_init(&chip->spinlock); | ||
| 395 | pch_gpio_setup(chip); | 396 | pch_gpio_setup(chip); |
| 396 | ret = gpiochip_add(&chip->gpio); | 397 | ret = gpiochip_add(&chip->gpio); |
| 397 | if (ret) { | 398 | if (ret) { |
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index a7661773c052..0a79a1167a25 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c | |||
| @@ -2387,27 +2387,30 @@ static struct samsung_gpio_chip exynos4_gpios_3[] = { | |||
| 2387 | }; | 2387 | }; |
| 2388 | 2388 | ||
| 2389 | #if defined(CONFIG_ARCH_EXYNOS4) && defined(CONFIG_OF) | 2389 | #if defined(CONFIG_ARCH_EXYNOS4) && defined(CONFIG_OF) |
| 2390 | static int exynos4_gpio_xlate(struct gpio_chip *gc, struct device_node *np, | 2390 | static int exynos4_gpio_xlate(struct gpio_chip *gc, |
| 2391 | const void *gpio_spec, u32 *flags) | 2391 | const struct of_phandle_args *gpiospec, u32 *flags) |
| 2392 | { | 2392 | { |
| 2393 | const __be32 *gpio = gpio_spec; | 2393 | unsigned int pin; |
| 2394 | const u32 n = be32_to_cpup(gpio); | ||
| 2395 | unsigned int pin = gc->base + be32_to_cpu(gpio[0]); | ||
| 2396 | 2394 | ||
| 2397 | if (WARN_ON(gc->of_gpio_n_cells < 4)) | 2395 | if (WARN_ON(gc->of_gpio_n_cells < 4)) |
| 2398 | return -EINVAL; | 2396 | return -EINVAL; |
| 2399 | 2397 | ||
| 2400 | if (n > gc->ngpio) | 2398 | if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) |
| 2401 | return -EINVAL; | 2399 | return -EINVAL; |
| 2402 | 2400 | ||
| 2403 | if (s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(be32_to_cpu(gpio[1])))) | 2401 | if (gpiospec->args[0] > gc->ngpio) |
| 2402 | return -EINVAL; | ||
| 2403 | |||
| 2404 | pin = gc->base + gpiospec->args[0]; | ||
| 2405 | |||
| 2406 | if (s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(gpiospec->args[1]))) | ||
| 2404 | pr_warn("gpio_xlate: failed to set pin function\n"); | 2407 | pr_warn("gpio_xlate: failed to set pin function\n"); |
| 2405 | if (s3c_gpio_setpull(pin, be32_to_cpu(gpio[2]))) | 2408 | if (s3c_gpio_setpull(pin, gpiospec->args[2])) |
| 2406 | pr_warn("gpio_xlate: failed to set pin pull up/down\n"); | 2409 | pr_warn("gpio_xlate: failed to set pin pull up/down\n"); |
| 2407 | if (s5p_gpio_set_drvstr(pin, be32_to_cpu(gpio[3]))) | 2410 | if (s5p_gpio_set_drvstr(pin, gpiospec->args[3])) |
| 2408 | pr_warn("gpio_xlate: failed to set pin drive strength\n"); | 2411 | pr_warn("gpio_xlate: failed to set pin drive strength\n"); |
| 2409 | 2412 | ||
| 2410 | return n; | 2413 | return gpiospec->args[0]; |
| 2411 | } | 2414 | } |
| 2412 | 2415 | ||
| 2413 | static const struct of_device_id exynos4_gpio_dt_match[] __initdata = { | 2416 | static const struct of_device_id exynos4_gpio_dt_match[] __initdata = { |
