summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/bus.c
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2019-12-30 17:25:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-09 12:48:19 +0300
commit8face9aa57c8335b2d698a70bcfaaaa46dd36b93 (patch)
treedc9b717609e93240e54b297e9dc2d8b4e2477e90 /drivers/usb/typec/bus.c
parentcf2f58fb88d9494ceff4516ad4bddc54bf56f426 (diff)
downloadlinux-8face9aa57c8335b2d698a70bcfaaaa46dd36b93.tar.xz
usb: typec: Add parameter for the VDO to typec_altmode_enter()
Enter Mode Command may contain one VDO. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20191230142611.24921-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/bus.c')
-rw-r--r--drivers/usb/typec/bus.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/typec/bus.c b/drivers/usb/typec/bus.c
index 8f6d8933d72e..e78c8a68c745 100644
--- a/drivers/usb/typec/bus.c
+++ b/drivers/usb/typec/bus.c
@@ -84,12 +84,14 @@ EXPORT_SYMBOL_GPL(typec_altmode_notify);
/**
* typec_altmode_enter - Enter Mode
* @adev: The alternate mode
+ * @vdo: VDO for the Enter Mode command
*
* The alternate mode drivers use this function to enter mode. The port drivers
* use this to inform the alternate mode drivers that the partner has initiated
- * Enter Mode command.
+ * Enter Mode command. If the alternate mode does not require VDO, @vdo must be
+ * NULL.
*/
-int typec_altmode_enter(struct typec_altmode *adev)
+int typec_altmode_enter(struct typec_altmode *adev, u32 *vdo)
{
struct altmode *partner = to_altmode(adev)->partner;
struct typec_altmode *pdev = &partner->adev;
@@ -110,7 +112,7 @@ int typec_altmode_enter(struct typec_altmode *adev)
return ret;
/* Enter Mode */
- return pdev->ops->enter(pdev);
+ return pdev->ops->enter(pdev, vdo);
}
EXPORT_SYMBOL_GPL(typec_altmode_enter);