[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190609205245.GC8247@lunn.ch>
Date: Sun, 9 Jun 2019 22:52:45 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: netdev@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-amlogic@...ts.infradead.org, linus.walleij@...aro.org,
bgolaszewski@...libre.com, peppe.cavallaro@...com,
alexandre.torgue@...com, joabreu@...opsys.com,
devicetree@...r.kernel.org, narmstrong@...libre.com,
khilman@...libre.com, linux-kernel@...r.kernel.org,
davem@...emloft.net, linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC next v1 3/5] net: stmmac: use GPIO descriptors in
stmmac_mdio_reset
> + struct gpio_desc *reset_gpio;
> +
> if (data->reset_gpio < 0) {
> struct device_node *np = priv->device->of_node;
>
> - data->reset_gpio = of_get_named_gpio(np,
> - "snps,reset-gpio", 0);
> - if (data->reset_gpio < 0)
> - return 0;
> + reset_gpio = devm_gpiod_get_optional(priv->device,
> + "snps,reset",
> + GPIOD_OUT_LOW);
> + if (IS_ERR(reset_gpio))
> + return PTR_ERR(reset_gpio);
>
> - data->active_low = of_property_read_bool(np,
> - "snps,reset-active-low");
Hi Martin
I think you need to keep this here. You can then use it to decide how
to change gpio_desc to remove flags that should be ignored.
Andrew
Powered by blists - more mailing lists