Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6497956ybi; Wed, 5 Jun 2019 01:47:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwknJekAFd0NiM86DNEq+sue2CcKpbsmbAyz1DCeMqlHK4MAnXg+redCvQRLEjjgMc7zleE X-Received: by 2002:aa7:81d1:: with SMTP id c17mr45289834pfn.174.1559724453552; Wed, 05 Jun 2019 01:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559724453; cv=none; d=google.com; s=arc-20160816; b=Wq1ScaZ35TI+gBn0eaad/D6t22jZBRt5tZJt3fQaABq6GayIDtS3TzI4bIqgJXdioX j9bL0v4SwPDxTOsXpH+EZXdEQYM2DBSLNCmiXxkaMHjYocmG0HoKeSVUJseVxplbiHz/ rEV14gsU92mcBIv5uEK49v4BSuGoNXnCwRGavDH991+Av1DX8ZRVGnz6yj6OPh50W6U6 jtU8wg0PByctuewEB0Amox/SfJC6I6PwZv4iq9XJVDTaGB6Nf29myFCAImQz1lSZFOWm iVWsD1CM6uVqyK8s3mR699CHGlDo2AMSSnJPsDiAgtMFrVQRTkLRuGHlYFgHk+Mr0mTd yJFg== 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=Mk5FRq2HIkggKOYlb1t32JxfiDeZB3gniCUsPO6/xZI=; b=mqiyEAjQfZKZwSsgOyHlp2J9Jxm+L8704G0P41TmFigK8kimZkT6pNPWqZDrBzX6Kc CcUBDojMummGraCt6zTd4J0BDEARkS3KzKWULjMDhsaAWcyjjo56czbJRCRICI6CLdWg FthMiDgSHZP0lrhDDCYZBJkG6KeX8lZdOKNGbhExhNNO89UToGntKHJGaVws7ZCd7iwv 6BJRtUKOz358PtDNlyH3f36xQJI1AgpVnszQuRgrBx8hf8vcyn52UhR3BmTIxodD/00y PeFDDbGWRwArMpU1haZZ4HSfitUd1WQZctrdF5pkkUvP3AeToTuUQmF4VcycrQZYIKMk YKlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="LjE/XPGq"; 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 9si26550407pjd.48.2019.06.05.01.47.17; Wed, 05 Jun 2019 01:47:33 -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="LjE/XPGq"; 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 S1726893AbfFEIqI (ORCPT + 99 others); Wed, 5 Jun 2019 04:46:08 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38871 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfFEIqH (ORCPT ); Wed, 5 Jun 2019 04:46:07 -0400 Received: by mail-pg1-f194.google.com with SMTP id v11so12016478pgl.5; Wed, 05 Jun 2019 01:46:07 -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=Mk5FRq2HIkggKOYlb1t32JxfiDeZB3gniCUsPO6/xZI=; b=LjE/XPGqoSghQHXJWid6eAalCbvND2JpM7cZodepxdcu5sydDV4ALW4V1indIn2ve+ ro/+9AV07szWsujI2k5OWOHpYoqn0Lko99MN4KhJfebhVda8dQB/jTSRvKY3rx/W7a7d jjJe+wLhb6zZNFg86ROAAr8Gb5Pr/pbUuEFY/nX+kkcB6gjGdRf15AQ56BiK0lOwD+mr 96rMNUII2i3Vyhn5vvtspJXpfAR0wsn/a06F8E2irwekWWqqLjGSaI9HgCBVyESnIAZR xl5q0G6JW7XP8E5oeUqslpOF2xSz9hHeupjQK+x4VNpBkH0OfPyOzQG03MJ/B/1Ty3LP x0mg== 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=Mk5FRq2HIkggKOYlb1t32JxfiDeZB3gniCUsPO6/xZI=; b=ojuHtQHw4pNLcFV7joSo7rG16hfqBXaK0hVknpy6es4m5o0vHC0qcQLPPDcp9dyKCG AHChY/EnsgcRRI4aMGnUOajyCD1wjrxDiLgUOYfsxx88HY/kg8iofDZM7wqepm6e4GoJ fsxhbEiwo5Vl9TNGZdEP/ylzD8+tM60sEp373tDl6eiY9qcC4BxsEsTKQjdzJwVd9P0n WMBpcCyfOlVr3vYWctBZk/MloFXGxsZnjD93dDCICbbFllhpmJqBdWh+ylwq42xVa4VC 0ql8Gt4vpZ1bk72gW5hkpY5Af8efi1BYvRNfxbUhbo2hJ6R9r455WwzNFXgbfmyaQMfi sP3Q== X-Gm-Message-State: APjAAAXCyKAOV8bfyleAn/mowiX8AyNTuQXn+813vxvgmytC2/817RT6 LwCVvY/uReyCaZ7z7e84Cjr296/SCorQvD5l0sQ= X-Received: by 2002:a17:90b:d8b:: with SMTP id bg11mr10737373pjb.30.1559724367061; Wed, 05 Jun 2019 01:46:07 -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> In-Reply-To: <1559115828-19146-10-git-send-email-chunfeng.yun@mediatek.com> From: Andy Shevchenko Date: Wed, 5 Jun 2019 11:45:55 +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 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? -- With Best Regards, Andy Shevchenko