From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>, Sean Wang <sean.wang@mediatek.com>
Cc: sergei.shtylyov@cogentembedded.com,
vivien.didelot@savoirfairelinux.com, davem@davemloft.net,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mediatek@lists.infradead.org, richard.leitner@skidata.com,
geert+renesas@glider.be
Subject: Re: [net-next] phylib: Add device reset GPIO support causes DSA MT7530 acquires reset-gpios fails
Date: Mon, 18 Dec 2017 11:21:29 -0800 [thread overview]
Message-ID: <5cf08589-b4e4-3b4c-cc3e-c6100492155f@gmail.com> (raw)
In-Reply-To: <20171218080120.GD30815@lunn.ch>
On 12/18/2017 12:01 AM, Andrew Lunn wrote:
> Hi Sean
>
>> It probably can't. Because before the GPIO line is manipulated to reset,
>> certain power control should be handled such as power sources from
>> external PMIC to let devices actually enter the proper state.
>>
>> So, I thought the kind of reset should be better controlled by the
>> specific driver, not by generic core.
>
> Yes, the driver should do it in that case.
>
> So we have a few choices:
>
> 1) Change the name of one of the properties
>
> 2) Make the new code look at the compatible string, any only apply a
> reset if it is a PHY.
>
> 3) Make the new code only hold the gpio when it needs it. Same for the
> driver, so that they both can reset the device.
>
> Any other ideas? Any preferences? 2) and 3) are probably simpler to
> do, less backwards compatibility issues. 3) potentially could cause
> issues when a device is reset in the wrong context, because of
> external PMIC etc. So i'm thinking 2).
We could also add some sort of flag that indicates whether the reset
should be managed by the core, or the driver, I would have to double
check there is not a chicken and egg problem and that the driver probe
is early enough this can happen...
--
Florian
next prev parent reply other threads:[~2017-12-18 19:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 6:55 [net-next] phylib: Add device reset GPIO support causes DSA MT7530 acquires reset-gpios fails Sean Wang
2017-12-15 10:10 ` Andrew Lunn
2017-12-18 4:01 ` Sean Wang
2017-12-18 8:01 ` Andrew Lunn
2017-12-18 19:21 ` Florian Fainelli [this message]
2017-12-19 9:06 ` Sergei Shtylyov
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=5cf08589-b4e4-3b4c-cc3e-c6100492155f@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=richard.leitner@skidata.com \
--cc=sean.wang@mediatek.com \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=vivien.didelot@savoirfairelinux.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).