From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chunfeng Yun Subject: Re: [PATCH v6 09/10] usb: roles: add USB Type-B GPIO connector driver Date: Thu, 6 Jun 2019 10:53:51 +0800 Message-ID: <1559789630.8487.111.camel@mhfsdcap03> References: <1559115828-19146-1-git-send-email-chunfeng.yun@mediatek.com> <1559115828-19146-10-git-send-email-chunfeng.yun@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: devicetree@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 >