diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-09-10 13:15:18 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-09-27 14:15:27 +0200 |
commit | dc6ab07d8f158b6c0a86fc412215692b28632c23 (patch) | |
tree | 5a57d89fa0db3cffd2f14cc491619091e391e41f | |
parent | b22973d0ecfcf499179870599b0f6e0712ff0a14 (diff) | |
download | op-kernel-dev-dc6ab07d8f158b6c0a86fc412215692b28632c23.zip op-kernel-dev-dc6ab07d8f158b6c0a86fc412215692b28632c23.tar.gz |
ptp: switch to use gpiolib
This platform supports gpiolib, so remove the custom API use
and replace with calls to gpiolib. Also request the GPIO before
starting to use it.
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: netdev@vger.kernel.org
Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/ptp/ptp_ixp46x.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_ixp46x.c b/drivers/ptp/ptp_ixp46x.c index d49b851..4a08727 100644 --- a/drivers/ptp/ptp_ixp46x.c +++ b/drivers/ptp/ptp_ixp46x.c @@ -259,8 +259,15 @@ static struct ixp_clock ixp_clock; static int setup_interrupt(int gpio) { int irq; + int err; - gpio_line_config(gpio, IXP4XX_GPIO_IN); + err = gpio_request(gpio, "ixp4-ptp"); + if (err) + return err; + + err = gpio_direction_input(gpio); + if (err) + return err; irq = gpio_to_irq(gpio); |