Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc6ab07d authored by Linus Walleij's avatar Linus Walleij
Browse files

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: default avatarRichard Cochran <richardcochran@gmail.com>
Acked-by: default avatarKrzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b22973d0
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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);