From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FD29C282DE for ; Wed, 5 Jun 2019 08:46:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 09EE720866 for ; Wed, 5 Jun 2019 08:46:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LjE/XPGq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726921AbfFEIqI (ORCPT ); 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-Google-Smtp-Source: APXvYqz9Lj0yCfy+J+2j77hhw6XN27rcOlilHibyQ96byM7FluGi0by+4HbGwYHmbgTq02AfDgdKEa0nzroKSuiuPcs= 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH v6 09/10] usb: roles: add USB Type-B GPIO connector driver Date: Wed, 5 Jun 2019 11:45:55 +0300 Message-ID: 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" Return-path: In-Reply-To: <1559115828-19146-10-git-send-email-chunfeng.yun@mediatek.com> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: devicetree@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19B4CC28CC6 for ; Wed, 5 Jun 2019 08:46:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E817F20717 for ; Wed, 5 Jun 2019 08:46:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lB22ZOaq"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LjE/XPGq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E817F20717 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IPgb9OSajzJLWnqs1IUu53DyTPYKH7gXchcfuo5pjd0=; b=lB22ZOaq1ycKk1 d/k9hNUP7O2EONdprm4p75xpzgy7hoZoibhjneZZ/cX80/Ng0TtzUxbnB9lyKxjPdLm5gvfCUfB2W D8TZdgUz3/Ockd7jx7gtzQz8M+7yVLiM3/YIYSbV41UcNXoNd7kCZ8/0XR4+L09H6sN1LoabDdT6P hriird6Wr9rvjY1Nkp8wJknuUeJqb8FKxfhIdmm8AzWtI6UPl+/WEXlUXF5qJu8V5h2/OI0RREEtp bfyW+qsPOJg4tPlaBCvZ0QIHrqfvvbvpm60zxEsfpy813G5ZADnaH75jkQasIHVUYgoNOTMO90wzI cHLnR5VWq3FIsDmC//xg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYRYh-0007h9-Ew; Wed, 05 Jun 2019 08:46:11 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYRYe-0007gO-By; Wed, 05 Jun 2019 08:46:09 +0000 Received: by mail-pg1-x543.google.com with SMTP id n2so12006100pgp.11; 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=Rr7dOrKZ20av8afITB75NUb2zpVqiput5/EQJmEF59F4wq0isifWRLZmc1Oz0jOuBs mLbYAWd+fS2mYUal2OfPr/MwZJG3wK/qC3tfIa38lSIV0lWJz3JAlSoz0Vnmt/KCKrbF vh6o3uqtfhg2RfxiKVeHP3dmR/lUhqnRJ/1mhJeQlWHYmWl+L5k7tKThh6UaCuej4siu lPrcwACZ9vCF6Cleqk6Lc+gEyQdXOa09qutJ/BoLrqN+V92ebNp89ma+OQ2Z7UGP9SR9 2o2BKlsJ9ZCvBMR1xcxyVOi4qSoLTR4hChsoGhmlPg+axdYQzaeHncQOiv87AWUaALZp MQoA== X-Gm-Message-State: APjAAAX6qmZoKCUfI3e7tMKhRIJBu/dM//yXv95T4aIPXUAqyRXUTjlJ AaLlcwkw6TRJEa29xasz0TsbCM4jwy+DT2F1hQA= X-Google-Smtp-Source: APXvYqz9Lj0yCfy+J+2j77hhw6XN27rcOlilHibyQ96byM7FluGi0by+4HbGwYHmbgTq02AfDgdKEa0nzroKSuiuPcs= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190605_014608_404378_811D5B68 X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree , Heikki Krogerus , Hans de Goede , Greg Kroah-Hartman , Linus Walleij , USB , Yu Chen , Linux Kernel Mailing List , Biju Das , Badhri Jagan Sridharan , Rob Herring , "moderated list:ARM/Mediatek SoC support" , Min Guo , Matthias Brugger , Adam Thomson , linux-arm Mailing List , Li Jun Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel