Chrome platform driver development
 help / color / mirror / Atom feed
From: RD Babiera <rdbabiera@google.com>
To: heikki.krogerus@linux.intel.com, linux@roeck-us.net,
	 gregkh@linuxfoundation.org, pmalani@chromium.org,
	bleung@chromium.org,  chrome-platform@lists.linux.dev,
	linux-kernel@vger.kernel.org,  linux-usb@vger.kernel.org
Cc: badhri@google.com, tzungbi@kernel.org, utkarsh.h.patel@intel.com,
	 andriy.shevchenko@linux.intel.com,
	RD Babiera <rdbabiera@google.com>
Subject: [PATCH v1 09/10] usb: typec: altmodes: add typec_altmode_get_cable_svdm_version
Date: Thu,  7 Dec 2023 09:07:40 +0000	[thread overview]
Message-ID: <20231207090738.15721-21-rdbabiera@google.com> (raw)
In-Reply-To: <20231207090738.15721-12-rdbabiera@google.com>

Add typec_altmode_get_cable_svdm_version to return the cable's negotiated
svdm_version.

Signed-off-by: RD Babiera <rdbabiera@google.com>
---
 include/linux/usb/typec_altmode.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/usb/typec_altmode.h b/include/linux/usb/typec_altmode.h
index 4d527d92457d..1ad581c5a930 100644
--- a/include/linux/usb/typec_altmode.h
+++ b/include/linux/usb/typec_altmode.h
@@ -156,6 +156,16 @@ typec_altmode_get_svdm_version(struct typec_altmode *altmode)
 	return typec_get_negotiated_svdm_version(typec_altmode2port(altmode));
 }
 
+/**
+ * typec_altmode_get__cable_svdm_version - Get negotiated SVDM version for cable plug
+ * @altmode: Handle to the alternate mode
+ */
+static inline int
+typec_altmode_get_cable_svdm_version(struct typec_altmode *altmode)
+{
+	return typec_get_cable_svdm_version(typec_altmode2port(altmode));
+}
+
 /**
  * struct typec_altmode_driver - USB Type-C alternate mode device driver
  * @id_table: Null terminated array of SVIDs
-- 
2.43.0.rc2.451.g8631bc7472-goog


  parent reply	other threads:[~2023-12-07  9:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07  9:07 [PATCH v1 00/10] usb: typec: add SOP' support to the tcpm and alt mode drivers RD Babiera
2023-12-07  9:07 ` [PATCH v1 01/10] usb: typec: bus: provide transmit type for alternate " RD Babiera
2023-12-07 11:34   ` Heikki Krogerus
2023-12-14 22:57     ` RD Babiera
2023-12-07 20:33   ` kernel test robot
2023-12-07 21:06   ` kernel test robot
2023-12-07  9:07 ` [PATCH v1 02/10] usb: typec: tcpci: enable reception of SOP' messages RD Babiera
2023-12-07 23:23   ` kernel test robot
2023-12-07  9:07 ` [PATCH v1 03/10] usb: typec: tcpm: process receive and transmission of sop' messages RD Babiera
2023-12-07  9:07 ` [PATCH v1 04/10] usb: typec: tcpm: add control message support for SOP' RD Babiera
2023-12-07  9:07 ` [PATCH v1 05/10] usb: typec: tcpci: add attempt_vconn_swap_discovery callback RD Babiera
2023-12-07  9:07 ` [PATCH v1 06/10] usb: typec: tcpm: add discover identity support for SOP' RD Babiera
2023-12-07  9:07 ` [PATCH v1 07/10] usb: typec: tcpm: add state machine support for SRC_VDM_IDENTITY_REQUEST RD Babiera
2023-12-07  9:07 ` [PATCH v1 08/10] usb: typec: tcpm: add mode data message support for SOP' RD Babiera
2023-12-07  9:07 ` RD Babiera [this message]
2023-12-07  9:07 ` [PATCH v1 10/10] usb: typec: altmodes/displayport: add SOP' support RD Babiera

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=20231207090738.15721-21-rdbabiera@google.com \
    --to=rdbabiera@google.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=badhri@google.com \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pmalani@chromium.org \
    --cc=tzungbi@kernel.org \
    --cc=utkarsh.h.patel@intel.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