From: Hans de Goede <hdegoede@redhat.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Guenter Roeck <linux@roeck-us.net>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Rob Herring <robh+dt@kernel.org>,
Zhen Lei <thunder.leizhen@huawei.com>,
linux-usb@vger.kernel.org
Subject: [PATCH v2 2/3] usb: typec: tcpm: Add support for altmodes
Date: Fri, 9 Apr 2021 15:40:32 +0200 [thread overview]
Message-ID: <20210409134033.105834-3-hdegoede@redhat.com> (raw)
In-Reply-To: <20210409134033.105834-1-hdegoede@redhat.com>
Add support for altmodes described in the usb-connector fwnode
associated with the Type-C controller by calling the new
typec_port_register_altmodes_from_fwnode() helper for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/usb/typec/tcpm/tcpm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index ce7af398c7c1..70a5d6ca0053 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -6072,6 +6072,10 @@ struct tcpm_port *tcpm_register_port(struct device *dev, struct tcpc_dev *tcpc)
goto out_role_sw_put;
}
+ typec_port_register_altmodes(port->typec_port,
+ &tcpm_altmode_ops, port,
+ port->port_altmode, ALTMODE_DISCOVERY_MAX);
+
mutex_lock(&port->lock);
tcpm_init(port);
mutex_unlock(&port->lock);
--
2.30.2
next prev parent reply other threads:[~2021-04-09 13:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 13:40 [PATCH v3 0/3] usb: typec: Add typec_port_register_altmodes() Hans de Goede
2021-04-09 13:40 ` [PATCH v2 1/3] " Hans de Goede
2021-04-10 2:12 ` Guenter Roeck
2021-04-09 13:40 ` Hans de Goede [this message]
2021-04-09 13:45 ` [PATCH v2 2/3] usb: typec: tcpm: Add support for altmodes Heikki Krogerus
2021-04-10 2:12 ` Guenter Roeck
2021-04-09 13:40 ` [PATCH v2 3/3] platform/x86/intel_cht_int33fe: Add displayport altmode fwnode to the connector fwnode Hans de Goede
2021-04-09 13:46 ` Heikki Krogerus
2021-04-10 2:13 ` Guenter Roeck
-- strict thread matches above, loose matches on Subject: below --
2021-04-08 20:31 [PATCH v2 0/3] usb: typec: Add typec_port_register_altmodes_from_fwnode() Hans de Goede
2021-04-08 20:31 ` [PATCH v2 2/3] usb: typec: tcpm: Add support for altmodes Hans de Goede
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=20210409134033.105834-3-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh+dt@kernel.org \
--cc=thunder.leizhen@huawei.com \
/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).