Skip to content

Commit 95436ad

Browse files
committed
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
2 parents a04521a + 228f1ce commit 95436ad

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

arch/arm/mach-exynos/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ config MACH_EXYNOS4_DT
414414
select CPU_EXYNOS4210
415415
select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
416416
select PINCTRL
417-
select PINCTRL_EXYNOS4
417+
select PINCTRL_EXYNOS
418418
select USE_OF
419419
help
420420
Machine support for Samsung Exynos4 machine with device tree enabled.

drivers/pinctrl/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ config PINCTRL_SAMSUNG
184184
select PINMUX
185185
select PINCONF
186186

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"
189189
depends on OF && GPIOLIB
190190
select PINCTRL_SAMSUNG
191191

drivers/pinctrl/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o
3636
obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o
3737
obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o
3838
obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o
39-
obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o
39+
obj-$(CONFIG_PINCTRL_EXYNOS) += pinctrl-exynos.o
4040
obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o
4141
obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o
4242
obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o

drivers/pinctrl/pinctrl-sirf.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,22 @@ static void __iomem *sirfsoc_rsc_of_iomap(void)
12461246
return of_iomap(np, 0);
12471247
}
12481248

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+
12491265
static int sirfsoc_pinmux_probe(struct platform_device *pdev)
12501266
{
12511267
int ret;
@@ -1736,6 +1752,8 @@ static int sirfsoc_gpio_probe(struct device_node *np)
17361752
bank->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE;
17371753
bank->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL);
17381754
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;
17391757
bank->chip.regs = regs;
17401758
bank->id = i;
17411759
bank->is_marco = is_marco;

0 commit comments

Comments
 (0)