aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2012-03-14 02:44:11 -0400
committerIngo Molnar <mingo@elte.hu>2012-03-14 02:44:11 -0400
commitcd593accdcc27ccbe6498d9ad1c2b6cc8e1d830d (patch)
tree9424d3ac86e753706cc6c3d7e6072d2a73711e29 /drivers/gpio
parent11b91d6fe7272452c999573bab33c15c2f03dc31 (diff)
parentfde7d9049e55ab85a390be7f415d74c9f62dd0f9 (diff)
Merge tag 'v3.3-rc7' into x86/mce
Merge reason: Update from an ancient -rc1 base to an almost-final stable kernel. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-lpc32xx.c2
-rw-r--r--drivers/gpio/gpio-ml-ioh.c1
-rw-r--r--drivers/gpio/gpio-pch.c1
-rw-r--r--drivers/gpio/gpio-samsung.c23
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
98static const char *gpio_p3_names[LPC32XX_GPIO_P3_MAX] = { 98static 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)
2390static int exynos4_gpio_xlate(struct gpio_chip *gc, struct device_node *np, 2390static 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
2413static const struct of_device_id exynos4_gpio_dt_match[] __initdata = { 2416static const struct of_device_id exynos4_gpio_dt_match[] __initdata = {