aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-aspeed.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-06-11 14:34:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-06-11 14:34:27 -0400
commitf986e31bb4d0dba0a10adc51308bf9de2d0e7e4a (patch)
tree30afcec573b5e0145136bb126834c08096ed8cd2 /drivers/gpio/gpio-aspeed.c
parent9cd9cb0ba3e9e55120d25be3a45ffafd299b1b14 (diff)
parentfc7a90686777e7d2da7a08cf0202c21f3b96febb (diff)
Merge tag 'gpio-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO fixes from Linus Walleij: "A few overdue GPIO patches for the v4.12 kernel. - Fix debounce logic on the Aspeed platform. - Fix the "virtual gpio" things on the Intel Crystal Cove. - Fix the blink counter selection on the MVEBU platform" * tag 'gpio-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: mvebu: fix gpio bank registration when pwm is used gpio: mvebu: fix blink counter register selection MAINTAINERS: remove self from GPIO maintainers gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs gpio: aspeed: Don't attempt to debounce if disabled
Diffstat (limited to 'drivers/gpio/gpio-aspeed.c')
-rw-r--r--drivers/gpio/gpio-aspeed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index ccea609676ee..4ca436e66bdb 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -646,6 +646,9 @@ static int enable_debounce(struct gpio_chip *chip, unsigned int offset,
646 int rc; 646 int rc;
647 int i; 647 int i;
648 648
649 if (!gpio->clk)
650 return -EINVAL;
651
649 rc = usecs_to_cycles(gpio, usecs, &requested_cycles); 652 rc = usecs_to_cycles(gpio, usecs, &requested_cycles);
650 if (rc < 0) { 653 if (rc < 0) {
651 dev_warn(chip->parent, "Failed to convert %luus to cycles at %luHz: %d\n", 654 dev_warn(chip->parent, "Failed to convert %luus to cycles at %luHz: %d\n",