Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350505
b: refs/heads/master
c: 362ba3c
h: refs/heads/master
i:
  350503: 08585f8
v: v3
  • Loading branch information
John Crispin authored and Linus Walleij committed Feb 5, 2013
1 parent fc43e5a commit c67eb83
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d41e35c364391d5c80467f62eecec8c4c65342f4
refs/heads/master: 362ba3cfb45a68d12b6b7d2584eda6df28c77bcb
28 changes: 14 additions & 14 deletions trunk/drivers/pinctrl/pinctrl-xway.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,26 +441,26 @@ static int xway_pinconf_get(struct pinctrl_dev *pctldev,
if (port == PORT3)
reg = GPIO3_OD;
else
reg = GPIO_OD(port);
reg = GPIO_OD(pin);
*config = LTQ_PINCONF_PACK(param,
!!gpio_getbit(info->membase[0], reg, PORT_PIN(port)));
!!gpio_getbit(info->membase[0], reg, PORT_PIN(pin)));
break;

case LTQ_PINCONF_PARAM_PULL:
if (port == PORT3)
reg = GPIO3_PUDEN;
else
reg = GPIO_PUDEN(port);
if (!gpio_getbit(info->membase[0], reg, PORT_PIN(port))) {
reg = GPIO_PUDEN(pin);
if (!gpio_getbit(info->membase[0], reg, PORT_PIN(pin))) {
*config = LTQ_PINCONF_PACK(param, 0);
break;
}

if (port == PORT3)
reg = GPIO3_PUDSEL;
else
reg = GPIO_PUDSEL(port);
if (!gpio_getbit(info->membase[0], reg, PORT_PIN(port)))
reg = GPIO_PUDSEL(pin);
if (!gpio_getbit(info->membase[0], reg, PORT_PIN(pin)))
*config = LTQ_PINCONF_PACK(param, 2);
else
*config = LTQ_PINCONF_PACK(param, 1);
Expand Down Expand Up @@ -488,29 +488,29 @@ static int xway_pinconf_set(struct pinctrl_dev *pctldev,
if (port == PORT3)
reg = GPIO3_OD;
else
reg = GPIO_OD(port);
gpio_setbit(info->membase[0], reg, PORT_PIN(port));
reg = GPIO_OD(pin);
gpio_setbit(info->membase[0], reg, PORT_PIN(pin));
break;

case LTQ_PINCONF_PARAM_PULL:
if (port == PORT3)
reg = GPIO3_PUDEN;
else
reg = GPIO_PUDEN(port);
reg = GPIO_PUDEN(pin);
if (arg == 0) {
gpio_clearbit(info->membase[0], reg, PORT_PIN(port));
gpio_clearbit(info->membase[0], reg, PORT_PIN(pin));
break;
}
gpio_setbit(info->membase[0], reg, PORT_PIN(port));
gpio_setbit(info->membase[0], reg, PORT_PIN(pin));

if (port == PORT3)
reg = GPIO3_PUDSEL;
else
reg = GPIO_PUDSEL(port);
reg = GPIO_PUDSEL(pin);
if (arg == 1)
gpio_clearbit(info->membase[0], reg, PORT_PIN(port));
gpio_clearbit(info->membase[0], reg, PORT_PIN(pin));
else if (arg == 2)
gpio_setbit(info->membase[0], reg, PORT_PIN(port));
gpio_setbit(info->membase[0], reg, PORT_PIN(pin));
else
dev_err(pctldev->dev, "Invalid pull value %d\n", arg);
break;
Expand Down

0 comments on commit c67eb83

Please sign in to comment.