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
Unified · Split
| @@ -414,7 +414,7 @@ config MACH_EXYNOS4_DT · 413 unmodified lines | ||
| 414 | 414 | select CPU_EXYNOS4210 |
| 415 | 415 | select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD |
| 416 | 416 | select PINCTRL |
| 417 | − select PINCTRL_EXYNOS4 | |
| 417 | + select PINCTRL_EXYNOS | |
| 418 | 418 | select USE_OF |
| 419 | 419 | help |
| 420 | 420 | Machine support for Samsung Exynos4 machine with device tree enabled. |
| @@ -184,8 +184,8 @@ config PINCTRL_SAMSUNG · 183 unmodified lines | ||
| 184 | 184 | select PINMUX |
| 185 | 185 | select PINCONF |
| 186 | 186 | |
| 187 | −config PINCTRL_EXYNOS4 | |
| 188 | − bool "Pinctrl driver data for Exynos4 SoC" | |
| 187 | +config PINCTRL_EXYNOS | |
| 188 | + bool "Pinctrl driver data for Samsung EXYNOS SoCs" | |
| 189 | 189 | depends on OF && GPIOLIB |
| 190 | 190 | select PINCTRL_SAMSUNG |
| 191 | 191 | |
| @@ -36,7 +36,7 @@ obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o · 35 unmodified lines | ||
| 36 | 36 | obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o |
| 37 | 37 | obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o |
| 38 | 38 | obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o |
| 39 | −obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o | |
| 39 | +obj-$(CONFIG_PINCTRL_EXYNOS) += pinctrl-exynos.o | |
| 40 | 40 | obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o |
| 41 | 41 | obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o |
| 42 | 42 | obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o |
| @@ -1246,6 +1246,22 @@ static void __iomem *sirfsoc_rsc_of_iomap(void) · 1245 unmodified lines | ||
| 1246 | 1246 | return of_iomap(np, 0); |
| 1247 | 1247 | } |
| 1248 | 1248 | |
| 1249 | +static int sirfsoc_gpio_of_xlate(struct gpio_chip *gc, | |
| 1250 | + const struct of_phandle_args *gpiospec, | |
| 1251 | + u32 *flags) | |
| 1252 | +{ | |
| 1253 | + if (gpiospec->args[0] > SIRFSOC_GPIO_NO_OF_BANKS * SIRFSOC_GPIO_BANK_SIZE) | |
| 1254 | + return -EINVAL; | |
| 1255 | + | |
| 1256 | + if (gc != &sgpio_bank[gpiospec->args[0] / SIRFSOC_GPIO_BANK_SIZE].chip.gc) | |
| 1257 | + return -EINVAL; | |
| 1258 | + | |
| 1259 | + if (flags) | |
| 1260 | + *flags = gpiospec->args[1]; | |
| 1261 | + | |
| 1262 | + return gpiospec->args[0] % SIRFSOC_GPIO_BANK_SIZE; | |
| 1263 | +} | |
| 1264 | + | |
| 1249 | 1265 | static int sirfsoc_pinmux_probe(struct platform_device *pdev) |
| 1250 | 1266 | { |
| 1251 | 1267 | int ret; |
| @@ -1736,6 +1752,8 @@ static int sirfsoc_gpio_probe(struct device_node *np) · 484 unmodified lines | ||
| 1736 | 1752 | bank->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE; |
| 1737 | 1753 | bank->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL); |
| 1738 | 1754 | bank->chip.gc.of_node = np; |
| 1755 | + bank->chip.gc.of_xlate = sirfsoc_gpio_of_xlate; | |
| 1756 | + bank->chip.gc.of_gpio_n_cells = 2; | |
| 1739 | 1757 | bank->chip.regs = regs; |
| 1740 | 1758 | bank->id = i; |
| 1741 | 1759 | bank->is_marco = is_marco; |