[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <551593EB.9060802@list.ru>
Date: Fri, 27 Mar 2015 20:31:23 +0300
From: Stas Sergeev <stsp@...t.ru>
To: Florian Fainelli <f.fainelli@...il.com>
CC: netdev <netdev@...r.kernel.org>,
Linux kernel <linux-kernel@...r.kernel.org>,
Stas Sergeev <stsp@...rs.sourceforge.net>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH 4/6] of: add API for changing parameters of fixed link
27.03.2015 20:15, Florian Fainelli пишет:
> On 27/03/15 09:39, Stas Sergeev wrote:
>> 27.03.2015 19:21, Florian Fainelli пишет:
>>>> Do you want mvneta to register a similar callback in of_mdio, instead
>>>> of adding an explicit state-updating functions? Something like
>>>> of_phy_fixed_link_set_update_callback()?
>>> You don't need an of_phy_fixed_link_set_update callback, you just need
>>> to provide a fixed_link_update callback in mvneta, that you register,
>> That approach I in fact considered initially, as the simplest one,
>> and even had a patch. But I disliked the fact that then mvneta will
>> exploit the knowledge of the fact that of_phy_register_fixed_link()
>> uses a fixed_phy driver. What if the implementation will later change?
>
> There is no reason why it should change later, that's the entire purpose
> of why we can tell whether it is a fixed PHY or a regular MDIO-managed
> PHY, and drivers rely on that for their operations.
I don't think anything is exported to the outside of of_mdio.
It uses fixed_phy driver completely internally. Assuming that we
can pass the created phy_device to the fixed_phy API directly, look
like a bit of layering violation to me. But it is not that big as to
worry about. :)
I don't think many drivers rely on that - perhaps only dsa_slave.
So I'll add the second one.
> Ok, you could either make of_phy_register_fixed_link() return a
> phy_device,
OK, if you think that's right - I'll do.
I was under an impression that this was intentional to not return
the phy.
> I think your concerns are valid, but I don't think there is going to be
> any problem with the approach I suggested because there is a contract
> that the fixed PHYs and regular PHYs need to
OK, so I'll do that on Monday then.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists