Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7526091ybi; Wed, 5 Jun 2019 19:55:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLbd7HbOGc1Ew99FoB+00EKYcIZo+8Qf6Bc0MVxSSOknqRB7bXCaZ5WPFnhZQjK6lsvhNY X-Received: by 2002:a63:2c01:: with SMTP id s1mr1075966pgs.261.1559789728578; Wed, 05 Jun 2019 19:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559789728; cv=none; d=google.com; s=arc-20160816; b=0jQPVVBALcYLeNXmxuJL0S7b0dmoipDGb/qZXCHF/eO7E6ky08r99IoTIitHQnp5S3 I/8HZOAeINaDpBAt9XCVgOQDaRX9kOAzU8aTe9vuvNP5c2jDhpvM2sH4GUT9sxprV6pz j5rrDvxcVUWik/sl/oi6bjacK1/Rin6drfS7EkcTPEJdit6hWIvNrXViaStdFQdICumH VKsRmD/O8dlIqG2n2WS+naHmEq/GE91vluWoikkITfv37Aa1QmczCc/Ey0VPDG/Oupi4 40uN5rgcbfEacJZDHwJhtx9g0aL9ngCTe3GtE6cDTeIfPq+AnaIZu04j5Ff5VJb3YknR LNoQ== 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=VUtoFeou+dNdbuUNUyi3fAGreCdlrn2BdltzGTGsDyw=; b=OjSZUP86UloD6oOLqlnKZfiAducqaSnryw+TSpt1QiGIUZNSlfP/Es5srpXPJ+cSds 1zNckMI7+qt+MX17+vdmAnWWh+7p5tZUSCNRibqaaSths0PQuDG6vEcAElP8BFdnzRzv qhUJDu9J2kBNniXSBbVv6bK5hf8sySqASjYW+M6/Q2IBFRMeggHOOM7em919dSEeicGx Fd3KJESelgivzn4kfAE+hfCepqiteW3yyE6u0cMzRTt7uOolT41SDfUOiPGm9bAJZqi+ tiHtOFn507+cc0ntmUM9uHbIbA81glNPLdZIXaOlxRyz+Tome/dV0T/YoL+qWov+leDv t95Q== 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 127si699384pgi.578.2019.06.05.19.55.11; Wed, 05 Jun 2019 19:55:28 -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 S1726671AbfFFCyD (ORCPT + 99 others); Wed, 5 Jun 2019 22:54:03 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:5362 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726568AbfFFCyC (ORCPT ); Wed, 5 Jun 2019 22:54:02 -0400 X-UUID: d5af71d09e6b485c88b28e506c4167fe-20190606 X-UUID: d5af71d09e6b485c88b28e506c4167fe-20190606 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 395981444; Thu, 06 Jun 2019 10:53:53 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 6 Jun 2019 10:53:51 +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; Thu, 6 Jun 2019 10:53:51 +0800 Message-ID: <1559789630.8487.111.camel@mhfsdcap03> Subject: Re: [PATCH v6 09/10] usb: roles: add USB Type-B GPIO connector driver From: Chunfeng Yun To: Andy Shevchenko CC: Rob Herring , Greg Kroah-Hartman , Heikki Krogerus , Mark Rutland , Matthias Brugger , Adam Thomson , Li Jun , "Badhri Jagan Sridharan" , Hans de Goede , Min Guo , devicetree , Linux Kernel Mailing List , USB , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Biju Das , Linus Walleij , "Yu Chen" Date: Thu, 6 Jun 2019 10:53:51 +0800 In-Reply-To: References: <1559115828-19146-1-git-send-email-chunfeng.yun@mediatek.com> <1559115828-19146-10-git-send-email-chunfeng.yun@mediatek.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 Wed, 2019-06-05 at 11:45 +0300, Andy Shevchenko wrote: > On Wed, May 29, 2019 at 10:44 AM 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 > > > +static SIMPLE_DEV_PM_OPS(usb_conn_pm_ops, > > + usb_conn_suspend, usb_conn_resume); > > + > > +#define DEV_PMS_OPS (IS_ENABLED(CONFIG_PM_SLEEP) ? &usb_conn_pm_ops : NULL) > > Why this macro is needed? Want to set .pm as NULL when CONFIG_PM_SLEEP is not enabled. Thanks >