lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200914164639.1487650-2-angus@akkea.ca>
Date:   Mon, 14 Sep 2020 09:46:36 -0700
From:   Angus Ainslie <angus@...ea.ca>
To:     kernel@...i.sm
Cc:     MyungJoo Ham <myungjoo.ham@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
        bryan.odonoghue@...aro.org, Angus Ainslie <angus@...ea.ca>
Subject: [PATCH 1/4] extcon: Add USB VBUS properties

USB type C, USB BC1.2 and USB power delivery allow different voltages
and currents for VBUS so we need these additional properties.

Also USB type C allows separate device and power roles so add a VBUS SRC
property.

Signed-off-by: Angus Ainslie <angus@...ea.ca>
---
 include/linux/extcon.h | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index fd183fb9c20f..c4d48f4f74c4 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -117,14 +117,29 @@
  * @type:       integer (intval)
  * @value:      0 (USB/USB2) or 1 (USB3)
  * @default:    0 (USB/USB2)
+ * - EXTCON_PROP_USB_VBUS_SRC
+ * @type:	integer (intval)
+ * @value:	0 (sink) or 1 (source)
+ * @default:	0 (sink)
+ * - EXTCON_PROP_USB_VBUS_VOLTAGE
+ * @type:	integer (intval)
+ * @value:	negotiated vbus voltage in mV
+ * @default:	5000
+ * - EXTCON_PROP_USB_VBUS_CURRENT
+ * @type:	integer (intval)
+ * @value:	negotiated vbus current in mA
+ * @default:	100
  *
  */
 #define EXTCON_PROP_USB_VBUS		0
 #define EXTCON_PROP_USB_TYPEC_POLARITY	1
 #define EXTCON_PROP_USB_SS		2
+#define EXTCON_PROP_USB_VBUS_SRC	3
+#define EXTCON_PROP_USB_VBUS_VOLTAGE	4
+#define EXTCON_PROP_USB_VBUS_CURRENT	5
 
 #define EXTCON_PROP_USB_MIN		0
-#define EXTCON_PROP_USB_MAX		2
+#define EXTCON_PROP_USB_MAX		5
 #define EXTCON_PROP_USB_CNT	(EXTCON_PROP_USB_MAX - EXTCON_PROP_USB_MIN + 1)
 
 /* Properties of EXTCON_TYPE_CHG. */
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ