From: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
To: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Cc: f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org,
sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org,
vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
richard.leitner-WcANXNA0UjBBDgjK7y7TUQ@public.gmane.org
Subject: Re: [net-next] phylib: Add device reset GPIO support causes DSA MT7530 acquires reset-gpios fails
Date: Mon, 18 Dec 2017 09:01:20 +0100 [thread overview]
Message-ID: <20171218080120.GD30815@lunn.ch> (raw)
In-Reply-To: <1513569684.24235.12.camel@mtkswgap22>
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).
Andrew
next prev parent reply other threads:[~2017-12-18 8:01 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 [this message]
2017-12-18 19:21 ` Florian Fainelli
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=20171218080120.GD30815@lunn.ch \
--to=andrew-g2dyl2zd6by@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=richard.leitner-WcANXNA0UjBBDgjK7y7TUQ@public.gmane.org \
--cc=sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org \
--cc=vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.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).