Pin control fixes for the v3.13 series:
- Minor bug fixes for the Rockchip, ST-Ericsson abx500, Renesas PFC r8a7740 and sh7372. - Compilation warning fixes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAABAgAGBQJSoDJeAAoJEEEQszewGV1z0/kQAKrANvczzRAzwtPkqQKvcLFn ejnsbTetOaQUysb9U7TgQG3mlK/HYCDlE4JOQD8M451gVwkU2GxAqP3cPfxIxKFG bN5CHSDl8BPBiyXovsEEMj+m22A6NWYY8xJWHAivS3lxxFY3PiGYpmrc1F3rnvZS SvgPHmiUCgqHWk9aMBS/muHUd78aTJEFa1gKyCBVBeGLJZy1lKFHkZwxcEwx968B FC0r7bljA0YO7a08T0V0fYGMXOcUhJhz0HHtMjSGEqTYdcQ9UEnGIqW6LKK6dXSg brO37qlJWwz0npqaPimEQhCILS7mlvHB4gMJ80RQoskYYts4Xa0GOh0SLnaEcZ7k E5jbdurCylucPjsPOTR4wbGjQj8IVfpFvxYXtgueO7AWTRv8BZORqd19rGz3In8O YUhO4lhXqQnuON5AqkQceNscp8nIuoJ6uD4nHzIqTqYBZOEAAuG36zSVQC3gjOUF TW1GiNv9Vx7ISYJf7/jMNCaKS4OhKMth7kwi8EVAzr9dqnTxZNie0rzAiu4xLx2o ACgHdBimbnF5gSbLPySwk/wiNF2VQUGPm8MPOhAUVfuGnZNS2iGoP3VS81VQv7n4 LmRvQyolFk5QCmmshrXPWMPWcAc2DgWoGfF0rqbo6YvGNBYijZ6nmOLB2x9WbW/G IMeFNaz7/WDTZkSD/UCm =/xqi -----END PGP SIGNATURE----- Merge tag 'pinctrl-v3.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Minor bug fixes for the Rockchip, ST-Ericsson abx500, Renesas PFC r8a7740 and sh7372. - Compilation warning fixes. * tag 'pinctrl-v3.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: sh-pfc: sh7372: Fix pin bias setup sh-pfc: r8a7740: Fix pin bias setup pinctrl: abx500: Fix header file include guard pinctrl: rockchip: missing unlock on error in rockchip_set_pull() pinctrl: abx500: fix some more bitwise AND tests pinctrl: rockchip: testing the wrong variable
This commit is contained in:
commit
da1965d353
@ -418,7 +418,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
|
||||
ret = abx500_gpio_set_bits(chip,
|
||||
AB8500_GPIO_ALTFUN_REG,
|
||||
af.alt_bit1,
|
||||
!!(af.alta_val && BIT(0)));
|
||||
!!(af.alta_val & BIT(0)));
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
@ -439,7 +439,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
|
||||
goto out;
|
||||
|
||||
ret = abx500_gpio_set_bits(chip, AB8500_GPIO_ALTFUN_REG,
|
||||
af.alt_bit1, !!(af.altb_val && BIT(0)));
|
||||
af.alt_bit1, !!(af.altb_val & BIT(0)));
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
@ -462,7 +462,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
|
||||
goto out;
|
||||
|
||||
ret = abx500_gpio_set_bits(chip, AB8500_GPIO_ALTFUN_REG,
|
||||
af.alt_bit2, !!(af.altc_val && BIT(1)));
|
||||
af.alt_bit2, !!(af.altc_val & BIT(1)));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifndef PINCTRL_PINCTRL_ABx5O0_H
|
||||
#ifndef PINCTRL_PINCTRL_ABx500_H
|
||||
#define PINCTRL_PINCTRL_ABx500_H
|
||||
|
||||
/* Package definitions */
|
||||
|
@ -504,6 +504,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,
|
||||
data |= (3 << bit);
|
||||
break;
|
||||
default:
|
||||
spin_unlock_irqrestore(&bank->slock, flags);
|
||||
dev_err(info->dev, "unsupported pull setting %d\n",
|
||||
pull);
|
||||
return -EINVAL;
|
||||
@ -1453,8 +1454,8 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
|
||||
if (ctrl->type == RK3188) {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
info->reg_pull = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(info->reg_base))
|
||||
return PTR_ERR(info->reg_base);
|
||||
if (IS_ERR(info->reg_pull))
|
||||
return PTR_ERR(info->reg_pull);
|
||||
}
|
||||
|
||||
ret = rockchip_gpiolib_register(pdev, info);
|
||||
|
@ -3720,7 +3720,7 @@ static void __iomem *r8a7740_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
|
||||
const struct r8a7740_portcr_group *group =
|
||||
&r8a7740_portcr_offsets[i];
|
||||
|
||||
if (i <= group->end_pin)
|
||||
if (pin <= group->end_pin)
|
||||
return pfc->window->virt + group->offset + pin;
|
||||
}
|
||||
|
||||
|
@ -2584,7 +2584,7 @@ static void __iomem *sh7372_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
|
||||
const struct sh7372_portcr_group *group =
|
||||
&sh7372_portcr_offsets[i];
|
||||
|
||||
if (i <= group->end_pin)
|
||||
if (pin <= group->end_pin)
|
||||
return pfc->window->virt + group->offset + pin;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user