Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2885853pxa; Tue, 18 Aug 2020 00:02:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1QOFtP22Dck77zk0akh2xts0riU0SQdpMGPrK5gAc4Yq38pCOGKrteB9DevWeY2kz935/ X-Received: by 2002:a50:d80f:: with SMTP id o15mr18787147edj.156.1597734164515; Tue, 18 Aug 2020 00:02:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597734164; cv=none; d=google.com; s=arc-20160816; b=nxAWbE9QoW7hdiBnuywdC5z3BsW94U3GOlTNEHERoxEEH5T7wihD96Sf5ElZ2v48Zl eM2sqhqTxcBjhqc43oFwrveCJK/3yNbq1caADylyx0DGLAzLgFoSuZh/4zdczJGNYYaf ZXh0Z1S2MMB9/ynVvxUX5F+/1TE+O5FPpHqAZB3I8K10xsyQqm6W8ru9FNGOzAw8j3wH 9Z8uUJGRulhs8vHMYwoybOP+ZWiqhvrWfxL5wLFE/cVMoNvmxWaxLkSWX65OGhkZV56m Lw1v6bt7HvkuT7xEEaYaZp8HsNV2EjSRN14v8CeSGH4y9ujGlW8XPa1yJ14GJ+ZhgHTx G3cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr; bh=ieFJyWNRUjFtA01uQMRDT2QIwmaBeVKxEWP4lqspegU=; b=ZXHl875jbOMdGsSA0o2ciniJ0FrNzFFwUlhBS6lxrhNm9rGrpQm4/+VyeEk2FdVtHB gEpRDSigp6Roz7pvBC60f8WIMYFEH9wG3yVL0SDc92gACLOMrzShdWxN8x3mmsUU5Sx4 lpcv33zjnzJ/VN78DoXXK1+ExNEIL57hMS3s7bQVcIRzCn5IKU1z47V1PG12JH2BqCdd an1ygO0KFejhUQ7L77pWk+CZGD6RHPZ0WMawiSvVu+ouMA49Bzeon0k4e43mHavsWG0y RnmU3RTrG4sH+HuloF3dwSHej1iQJv/CKxZhv6oo4An425HGFkKtn0gVZKPSgEfpsGAe 8Rlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d24si12971096edz.145.2020.08.18.00.02.21; Tue, 18 Aug 2020 00:02:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbgHRG57 (ORCPT + 99 others); Tue, 18 Aug 2020 02:57:59 -0400 Received: from mga09.intel.com ([134.134.136.24]:53666 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726701AbgHRG5z (ORCPT ); Tue, 18 Aug 2020 02:57:55 -0400 IronPort-SDR: AUrTLa/shXwqodwW1ZAYRCI54+TLLdyQ4fi8P8IZLxgyD9irj+GPwGET6Q6DxkaoKh/oq7zulk 2W18WkP8AHXg== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="155935737" X-IronPort-AV: E=Sophos;i="5.76,326,1592895600"; d="scan'208";a="155935737" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2020 23:57:55 -0700 IronPort-SDR: wPWaymybons2R8PQSUQRvl02uzaSftMLHvlR1XmWPlo/UWRuplQxz58ueE7E213WOVp6XXi/Ph 0mxQCbAQWH7A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,326,1592895600"; d="scan'208";a="441124421" Received: from sgsxdev004.isng.intel.com (HELO localhost) ([10.226.88.13]) by orsmga004.jf.intel.com with ESMTP; 17 Aug 2020 23:57:52 -0700 From: "Ramuthevar,Vadivel MuruganX" To: linux-kernel@vger.kernel.org, myungjoo.ham@samsung.com, cw00.choi@samsung.com Cc: andriy.shevchenko@intel.com, thomas.langer@intel.com, cheol.yong.kim@intel.com, qi-ming.wu@intel.com, yin1.li@intel.com, Ramuthevar Vadivel Murugan Subject: [PATCH v1 7/9] extcon: extcon-ptn5150: Add USB debug accessory support Date: Tue, 18 Aug 2020 14:57:25 +0800 Message-Id: <20200818065727.50520-8-vadivel.muruganx.ramuthevar@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200818065727.50520-1-vadivel.muruganx.ramuthevar@linux.intel.com> References: <20200818065727.50520-1-vadivel.muruganx.ramuthevar@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ramuthevar Vadivel Murugan Add USB debug accessory support. Signed-off-by: Ramuthevar Vadivel Murugan --- 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