netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Andrea Merello <andrea.merello@gmail.com>
Cc: f.fainelli@gmail.com, hkallweit1@gmail.com, davem@davemloft.net,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net: phy: allow for reset line to be tied to a sleepy GPIO controller
Date: Fri, 4 Oct 2019 16:04:29 +0200	[thread overview]
Message-ID: <20191004140429.GB24154@lunn.ch> (raw)
In-Reply-To: <20191004135332.5746-1-andrea.merello@gmail.com>

On Fri, Oct 04, 2019 at 03:53:32PM +0200, Andrea Merello wrote:
> mdio_device_reset() makes use of the atomic-pretending API flavor for
> handling the PHY reset GPIO line.
> 
> I found no hint that mdio_device_reset() is called from atomic context
> and indeed it uses usleep_range() since long time, so I would assume that
> it is OK to sleep there.
> 
> This patch switch to gpiod_set_value_cansleep() in mdio_device_reset().
> This is relevant if e.g. the PHY reset line is tied to a I2C GPIO
> controller.
> 
> This has been tested on a ZynqMP board running an upstream 4.19 kernel and
> then hand-ported on current kernel tree.
> 
> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>

Yes, all the other bits of code using GPIOs are using the _cansleep
versions.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2019-10-04 14:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 13:53 [PATCH] net: phy: allow for reset line to be tied to a sleepy GPIO controller Andrea Merello
2019-10-04 14:04 ` Andrew Lunn [this message]
2019-10-05  1:08 ` David Miller

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=20191004140429.GB24154@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrea.merello@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).