aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-abx500.c6
-rw-r--r--drivers/pinctrl/pinctrl-abx500.h2
-rw-r--r--drivers/pinctrl/pinctrl-baytrail.c1
-rw-r--r--drivers/pinctrl/pinctrl-rockchip.c5
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7740.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7372.c2
-rw-r--r--drivers/pinctrl/sh-pfc/sh_pfc.h2
7 files changed, 11 insertions, 9 deletions
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c
index 4780959e11d4..5183e7bb8de3 100644
--- a/drivers/pinctrl/pinctrl-abx500.c
+++ b/drivers/pinctrl/pinctrl-abx500.c
@@ -418,7 +418,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
418 ret = abx500_gpio_set_bits(chip, 418 ret = abx500_gpio_set_bits(chip,
419 AB8500_GPIO_ALTFUN_REG, 419 AB8500_GPIO_ALTFUN_REG,
420 af.alt_bit1, 420 af.alt_bit1,
421 !!(af.alta_val && BIT(0))); 421 !!(af.alta_val & BIT(0)));
422 if (ret < 0) 422 if (ret < 0)
423 goto out; 423 goto out;
424 424
@@ -439,7 +439,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
439 goto out; 439 goto out;
440 440
441 ret = abx500_gpio_set_bits(chip, AB8500_GPIO_ALTFUN_REG, 441 ret = abx500_gpio_set_bits(chip, AB8500_GPIO_ALTFUN_REG,
442 af.alt_bit1, !!(af.altb_val && BIT(0))); 442 af.alt_bit1, !!(af.altb_val & BIT(0)));
443 if (ret < 0) 443 if (ret < 0)
444 goto out; 444 goto out;
445 445
@@ -462,7 +462,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
462 goto out; 462 goto out;
463 463
464 ret = abx500_gpio_set_bits(chip, AB8500_GPIO_ALTFUN_REG, 464 ret = abx500_gpio_set_bits(chip, AB8500_GPIO_ALTFUN_REG,
465 af.alt_bit2, !!(af.altc_val && BIT(1))); 465 af.alt_bit2, !!(af.altc_val & BIT(1)));
466 break; 466 break;
467 467
468 default: 468 default:
diff --git a/drivers/pinctrl/pinctrl-abx500.h b/drivers/pinctrl/pinctrl-abx500.h
index eeca8f973999..82293806e842 100644
--- a/drivers/pinctrl/pinctrl-abx500.h
+++ b/drivers/pinctrl/pinctrl-abx500.h
@@ -1,4 +1,4 @@
1#ifndef PINCTRL_PINCTRL_ABx5O0_H 1#ifndef PINCTRL_PINCTRL_ABx500_H
2#define PINCTRL_PINCTRL_ABx500_H 2#define PINCTRL_PINCTRL_ABx500_H
3 3
4/* Package definitions */ 4/* Package definitions */
diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index 2832576d8b12..114f5ef4b73a 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -512,6 +512,7 @@ static const struct dev_pm_ops byt_gpio_pm_ops = {
512 512
513static const struct acpi_device_id byt_gpio_acpi_match[] = { 513static const struct acpi_device_id byt_gpio_acpi_match[] = {
514 { "INT33B2", 0 }, 514 { "INT33B2", 0 },
515 { "INT33FC", 0 },
515 { } 516 { }
516}; 517};
517MODULE_DEVICE_TABLE(acpi, byt_gpio_acpi_match); 518MODULE_DEVICE_TABLE(acpi, byt_gpio_acpi_match);
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index e939c28cbf1f..46dddc159286 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -504,6 +504,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,
504 data |= (3 << bit); 504 data |= (3 << bit);
505 break; 505 break;
506 default: 506 default:
507 spin_unlock_irqrestore(&bank->slock, flags);
507 dev_err(info->dev, "unsupported pull setting %d\n", 508 dev_err(info->dev, "unsupported pull setting %d\n",
508 pull); 509 pull);
509 return -EINVAL; 510 return -EINVAL;
@@ -1453,8 +1454,8 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
1453 if (ctrl->type == RK3188) { 1454 if (ctrl->type == RK3188) {
1454 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 1455 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
1455 info->reg_pull = devm_ioremap_resource(&pdev->dev, res); 1456 info->reg_pull = devm_ioremap_resource(&pdev->dev, res);
1456 if (IS_ERR(info->reg_base)) 1457 if (IS_ERR(info->reg_pull))
1457 return PTR_ERR(info->reg_base); 1458 return PTR_ERR(info->reg_pull);
1458 } 1459 }
1459 1460
1460 ret = rockchip_gpiolib_register(pdev, info); 1461 ret = rockchip_gpiolib_register(pdev, info);
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
index 009174d07767..bc5eb453a45c 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
@@ -3720,7 +3720,7 @@ static void __iomem *r8a7740_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
3720 const struct r8a7740_portcr_group *group = 3720 const struct r8a7740_portcr_group *group =
3721 &r8a7740_portcr_offsets[i]; 3721 &r8a7740_portcr_offsets[i];
3722 3722
3723 if (i <= group->end_pin) 3723 if (pin <= group->end_pin)
3724 return pfc->window->virt + group->offset + pin; 3724 return pfc->window->virt + group->offset + pin;
3725 } 3725 }
3726 3726
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
index 70b522d34821..cc097b693820 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
@@ -2584,7 +2584,7 @@ static void __iomem *sh7372_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
2584 const struct sh7372_portcr_group *group = 2584 const struct sh7372_portcr_group *group =
2585 &sh7372_portcr_offsets[i]; 2585 &sh7372_portcr_offsets[i];
2586 2586
2587 if (i <= group->end_pin) 2587 if (pin <= group->end_pin)
2588 return pfc->window->virt + group->offset + pin; 2588 return pfc->window->virt + group->offset + pin;
2589 } 2589 }
2590 2590
diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
index 11bd0d970a52..e2142956a8e5 100644
--- a/drivers/pinctrl/sh-pfc/sh_pfc.h
+++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
@@ -254,7 +254,7 @@ struct sh_pfc_soc_info {
254#define PINMUX_GPIO(_pin) \ 254#define PINMUX_GPIO(_pin) \
255 [GPIO_##_pin] = { \ 255 [GPIO_##_pin] = { \
256 .pin = (u16)-1, \ 256 .pin = (u16)-1, \
257 .name = __stringify(name), \ 257 .name = __stringify(GPIO_##_pin), \
258 .enum_id = _pin##_DATA, \ 258 .enum_id = _pin##_DATA, \
259 } 259 }
260 260