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: <20200818065727.50520-8-vadivel.muruganx.ramuthevar@linux.intel.com>
Date:   Tue, 18 Aug 2020 14:57:25 +0800
From:   "Ramuthevar,Vadivel MuruganX" 
        <vadivel.muruganx.ramuthevar@...ux.intel.com>
To:     linux-kernel@...r.kernel.org, myungjoo.ham@...sung.com,
        cw00.choi@...sung.com
Cc:     andriy.shevchenko@...el.com, thomas.langer@...el.com,
        cheol.yong.kim@...el.com, qi-ming.wu@...el.com, yin1.li@...el.com,
        Ramuthevar Vadivel Murugan 
        <vadivel.muruganx.ramuthevar@...ux.intel.com>
Subject: [PATCH v1 7/9] extcon: extcon-ptn5150: Add USB debug accessory support

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@...ux.intel.com>

Add USB debug accessory support.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@...ux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index 5612dc0ef2af..b985a5e5c9bc 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -33,6 +33,7 @@ enum ptn5150_reg {
 
 #define PTN5150_DFP_ATTACHED			0x1
 #define PTN5150_UFP_ATTACHED			0x2
+#define PTN5150_DEBUG_ATTACHED			0x3
 
 /* Define PTN5150 MASK/SHIFT constant */
 #define PTN5150_REG_DEVICE_ID_VERSION		GENMASK(7, 3)
@@ -61,6 +62,7 @@ struct ptn5150_info {
 static const unsigned int ptn5150_extcon_cable[] = {
 	EXTCON_USB,
 	EXTCON_USB_HOST,
+	EXTCON_JIG,
 	EXTCON_NONE,
 };
 
@@ -86,6 +88,7 @@ static void ptn5150_irq_work(struct work_struct *work)
 	union extcon_property_value vbus_detected;
 	union extcon_property_value flipped;
 	bool host_vbus = false;
+	bool debug = false;
 	bool host = false;
 	bool dev = false;
 
@@ -152,6 +155,9 @@ static void ptn5150_irq_work(struct work_struct *work)
 				extcon_set_state_sync(info->edev,
 						EXTCON_USB_HOST, true);
 				break;
+			case PTN5150_DEBUG_ATTACHED:
+				debug = true;
+				break;
 			default:
 				dev_err(info->dev,
 					"Unknown Port status : %x\n",
@@ -182,6 +188,7 @@ static void ptn5150_irq_work(struct work_struct *work)
 	extcon_set_property(info->edev, host ? EXTCON_USB_HOST : EXTCON_USB,
 			    EXTCON_PROP_USB_VBUS, vbus_detected);
 	extcon_set_state_sync(info->edev, EXTCON_USB_HOST, host);
+	extcon_set_state_sync(info->edev, EXTCON_JIG, debug);
 	extcon_set_state_sync(info->edev, EXTCON_USB, dev);
 
 	mutex_unlock(&info->mutex);
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ