Skip to content

Commit

Permalink
Merge tag 'pinctrl-for-v3.8-late' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/linusw/linux-pinctrl

Pull late pinctrl fixes from Linus Walleij:
 "Two patches appeared as of late, one was completely news to me, the
  other one was rotated in -next for the next merge window but turned
  out to be a showstopper.

   - Exynos Kconfig fixup
   - SIRF DT translation bug"

* tag 'pinctrl-for-v3.8-late' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: sirf: replace of_gpio_simple_xlate by sirf specific of_xlate
  pinctrl: exynos: change PINCTRL_EXYNOS option
  • Loading branch information
torvalds committed Feb 8, 2013
2 parents a04521a + 228f1ce commit 95436ad
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-exynos/Kconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ config MACH_EXYNOS4_DT
select CPU_EXYNOS4210 select CPU_EXYNOS4210
select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
select PINCTRL select PINCTRL
select PINCTRL_EXYNOS4 select PINCTRL_EXYNOS
select USE_OF select USE_OF
help help
Machine support for Samsung Exynos4 machine with device tree enabled. Machine support for Samsung Exynos4 machine with device tree enabled.
Expand Down
4 changes: 2 additions & 2 deletions drivers/pinctrl/Kconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ config PINCTRL_SAMSUNG
select PINMUX select PINMUX
select PINCONF select PINCONF


config PINCTRL_EXYNOS4 config PINCTRL_EXYNOS
bool "Pinctrl driver data for Exynos4 SoC" bool "Pinctrl driver data for Samsung EXYNOS SoCs"
depends on OF && GPIOLIB depends on OF && GPIOLIB
select PINCTRL_SAMSUNG select PINCTRL_SAMSUNG


Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o
obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o
obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o
obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o
obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o obj-$(CONFIG_PINCTRL_EXYNOS) += pinctrl-exynos.o
obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o
obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o
obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o
Expand Down
18 changes: 18 additions & 0 deletions drivers/pinctrl/pinctrl-sirf.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1246,6 +1246,22 @@ static void __iomem *sirfsoc_rsc_of_iomap(void)
return of_iomap(np, 0); return of_iomap(np, 0);
} }


static int sirfsoc_gpio_of_xlate(struct gpio_chip *gc,
const struct of_phandle_args *gpiospec,
u32 *flags)
{
if (gpiospec->args[0] > SIRFSOC_GPIO_NO_OF_BANKS * SIRFSOC_GPIO_BANK_SIZE)
return -EINVAL;

if (gc != &sgpio_bank[gpiospec->args[0] / SIRFSOC_GPIO_BANK_SIZE].chip.gc)
return -EINVAL;

if (flags)
*flags = gpiospec->args[1];

return gpiospec->args[0] % SIRFSOC_GPIO_BANK_SIZE;
}

static int sirfsoc_pinmux_probe(struct platform_device *pdev) static int sirfsoc_pinmux_probe(struct platform_device *pdev)
{ {
int ret; int ret;
Expand Down Expand Up @@ -1736,6 +1752,8 @@ static int sirfsoc_gpio_probe(struct device_node *np)
bank->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE; bank->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE;
bank->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL); bank->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL);
bank->chip.gc.of_node = np; bank->chip.gc.of_node = np;
bank->chip.gc.of_xlate = sirfsoc_gpio_of_xlate;
bank->chip.gc.of_gpio_n_cells = 2;
bank->chip.regs = regs; bank->chip.regs = regs;
bank->id = i; bank->id = i;
bank->is_marco = is_marco; bank->is_marco = is_marco;
Expand Down

0 comments on commit 95436ad

Please sign in to comment.