From: Andrew Lunn <andrew@lunn.ch>
To: Mans Rullgard <mans@mansr.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Vladimir Oltean <olteanv@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Juergen Borleis <kernel@pengutronix.de>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: dsa: lan9303: fix reset on probe
Date: Wed, 9 Feb 2022 17:01:24 +0100 [thread overview]
Message-ID: <YgPlVGclJOkvLZ1i@lunn.ch> (raw)
In-Reply-To: <20220209145454.19749-1-mans@mansr.com>
On Wed, Feb 09, 2022 at 02:54:54PM +0000, Mans Rullgard wrote:
> The reset input to the LAN9303 chip is active low, and devicetree
> gpio handles reflect this. Therefore, the gpio should be requested
> with an initial state of high in order for the reset signal to be
> asserted. Other uses of the gpio already use the correct polarity.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---
> drivers/net/dsa/lan9303-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
> index aa1142d6a9f5..2de67708bbd2 100644
> --- a/drivers/net/dsa/lan9303-core.c
> +++ b/drivers/net/dsa/lan9303-core.c
> @@ -1301,7 +1301,7 @@ static int lan9303_probe_reset_gpio(struct lan9303 *chip,
> struct device_node *np)
> {
> chip->reset_gpio = devm_gpiod_get_optional(chip->dev, "reset",
> - GPIOD_OUT_LOW);
> + GPIOD_OUT_HIGH);
> if (IS_ERR(chip->reset_gpio))
> return PTR_ERR(chip->reset_gpio);
lan9303_handle_reset() does a sleep and then releases the reset. I
don't see anywhere in the driver which asserts the reset first. So is
it actually asserted as part of this getting the GPIO? And if so, does
not this change actually break the reset?
Andrew
next prev parent reply other threads:[~2022-02-09 16:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 14:54 [PATCH] net: dsa: lan9303: fix reset on probe Mans Rullgard
2022-02-09 16:01 ` Andrew Lunn [this message]
2022-02-09 16:34 ` Måns Rullgård
2022-02-11 19:28 ` Andrew Lunn
2022-02-10 2:36 ` Jakub Kicinski
2022-02-10 13:48 ` Måns Rullgård
2022-02-11 20:00 ` Florian Fainelli
2022-02-11 22:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YgPlVGclJOkvLZ1i@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mans@mansr.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).