Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7700145ybi; Wed, 5 Jun 2019 23:33:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkAxYWvoyyIrmmrcVoEEnQPIaLYDjZeIn2VzFkjBq7rvuPsNQV9vJw8vwExZTG0lWK5GUh X-Received: by 2002:a17:902:9a49:: with SMTP id x9mr28266392plv.282.1559802804085; Wed, 05 Jun 2019 23:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559802804; cv=none; d=google.com; s=arc-20160816; b=RgeV12cFEmjwfoGWPjSTnjknt7UfVfN9mmbR/ng2CBBDrOLSCayeVGpo+/dyu8vWnq luGVAbs4JRwnSEZS2bnnh2DxQrNIbuq4+SRlMgeTWLMyVUriBlNsyr6MRbHgFTq0/5GQ /y1z54hGqB75nV81kdGr6KHHIb/xtIz8Nw5//JZSFdLej2017ZcxsfiIYm1hj94OCJdF AVAzM7mD75rCg83AHcQ74groSMFnxybJcKSDCCj0t5rlx/hC9xRXeAPf6NA+iSzTcaqN iHMhEC3Fqq7BbJbomJpAxzNwsNbjANZ8GlOXwF+aJGoDDgSZ5ftGcJTZTaEJW7tHrqeZ BPJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZuYL6lN4ovNLZelnmpwF2tE/28tuu9kcDrW6nhfoTIY=; b=wxe1BzhIhzjHOt3vobCmg3o3hd+QyntigC6MFekqQ9Z3u/iUzoI8WedOA0jjZMPJIB 7WN4C6KtlMBf+PpaBOPQbxo/SiENu0yuQp0Tx+f3v55tzIh/QBRaUfrCFwbHuE9ZsrEO 7HWU5zsMCbJvQ+WcJzbuqw58HLiHCdcltcUhmQ1RgClfLOD9DwIksRSN+fzC82HisTNm nmZJf2MJyj/Gf8y0bkbLIpvl5ATFaYglh5xNewHli1CBO3FEqoHS0scVje3HMPGYSBF0 rnNRcf7vG0EQMrxjFulHyANT62nzuu9go2sx1ItDUzXh4LE2FphUBkzXbv2OTOGcQB41 42sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eAykI5I2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i96si1123327pje.4.2019.06.05.23.33.06; Wed, 05 Jun 2019 23:33:24 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eAykI5I2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726568AbfFFGbt (ORCPT + 99 others); Thu, 6 Jun 2019 02:31:49 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34444 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbfFFGbt (ORCPT ); Thu, 6 Jun 2019 02:31:49 -0400 Received: by mail-pl1-f194.google.com with SMTP id i2so516983plt.1; Wed, 05 Jun 2019 23:31:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZuYL6lN4ovNLZelnmpwF2tE/28tuu9kcDrW6nhfoTIY=; b=eAykI5I2cit6kpAF5jKD+nZ+aVqSXA3rMhKtgNRgXHtVFldg6wBTALZUH+Fj1//dcO qvBs7E48tli/uSpkLJ9vpSavSok1SXWOCmVAw2ihUDXP4fW3ZO8EKJBv09sHO1nTngW1 ZxglCPmZw2XWGuaZiJx/v4jpvzkJqGG/yKzITiB91BHPg7PRB8nUMOgj/US0LkccUlQi 5o1CSPZ4iD4eSpqoNYNYRRijiwD12ZV3luQUBMdYROiAtu7ZSwWWj3yoswcHPQr+mM6z jT0MFhki13yCIcTqLcPywQQJQpCq4FG1t49eCJXz9w7a5TpuFkHlcTaY4gyLGOiZQaER QmXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZuYL6lN4ovNLZelnmpwF2tE/28tuu9kcDrW6nhfoTIY=; b=lTMLrmSixKAf2p2KjMCNp/hvKkvoPf8enedePUI6m2bTnBdD0xUqyaGHSl1efKwU9G sYfWsYKQWF6bvkNWLiwxOWpHpzUrWMkRCopJvfudWmLxLx6q2Mnr67oZNAfO//eGy3QH qb197/7svE+QpJqpjK/vlmJAaIiZbtmj3KYfzowDYq8N2JZ8PFpRrCn5liKA4f1Yb1Sv lI01fO3l5C9f0fnmSjC36UMhDpU0SrGWlamb6HX0YInZs2mm7cjK+E4PPuYZcN6peEUf cGW+amiRirN/vGY2PmD1JB1CYGpzApTOPYyDM31oRMa24QD+rI0OFazy54/sGq/wcypy jh9g== X-Gm-Message-State: APjAAAWnDCJtSdhyjsNDQSu8/SWVg081M3BRvMw2Ouu5Bo/gJXXYt1+6 RBwvqUw5MqNUHiW55+I20rnUtBE5bumm7kB7gno= X-Received: by 2002:a17:902:ab90:: with SMTP id f16mr47819648plr.262.1559802708652; Wed, 05 Jun 2019 23:31:48 -0700 (PDT) MIME-Version: 1.0 References: <1559115828-19146-1-git-send-email-chunfeng.yun@mediatek.com> <1559115828-19146-10-git-send-email-chunfeng.yun@mediatek.com> <1559789630.8487.111.camel@mhfsdcap03> In-Reply-To: <1559789630.8487.111.camel@mhfsdcap03> From: Andy Shevchenko Date: Thu, 6 Jun 2019 09:31:37 +0300 Message-ID: Subject: Re: [PATCH v6 09/10] usb: roles: add USB Type-B GPIO connector driver To: Chunfeng Yun 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 6, 2019 at 5:53 AM Chunfeng Yun wrote: > > 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. Doesn't SIMPLE_DEV_PM_OPS do this for you? -- With Best Regards, Andy Shevchenko