Skip to content

Commit

Permalink
Merge tag 'pinctrl-v3.13-2' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/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
  • Loading branch information
torvalds committed Dec 5, 2013
2 parents 53c6de5 + 71493de commit da1965d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions drivers/pinctrl/pinctrl-abx500.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-abx500.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef PINCTRL_PINCTRL_ABx5O0_H
#ifndef PINCTRL_PINCTRL_ABx500_H
#define PINCTRL_PINCTRL_ABx500_H

/* Package definitions */
Expand Down
5 changes: 3 additions & 2 deletions drivers/pinctrl/pinctrl-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/sh-pfc/pfc-r8a7740.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/sh-pfc/pfc-sh7372.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit da1965d

Please sign in to comment.