Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4017257ybi; Mon, 10 Jun 2019 23:00:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRWPqmONpgRfrD5nqWxnbXeFW5AueOl//HMJ7Ei79CMS3moxi9BYCIjcQEdZ8hlN5RkhkY X-Received: by 2002:a17:90a:216f:: with SMTP id a102mr25496763pje.29.1560232801576; Mon, 10 Jun 2019 23:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560232801; cv=none; d=google.com; s=arc-20160816; b=Q/b8m2RH7DXl+W/obXPnjZW281zlI6Nh/fVM8JqHziVa2i4dR/M2ndHEaqjHMKrvrT C+ic2V4dKfizyEauNRW40iQSGBSfD5NCO8qoJhNvaDg1C0XrJN99CcARk7IVEaY6OCOF Bp/DfKkWgDNjevojswrBiIE0uaEqJHW6S6xxC/atycNUuOfaiK2OySr7epy+zWwDWRD4 lQ27+ADSj6L86HyQ5854UT9E3Smeqe8t/2KcNBMUHqyD2Xfa3BgT2jAs1y3s5vlBChWI IrQ5f839WDbcaFDpqg2QUVF+aOil9+kuX9PFydtwsCDCrgm4f//L++rigHqhe2hLaRbD +POg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=UL53eDU7vmTEHA87tEKAfGbyGcobqSmwVrl50SNsGV4=; b=oki3gFoYj4qiEXzg6z58LH0tjlQJqfBzhJ77VLOeC3o/e9PoCZyys7/X2kF4E6En3a qFYKXR9mdb4KEmpa8z8ujZFB4ObRSKoEWtIMHW6Su9aLcC22Wj2MLxp2dNv6/o1s98Vd CQSvsp27+3jvgS5CUdmJSVcCoDhyNCmT/BO9nXTP+goH5AOxLCGz8xBJNiseWfKMGenU B5KBU8SDhdteOMMpOJEFsSwow3Y69YZEZgbcunDjaWi8RbRwdPJzj0voIx9LiXWaWunb DLI6nZxKobop6Wew6qZbtsMe/LopfnX9qVthuemq3SdtCM3KVvYdjT3qdHiBZIsjKPeG TCOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j88si1466773pje.35.2019.06.10.22.59.46; Mon, 10 Jun 2019 23:00:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403798AbfFKF7l (ORCPT + 99 others); Tue, 11 Jun 2019 01:59:41 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:63325 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2390485AbfFKF7l (ORCPT ); Tue, 11 Jun 2019 01:59:41 -0400 X-UUID: 62c779248366490688a9b32f61fffd8e-20190611 X-UUID: 62c779248366490688a9b32f61fffd8e-20190611 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1177027926; Tue, 11 Jun 2019 13:59:33 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 11 Jun 2019 13:59:32 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 11 Jun 2019 13:59:31 +0800 Message-ID: <1560232771.8487.120.camel@mhfsdcap03> Subject: Re: [PATCH v6 09/10] usb: roles: add USB Type-B GPIO connector driver From: Chunfeng Yun To: Nagarjuna Kristam CC: Rob Herring , Greg Kroah-Hartman , Heikki Krogerus , Mark Rutland , Matthias Brugger , Adam Thomson , Li Jun , "Badhri Jagan Sridharan" , Hans de Goede , Andy Shevchenko , Min Guo , , , , , , Biju Das , Linus Walleij , Yu Chen Date: Tue, 11 Jun 2019 13:59:31 +0800 In-Reply-To: <9640aa29-bc96-ded1-e757-e885bda354a8@nvidia.com> References: <1559115828-19146-1-git-send-email-chunfeng.yun@mediatek.com> <1559115828-19146-10-git-send-email-chunfeng.yun@mediatek.com> <9640aa29-bc96-ded1-e757-e885bda354a8@nvidia.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-06-10 at 16:03 +0530, Nagarjuna Kristam wrote: > Tested-by: Nagarjuna Kristam > Thanks > On 29-05-2019 13:13, Chunfeng Yun wrote: > > Due to the requirement of usb-connector.txt binding, the old way > > using extcon to support USB Dual-Role switch is now deprecated > > when use Type-B connector. > > This patch introduces a driver of Type-B connector which typically > > uses an input GPIO to detect USB ID pin, and try to replace the > > function provided by extcon-usb-gpio driver > > > > Signed-off-by: Chunfeng Yun > > --- > > v6 changes: > > 1. get usb-role-swtich by usb_role_switch_get() > > > > v5 changes: > > 1. put usb_role_switch when error happens suggested by Biju > > 2. don't treat bype-B connector as a virtual device suggested by Rob > > > > v4 changes: > > 1. remove linux/gpio.h suggested by Linus > > 2. put node when error happens > > > > v3 changes: > > 1. treat bype-B connector as a virtual device; > > 2. change file name again > > > > v2 changes: > > 1. file name is changed > > 2. use new compatible > > --- > > drivers/usb/roles/Kconfig | 11 ++ > > drivers/usb/roles/Makefile | 1 + > > drivers/usb/roles/typeb-conn-gpio.c | 286 ++++++++++++++++++++++++++++ > > 3 files changed, 298 insertions(+) > > create mode 100644 drivers/usb/roles/typeb-conn-gpio.c > > > > diff --git a/drivers/usb/roles/Kconfig b/drivers/usb/roles/Kconfig > > index f8b31aa67526..d1156e18a81a 100644 > > --- a/drivers/usb/roles/Kconfig > > +++ b/drivers/usb/roles/Kconfig > >