From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Li Jun <jun.li@nxp.com>
Cc: robh+dt@kernel.org, rafael@kernel.org,
gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
hdegoede@redhat.com, lee.jones@linaro.org,
mika.westerberg@linux.intel.com, dmitry.torokhov@gmail.com,
prabhakar.mahadev-lad.rj@bp.renesas.com,
laurent.pinchart+renesas@ideasonboard.com,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-imx@nxp.com, peter.chen@nxp.com
Subject: Re: [PATCH v5 3/4] usb: typec: mux: add "compatible" property for switch match
Date: Tue, 10 Nov 2020 12:51:26 +0200 [thread overview]
Message-ID: <20201110105126.GG1224435@kuha.fi.intel.com> (raw)
In-Reply-To: <1604403610-16577-3-git-send-email-jun.li@nxp.com>
On Tue, Nov 03, 2020 at 07:40:09PM +0800, Li Jun wrote:
> For those need a dedicated typec switch simple solution driver,
> use compatible property for matching.
>
> Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> No changes for v5
> New patch for v4
>
> drivers/usb/typec/mux.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
> index 52ad277..3da17d1 100644
> --- a/drivers/usb/typec/mux.c
> +++ b/drivers/usb/typec/mux.c
> @@ -39,7 +39,8 @@ static void *typec_switch_match(struct device_connection *con, int ep,
> {
> struct device *dev;
>
> - if (con->id && !fwnode_property_present(con->fwnode, con->id))
> + if (con->id && !fwnode_is_compatible(con->fwnode, con->id) &&
> + !fwnode_property_present(con->fwnode, con->id))
> return NULL;
>
> dev = class_find_device(&typec_mux_class, NULL, con->fwnode,
> @@ -61,8 +62,8 @@ struct typec_switch *fwnode_typec_switch_get(struct fwnode_handle *fwnode)
> {
> struct typec_switch *sw;
>
> - sw = fwnode_connection_find_match(fwnode, "orientation-switch", NULL,
> - typec_switch_match);
> + sw = fwnode_connection_find_match(fwnode, "typec-orientation-switch",
> + NULL, typec_switch_match);
> if (!IS_ERR_OR_NULL(sw))
> WARN_ON(!try_module_get(sw->dev.parent->driver->owner));
>
> --
> 2.7.4
thanks,
--
heikki
next prev parent reply other threads:[~2020-11-10 10:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 11:40 [PATCH v5 1/4] dt-bindings: usb: add documentation for typec switch simple driver Li Jun
2020-11-03 11:40 ` [PATCH v5 2/4] device property: Add fwnode_is_compatible() and device_is_compatible() helpers Li Jun
2020-11-03 11:40 ` [PATCH v5 3/4] usb: typec: mux: add "compatible" property for switch match Li Jun
2020-11-10 10:51 ` Heikki Krogerus [this message]
2020-11-03 11:40 ` [PATCH v5 4/4] usb: typec: mux: add typec switch simple driver Li Jun
2020-11-09 8:36 ` Heikki Krogerus
2020-11-24 1:56 ` Jun Li
2020-11-05 22:25 ` [PATCH v5 1/4] dt-bindings: usb: add documentation for " Rob Herring
2020-11-06 11:07 ` Jun Li
2020-11-06 14:24 ` Rob Herring
2020-11-09 12:24 ` Jun Li
2020-11-09 14:37 ` Rob Herring
2020-11-11 15:40 ` Jun Li
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=20201110105126.GG1224435@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=jun.li@nxp.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=lee.jones@linaro.org \
--cc=linux-imx@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=peter.chen@nxp.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=rafael@kernel.org \
--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).