Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6

GPIO fixes for v3.3-rc2

Straight forward bug fixes in this branch. A couple of x86 gpio drivers
missing spinlock initialization, an API change fixup for the samsung driver
and a name typo fix.

* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6:
gpio: Add missing spin_lock_init in gpio-ml-ioh driver
gpio: Add missing spin_lock_init in gpio-pch driver
gpio: samsung: adapt to changes in gpio specifier translator function declaration
Correct bad gpio naming

+16 -11
+1 -1
drivers/gpio/gpio-lpc32xx.c
··· 96 96 }; 97 97 98 98 static const char *gpio_p3_names[LPC32XX_GPIO_P3_MAX] = { 99 - "gpi000", "gpio01", "gpio02", "gpio03", 99 + "gpio00", "gpio01", "gpio02", "gpio03", 100 100 "gpio04", "gpio05" 101 101 }; 102 102
+1
drivers/gpio/gpio-ml-ioh.c
··· 448 448 chip->reg = chip->base; 449 449 chip->ch = i; 450 450 mutex_init(&chip->lock); 451 + spin_lock_init(&chip->spinlock); 451 452 ioh_gpio_setup(chip, num_ports[i]); 452 453 ret = gpiochip_add(&chip->gpio); 453 454 if (ret) {
+1
drivers/gpio/gpio-pch.c
··· 392 392 chip->reg = chip->base; 393 393 pci_set_drvdata(pdev, chip); 394 394 mutex_init(&chip->lock); 395 + spin_lock_init(&chip->spinlock); 395 396 pch_gpio_setup(chip); 396 397 ret = gpiochip_add(&chip->gpio); 397 398 if (ret) {
+13 -10
drivers/gpio/gpio-samsung.c
··· 2387 2387 }; 2388 2388 2389 2389 #if defined(CONFIG_ARCH_EXYNOS4) && defined(CONFIG_OF) 2390 - static int exynos4_gpio_xlate(struct gpio_chip *gc, struct device_node *np, 2391 - const void *gpio_spec, u32 *flags) 2390 + static int exynos4_gpio_xlate(struct gpio_chip *gc, 2391 + const struct of_phandle_args *gpiospec, u32 *flags) 2392 2392 { 2393 - const __be32 *gpio = gpio_spec; 2394 - const u32 n = be32_to_cpup(gpio); 2395 - unsigned int pin = gc->base + be32_to_cpu(gpio[0]); 2393 + unsigned int pin; 2396 2394 2397 2395 if (WARN_ON(gc->of_gpio_n_cells < 4)) 2398 2396 return -EINVAL; 2399 2397 2400 - if (n > gc->ngpio) 2398 + if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) 2401 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 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 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 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 2416 static const struct of_device_id exynos4_gpio_dt_match[] __initdata = {