Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95436ada authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'pinctrl-for-v3.8-late' of...

Merge tag 'pinctrl-for-v3.8-late' of git://git.kernel.org/pub/scm/linux/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
parents a04521ab 228f1ce9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -414,7 +414,7 @@ config MACH_EXYNOS4_DT
	select CPU_EXYNOS4210
	select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
	select PINCTRL
	select PINCTRL_EXYNOS4
	select PINCTRL_EXYNOS
	select USE_OF
	help
	  Machine support for Samsung Exynos4 machine with device tree enabled.
+2 −2
Original line number Diff line number Diff line
@@ -184,8 +184,8 @@ config PINCTRL_SAMSUNG
	select PINMUX
	select PINCONF

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

+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o
obj-$(CONFIG_PINCTRL_U300)	+= pinctrl-u300.o
obj-$(CONFIG_PINCTRL_COH901)	+= pinctrl-coh901.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_XWAY)	+= pinctrl-xway.o
obj-$(CONFIG_PINCTRL_LANTIQ)	+= pinctrl-lantiq.o
+18 −0
Original line number Diff line number Diff line
@@ -1246,6 +1246,22 @@ static void __iomem *sirfsoc_rsc_of_iomap(void)
	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)
{
	int ret;
@@ -1736,6 +1752,8 @@ static int sirfsoc_gpio_probe(struct device_node *np)
		bank->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE;
		bank->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL);
		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->id = i;
		bank->is_marco = is_marco;