From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Chunfeng Yun <chunfeng.yun@mediatek.com>,
Biju Das <biju.das@bp.renesas.com>,
Hans de Goede <hdegoede@redhat.com>,
linux-acpi@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] usb: typec: mux: Use the "compatible" property instead of a boolean property
Date: Wed, 27 Mar 2019 19:43:39 +0300 [thread overview]
Message-ID: <20190327164339.31205-4-heikki.krogerus@linux.intel.com> (raw)
In-Reply-To: <20190327164339.31205-1-heikki.krogerus@linux.intel.com>
Instead of searching for a boolean property, matching
against the "compatible" property.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
drivers/usb/typec/mux.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
index 2ce54f3fc79c..9462b90f1c09 100644
--- a/drivers/usb/typec/mux.c
+++ b/drivers/usb/typec/mux.c
@@ -32,11 +32,7 @@ static void *typec_switch_match(struct device_connection *con, int ep,
return ERR_PTR(-EPROBE_DEFER);
}
- /*
- * With OF graph the mux node must have a boolean device property named
- * "orientation-switch".
- */
- if (con->id && !fwnode_property_present(con->fwnode, con->id))
+ if (con->id && !fwnode_is_compatible(con->fwnode, con->id))
return NULL;
list_for_each_entry(sw, &switch_list, entry)
@@ -148,7 +144,7 @@ static void *typec_mux_match(struct device_connection *con, int ep, void *data)
/* Accessory Mode muxes */
if (!desc) {
- match = fwnode_property_present(con->fwnode, "accessory");
+ match = fwnode_is_compatible(con->fwnode, "accessory");
if (match)
goto find_mux;
return NULL;
--
2.20.1
next prev parent reply other threads:[~2019-03-27 16:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-27 16:43 [PATCH 0/3] device property: fwnode_is_compatible() helper Heikki Krogerus
2019-03-27 16:43 ` [PATCH 1/3] device property: Add fwnode_is_compatible() and device_is_compatible() helpers Heikki Krogerus
2019-04-12 8:13 ` Rafael J. Wysocki
2019-03-27 16:43 ` [PATCH 2/3] usb: roles: Use the "compatible" property instead of a boolean property Heikki Krogerus
2019-03-27 16:43 ` Heikki Krogerus [this message]
2019-07-15 10:17 ` [PATCH 3/3] usb: typec: mux: " Jun Li
2019-03-28 9:06 ` [PATCH 0/3] device property: fwnode_is_compatible() helper Andy Shevchenko
2019-03-28 17:38 ` Heikki Krogerus
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=20190327164339.31205-4-heikki.krogerus@linux.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=biju.das@bp.renesas.com \
--cc=chunfeng.yun@mediatek.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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
Powered by JetHome