linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S . Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH] net: phy: mdio-moxart: remove unneeded include
Date: Thu, 14 May 2020 10:31:02 -0700	[thread overview]
Message-ID: <283dd0f5-74d1-d0e6-c521-dbad6da5e446@gmail.com> (raw)
In-Reply-To: <CAMRc=Mcp89E7f+PeVfhJ8iXXRZdG9c28_CzCeMpSJj=n5Gwo+w@mail.gmail.com>



On 5/14/2020 10:20 AM, Bartosz Golaszewski wrote:
> czw., 14 maj 2020 o 19:13 Florian Fainelli <f.fainelli@gmail.com> napisał(a):
>>
>>
>>
>> On 5/14/2020 9:59 AM, Bartosz Golaszewski wrote:
>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>>
>>> mdio-moxart doesn't use regulators in the driver code. We can remove
>>> the regulator include.
>>>
>>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>
>> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
>> --
>> Florian
> 
> Hi Andrew, Florian,
> 
> I noticed this by accident when I was looking at the PHY drivers to
> see how they handle regulators supplying PHYs. In the case of the
> MediaTek Pumpkin board I'm working on - the PHY is a Realtek RTL8201F
> and it's supplied by a regulator that's enabled on boot by the
> relevant PMIC driver. I'd like to model it in the device-tree but I'm
> not sure what the correct approach is. Some ethernet drivers have a
> phy-supply property but it looks wrong to me - IMO this should be
> handled at the PHY driver level. Is it fine if I add a probe()
> callback to the realtek driver and retrieve the "phy-supply" there?

Don't you need to do this earlier than probe() though? If the PHY device
is powered down, then surely get_phy_id() won't be able to read its
registers and bind the device to the driver.

This should be dealt the same way that resets are being dealt with,
which is prior to the MDIO bus scan.
-- 
Florian

  reply	other threads:[~2020-05-14 17:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 16:59 [PATCH] net: phy: mdio-moxart: remove unneeded include Bartosz Golaszewski
2020-05-14 17:06 ` Andrew Lunn
2020-05-14 17:13 ` Florian Fainelli
2020-05-14 17:20   ` Bartosz Golaszewski
2020-05-14 17:31     ` Florian Fainelli [this message]
2020-05-15  0:59 ` 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=283dd0f5-74d1-d0e6-c521-dbad6da5e446@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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).