linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Xu Yang <xu.yang_2@nxp.com>
To: Peter Rosin <peda@axentia.se>,
	"heikki.krogerus@linux.intel.com"
	<heikki.krogerus@linux.intel.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux@roeck-us.net" <linux@roeck-us.net>,
	Jun Li <jun.li@nxp.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [EXT] Re: [PATCH 2/4] mux: allow get mux_control from fwnode if of_node is NULL
Date: Tue, 23 Aug 2022 10:10:50 +0000	[thread overview]
Message-ID: <PAXPR04MB8784B67B9191470ED2995B138C709@PAXPR04MB8784.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <6a3838dc-e979-2ef6-b332-92d5007fd41c@axentia.se>

Hi Peter,

> -----Original Message-----
> From: Peter Rosin <peda@axentia.se>
> Sent: Tuesday, August 23, 2022 2:23 PM
> To: Xu Yang <xu.yang_2@nxp.com>; heikki.krogerus@linux.intel.com;
> robh+dt@kernel.org; shawnguo@kernel.org
> Cc: gregkh@linuxfoundation.org; linux@roeck-us.net; Jun Li
> <jun.li@nxp.com>; linux-usb@vger.kernel.org; dl-linux-imx <linux-
> imx@nxp.com>; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org
> Subject: [EXT] Re: [PATCH 2/4] mux: allow get mux_control from fwnode if
> of_node is NULL
> 
> Caution: EXT Email
> 
> Hi!
> 
> 2022-08-22 at 17:35, Xu Yang wrote:
> > Since some devices may link fwnode to dev but doesn't link of_node, so
> > here we could get mux_control from fwnode again.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > ---
> >  drivers/mux/core.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/mux/core.c b/drivers/mux/core.c index
> > 49bedbe6316c..06d4e232e056 100644
> > --- a/drivers/mux/core.c
> > +++ b/drivers/mux/core.c
> > @@ -538,6 +538,9 @@ static struct mux_control *mux_get(struct device
> *dev, const char *mux_name,
> >       int index = 0;
> >       int ret;
> >
> > +     if (!np)
> > +             np = to_of_node(dev_fwnode(dev));
> > +
> >       if (mux_name) {
> >               if (state)
> >                       index = of_property_match_string(np,
> > "mux-state-names",
> 
> This feels like a band aid. Is it not possible to convert the whole thing to the
> fwnode interface?
> 

Agreed. Actually, I'm hesitate to convert to fwnode interface due to not have a
whole picture of all the mux controller users before. But now it should be okay to
do so since all the existing drivers get mux controller based on platform device after
my check. So, I will try to convert the whole thing to the fwnode interface in v2.

Thanks,
Xu Yang

> Cheers,
> Peter
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-08-23 10:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-22 15:35 [PATCH 0/4] typec orientation switch support via mux controller Xu Yang
2022-08-22 15:35 ` [PATCH 1/4] dt-bindings: connector: Add typec orientation switch properties Xu Yang
2022-08-22 15:35 ` [PATCH 2/4] mux: allow get mux_control from fwnode if of_node is NULL Xu Yang
2022-08-23  6:23   ` Peter Rosin
2022-08-23 10:10     ` Xu Yang [this message]
2022-08-22 15:35 ` [PATCH 3/4] usb: typec: mux: add typec orientation switch support via mux controller Xu Yang
2022-08-22 11:22   ` kernel test robot
2022-08-22 15:46   ` kernel test robot
2022-08-23  5:13     ` [EXT] " Xu Yang
2022-08-23  6:13   ` Peter Rosin
2022-08-23  8:46     ` [EXT] " Xu Yang
2022-08-22 15:35 ` [PATCH 4/4] arm64: dts: imx8mp-evk: add typec node Xu Yang

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=PAXPR04MB8784B67B9191470ED2995B138C709@PAXPR04MB8784.eurprd04.prod.outlook.com \
    --to=xu.yang_2@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jun.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=peda@axentia.se \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@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).