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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJPL3DuAAoJEEFnBt12D9kB3ZAP/ikN3WkdfTvufg9pxfWW5Mwn dMuZKRf8tjNVk+orTRc45mgF5w1b9QFfVC90q/hYWExHw34WgkW0yDoWDsnVzuez q5WpkxVgvc8lPBD/XC/hS9tNoER5AkdS5w5daw5t499jt17euxADmBSmI0N12api U1AmDuLK6281YbYfGJiFYaSyyVpE582XRm+jM+3SuwPpXeFu56sZk9r/ehEhRoT/ 7HjnBmga3REJN3YhUU6545HaD1hXdPCqXg2gYu0T3MCtvtuLAEEnUF6magWLNNfL JleZz0fQ1YAM/Q0CYU7S6Fib8j9QWgQOkrPRcvt83OMu7gbQT6A2i8tyM2eXhtlJ qFO3+uXdtrGBAGDT4G4Hdzt91xtKSIwZQZxpa0cZdif/MiFBwbOB6NwNURuOGEHk 6WSQrstZozd6QjeSla+5jrppCJfBgguQ+xixY50xcYnb8xjJrm780UKdySsThXdv W1WhK2SgkbMztwBspXfx5SNg02udRwolfuVXL2TinPZOmJgnElK+WtJ+1dkyoQTW OhX4hWYCCi4Ao2qAoghWRCeVksFd6XsJvEZJsO57/URlNbEaE++FyCav/BS51CVe AP6m0EizXC89XHQW1xWpp5Wcv/8IvC7PfJ9liKXyvjteiSyC7hYlgYqOA9bMn9NP +G+6mzfJ66qC/Hvq3GkF =WQ/Y -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
8597559a78
@ -96,7 +96,7 @@ static const char *gpio_p2_names[LPC32XX_GPIO_P2_MAX] = {
|
||||
};
|
||||
|
||||
static const char *gpio_p3_names[LPC32XX_GPIO_P3_MAX] = {
|
||||
"gpi000", "gpio01", "gpio02", "gpio03",
|
||||
"gpio00", "gpio01", "gpio02", "gpio03",
|
||||
"gpio04", "gpio05"
|
||||
};
|
||||
|
||||
|
@ -448,6 +448,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev,
|
||||
chip->reg = chip->base;
|
||||
chip->ch = i;
|
||||
mutex_init(&chip->lock);
|
||||
spin_lock_init(&chip->spinlock);
|
||||
ioh_gpio_setup(chip, num_ports[i]);
|
||||
ret = gpiochip_add(&chip->gpio);
|
||||
if (ret) {
|
||||
|
@ -392,6 +392,7 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev,
|
||||
chip->reg = chip->base;
|
||||
pci_set_drvdata(pdev, chip);
|
||||
mutex_init(&chip->lock);
|
||||
spin_lock_init(&chip->spinlock);
|
||||
pch_gpio_setup(chip);
|
||||
ret = gpiochip_add(&chip->gpio);
|
||||
if (ret) {
|
||||
|
@ -2387,27 +2387,30 @@ static struct samsung_gpio_chip exynos4_gpios_3[] = {
|
||||
};
|
||||
|
||||
#if defined(CONFIG_ARCH_EXYNOS4) && defined(CONFIG_OF)
|
||||
static int exynos4_gpio_xlate(struct gpio_chip *gc, struct device_node *np,
|
||||
const void *gpio_spec, u32 *flags)
|
||||
static int exynos4_gpio_xlate(struct gpio_chip *gc,
|
||||
const struct of_phandle_args *gpiospec, u32 *flags)
|
||||
{
|
||||
const __be32 *gpio = gpio_spec;
|
||||
const u32 n = be32_to_cpup(gpio);
|
||||
unsigned int pin = gc->base + be32_to_cpu(gpio[0]);
|
||||
unsigned int pin;
|
||||
|
||||
if (WARN_ON(gc->of_gpio_n_cells < 4))
|
||||
return -EINVAL;
|
||||
|
||||
if (n > gc->ngpio)
|
||||
if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells))
|
||||
return -EINVAL;
|
||||
|
||||
if (s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(be32_to_cpu(gpio[1]))))
|
||||
if (gpiospec->args[0] > gc->ngpio)
|
||||
return -EINVAL;
|
||||
|
||||
pin = gc->base + gpiospec->args[0];
|
||||
|
||||
if (s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(gpiospec->args[1])))
|
||||
pr_warn("gpio_xlate: failed to set pin function\n");
|
||||
if (s3c_gpio_setpull(pin, be32_to_cpu(gpio[2])))
|
||||
if (s3c_gpio_setpull(pin, gpiospec->args[2]))
|
||||
pr_warn("gpio_xlate: failed to set pin pull up/down\n");
|
||||
if (s5p_gpio_set_drvstr(pin, be32_to_cpu(gpio[3])))
|
||||
if (s5p_gpio_set_drvstr(pin, gpiospec->args[3]))
|
||||
pr_warn("gpio_xlate: failed to set pin drive strength\n");
|
||||
|
||||
return n;
|
||||
return gpiospec->args[0];
|
||||
}
|
||||
|
||||
static const struct of_device_id exynos4_gpio_dt_match[] __initdata = {
|
||||
|
Loading…
Reference in New Issue
Block a user