From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Mark Rutland <mark.rutland@arm.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
Li Jun <jun.li@nxp.com>,
Badhri Jagan Sridharan <badhri@google.com>,
Hans de Goede <hdegoede@redhat.com>,
Min Guo <min.guo@mediatek.com>,
devicetree <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
USB <linux-usb@vger.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH 3/5] usb: roles: add API to get usb_role_switch by node
Date: Mon, 11 Mar 2019 13:36:55 +0800 [thread overview]
Message-ID: <1552282615.10179.25.camel@mhfsdcap03> (raw)
In-Reply-To: <CAHp75VeW+NoaGQCnfMcZSz67V68ykRMO=BG9_U6NFODJ5g=1FA@mail.gmail.com>
Hi,
On Fri, 2019-03-08 at 08:52 +0200, Andy Shevchenko wrote:
> On Fri, Mar 8, 2019 at 8:14 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> >
> > Add usb_role_switch_get_by_node() to make easier to get
> > usb_role_switch by node which register it.
> > It's useful when there is not device_connection registered
> > between two drivers and only knows the node which register
> > usb_role_switch.
>
> > +static int __switch_match_node(struct device *dev, const void *node)
> > +{
> > + return dev->parent->of_node == (const struct device_node *)node;
> > +}
>
> Hmm... Shouldn't be slightly better to compare fwnode instead?
>
Using fwnode is indeed suitable for more cases,
I find that there are many functions named xx_by_node using node, but
not fwnode, is there any rules about choice between device_node and
fwnode_handle?
Thanks
next prev parent reply other threads:[~2019-03-11 5:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 6:13 [PATCH 0/5] add USB Type-B connector driver Chunfeng Yun
2019-03-08 6:13 ` [PATCH 1/5] dt-bindings: connector: add optional properties for Type-B Chunfeng Yun
2019-03-08 12:07 ` Hans de Goede
2019-03-11 5:33 ` Chunfeng Yun
2019-03-11 6:06 ` Jun Li
2019-03-11 6:43 ` Chunfeng Yun
2019-03-11 8:06 ` Hans de Goede
2019-03-11 11:00 ` Hans de Goede
2019-03-11 11:04 ` Hans de Goede
2019-03-12 2:18 ` Chunfeng Yun
2019-03-12 3:18 ` Chunfeng Yun
2019-03-12 12:45 ` Hans de Goede
2019-03-13 10:15 ` Chunfeng Yun
2019-03-13 10:18 ` Hans de Goede
2019-03-14 2:05 ` Chunfeng Yun
2019-03-08 6:13 ` [PATCH 2/5] dt-bindings: usb: mtu3: add properties about USB Role Switch Chunfeng Yun
2019-03-08 6:13 ` [PATCH 3/5] usb: roles: add API to get usb_role_switch by node Chunfeng Yun
2019-03-08 6:52 ` Andy Shevchenko
2019-03-11 5:36 ` Chunfeng Yun [this message]
2019-03-08 6:13 ` [PATCH 4/5] usb: roles: add USB Type-B connector driver Chunfeng Yun
2019-03-08 6:13 ` [PATCH 5/5] usb: mtu3: register a USB Role Switch for Dual-Role mode Chunfeng Yun
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=1552282615.10179.25.camel@mhfsdcap03 \
--to=chunfeng.yun@mediatek.com \
--cc=Adam.Thomson.Opensource@diasemi.com \
--cc=andy.shevchenko@gmail.com \
--cc=badhri@google.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=jun.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=min.guo@mediatek.com \
--cc=robh+dt@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).