diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-07 22:56:45 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-07 22:56:45 +0200 |
commit | edb2a385ec331fda7ecb5502d63e5e8be86b7a84 (patch) | |
tree | 329a2717306193d89052f460cff9db04c1fcee9b /drivers/pinctrl/mvebu | |
parent | Merge tag 'mailbox-v4.18' of git://git.linaro.org/landing-teams/working/fujit... (diff) | |
parent | pinctrl: cherryview: limit Strago DMI workarounds to version 1.0 (diff) | |
download | linux-edb2a385ec331fda7ecb5502d63e5e8be86b7a84.tar.xz linux-edb2a385ec331fda7ecb5502d63e5e8be86b7a84.zip |
Merge tag 'pinctrl-v4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control updates from Linus Walleij:
"This is the bulk of pin control changes for v4.18.
No core changes this time! Just a calm all-over-the-place drivers,
updates and fixes cycle as it seems.
New drivers/subdrivers:
- Actions Semiconductor S900 driver with more Actions variants for
S700, S500 in the pipe. Also generic GPIO support on top of the
same driver and IRQ support is in the pipe.
- Renesas r8a77470 PFC support.
- Renesas r8a77990 PFC support.
- Allwinner Sunxi H6 R_PIO support.
- Rockchip PX30 support.
- Meson Meson8m2 support.
- Remove support for the ill-fated Samsung Exynos 5440 SoC.
Improvements:
- Context save/restore support in pinctrl-single.
- External interrupt support for the Mediatek MT7622.
- Qualcomm ACPI HID QCOM8002 supported.
Fixes:
- Fix up suspend/resume support for Exynos 5433.
- Fix Strago DMI fixes on the Intel Cherryview"
* tag 'pinctrl-v4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (72 commits)
pinctrl: cherryview: limit Strago DMI workarounds to version 1.0
pinctrl: at91-pio4: add missing of_node_put
pinctrl: armada-37xx: Fix spurious irq management
gpiolib: discourage gpiochip_add_pin[group]_range for DT pinctrls
pinctrl: msm: fix gpio-hog related boot issues
MAINTAINERS: update entry for Mediatek pin controller
pinctrl: mediatek: remove unused fields in struct mtk_eint_hw
pinctrl: mediatek: use generic EINT register maps for each SoC
pinctrl: mediatek: add EINT support to MT7622 SoC
pinctrl: mediatek: refactor EINT related code for all MediaTek pinctrl can fit
dt-bindings: pinctrl: add external interrupt support to MT7622 pinctrl
pinctrl: freescale: Switch to SPDX identifier
pinctrl: samsung: Fix suspend/resume for Exynos5433 GPF1..5 banks
pinctrl: sh-pfc: rcar-gen3: Fix grammar in static pin comments
pinctrl: sh-pfc: r8a77965: Add I2C pin support
pinctrl: sh-pfc: r8a77990: Add EthernetAVB pins, groups and functions
pinctrl: sh-pfc: r8a77990: Add I2C{1,2,4,5,6,7} pins, groups and functions
pinctrl: sh-pfc: r8a77990: Add SCIF pins, groups and functions
pinctrl: sh-pfc: r8a77990: Add bias pinconf support
pinctrl: sh-pfc: Initial R8A77990 PFC support
...
Diffstat (limited to '')
-rw-r--r-- | drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 32 | ||||
-rw-r--r-- | drivers/pinctrl/mvebu/pinctrl-armada-xp.c | 22 |
2 files changed, 21 insertions, 33 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c index 5b63248c8209..674ffdf8103c 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c @@ -214,18 +214,6 @@ static inline void armada_37xx_update_reg(unsigned int *reg, } } -static int armada_37xx_get_func_reg(struct armada_37xx_pin_group *grp, - const char *func) -{ - int f; - - for (f = 0; (f < NB_FUNCS) && grp->funcs[f]; f++) - if (!strcmp(grp->funcs[f], func)) - return f; - - return -ENOTSUPP; -} - static struct armada_37xx_pin_group *armada_37xx_find_next_grp_by_pin( struct armada_37xx_pinctrl *info, int pin, int *grp) { @@ -344,10 +332,9 @@ static int armada_37xx_pmx_set_by_name(struct pinctrl_dev *pctldev, dev_dbg(info->dev, "enable function %s group %s\n", name, grp->name); - func = armada_37xx_get_func_reg(grp, name); - + func = match_string(grp->funcs, NB_FUNCS, name); if (func < 0) - return func; + return -ENOTSUPP; val = grp->val[func]; @@ -679,12 +666,13 @@ static void armada_37xx_irq_handler(struct irq_desc *desc) writel(1 << hwirq, info->base + IRQ_STATUS + 4 * i); - continue; + goto update_status; } } generic_handle_irq(virq); +update_status: /* Update status in case a new IRQ appears */ spin_lock_irqsave(&info->irq_lock, flags); status = readl_relaxed(info->base + @@ -932,12 +920,12 @@ static int armada_37xx_fill_func(struct armada_37xx_pinctrl *info) struct armada_37xx_pin_group *gp = &info->groups[g]; int f; - for (f = 0; (f < NB_FUNCS) && gp->funcs[f]; f++) { - if (strcmp(gp->funcs[f], name) == 0) { - *groups = gp->name; - groups++; - } - } + f = match_string(gp->funcs, NB_FUNCS, name); + if (f < 0) + continue; + + *groups = gp->name; + groups++; } } return 0; diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c index b854f1ee5de5..5e828468e43d 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c @@ -431,40 +431,40 @@ static struct mvebu_mpp_mode mv98dx3236_mpp_modes[] = { MPP_MODE(19, MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_98DX3236_PLUS), MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x4, "dev", "rb", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "nand", "rb", V_98DX3236_PLUS)), MPP_MODE(20, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), MPP_VAR_FUNCTION(0x4, "dev", "we0", V_98DX3236_PLUS)), MPP_MODE(21, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "ad0", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "ad0", V_98DX3236_PLUS)), MPP_MODE(22, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "ad1", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "ad1", V_98DX3236_PLUS)), MPP_MODE(23, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "ad2", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "ad2", V_98DX3236_PLUS)), MPP_MODE(24, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "ad3", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "ad3", V_98DX3236_PLUS)), MPP_MODE(25, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "ad4", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "ad4", V_98DX3236_PLUS)), MPP_MODE(26, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "ad5", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "ad5", V_98DX3236_PLUS)), MPP_MODE(27, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "ad6", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "ad6", V_98DX3236_PLUS)), MPP_MODE(28, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "ad7", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "ad7", V_98DX3236_PLUS)), MPP_MODE(29, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "a0", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "a0", V_98DX3236_PLUS)), MPP_MODE(30, MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS), - MPP_VAR_FUNCTION(0x1, "dev", "a1", V_98DX3236_PLUS)), + MPP_VAR_FUNCTION(0x4, "dev", "a1", V_98DX3236_PLUS)), MPP_MODE(31, MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_98DX3236_PLUS), MPP_VAR_FUNCTION(0x1, "slv_smi", "mdc", V_98DX3236_PLUS), |