All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: phy: mdio-moxart: remove unneeded include
@ 2020-05-14 16:59 Bartosz Golaszewski
  2020-05-14 17:06 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2020-05-14 16:59 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit, Russell King,
	David S . Miller
  Cc: netdev, linux-kernel, Bartosz Golaszewski

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>
---
 drivers/net/phy/mdio-moxart.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/phy/mdio-moxart.c b/drivers/net/phy/mdio-moxart.c
index 2d16fc4173c1..b72c6d185175 100644
--- a/drivers/net/phy/mdio-moxart.c
+++ b/drivers/net/phy/mdio-moxart.c
@@ -12,7 +12,6 @@
 #include <linux/of_mdio.h>
 #include <linux/phy.h>
 #include <linux/platform_device.h>
-#include <linux/regulator/consumer.h>
 
 #define REG_PHY_CTRL            0
 #define REG_PHY_WRITE_DATA      4
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: phy: mdio-moxart: remove unneeded include
  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-15  0:59 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2020-05-14 17:06 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Florian Fainelli, Heiner Kallweit, Russell King,
	David S . Miller, netdev, linux-kernel, Bartosz Golaszewski

On Thu, May 14, 2020 at 06:59:38PM +0200, 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: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: phy: mdio-moxart: remove unneeded include
  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-15  0:59 ` David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2020-05-14 17:13 UTC (permalink / raw)
  To: Bartosz Golaszewski, Andrew Lunn, Heiner Kallweit, Russell King,
	David S . Miller
  Cc: netdev, linux-kernel, Bartosz Golaszewski



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: phy: mdio-moxart: remove unneeded include
  2020-05-14 17:13 ` Florian Fainelli
@ 2020-05-14 17:20   ` Bartosz Golaszewski
  2020-05-14 17:31     ` Florian Fainelli
  0 siblings, 1 reply; 6+ messages in thread
From: Bartosz Golaszewski @ 2020-05-14 17:20 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	netdev, Linux Kernel Mailing List, Bartosz Golaszewski

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?

Bart

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: phy: mdio-moxart: remove unneeded include
  2020-05-14 17:20   ` Bartosz Golaszewski
@ 2020-05-14 17:31     ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2020-05-14 17:31 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	netdev, Linux Kernel Mailing List, Bartosz Golaszewski



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: phy: mdio-moxart: remove unneeded include
  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-15  0:59 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-05-15  0:59 UTC (permalink / raw)
  To: brgl
  Cc: andrew, f.fainelli, hkallweit1, linux, netdev, linux-kernel,
	bgolaszewski

From: Bartosz Golaszewski <brgl@bgdev.pl>
Date: Thu, 14 May 2020 18:59:38 +0200

> 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>

Applied to net-next.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-15  0:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-05-15  0:59 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.