From patchwork Fri Sep 21 12:26:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609971 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6B54A6CB for ; Fri, 21 Sep 2018 12:28:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 582342D54E for ; Fri, 21 Sep 2018 12:28:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47B372D52D; Fri, 21 Sep 2018 12:28:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9E122D52D for ; Fri, 21 Sep 2018 12:28:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389805AbeIUSRI (ORCPT ); Fri, 21 Sep 2018 14:17:08 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:35622 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388909AbeIUSRI (ORCPT ); Fri, 21 Sep 2018 14:17:08 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 21 Sep 2018 21:28:26 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id B864475223; Fri, 21 Sep 2018 21:28:26 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="291576161" Received: from mail-ty1jpn01lp0184.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.184]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 21 Sep 2018 21:28:26 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cI8KO6KLso16ThrTvxcLIcJoPhlPkXKXXglhqH61eis=; b=EkOVC1YIXNwUOz/TGfBmMFqJVsn3K9H1JbFjt0WKMtqC6O2BACSITfJkUFIUbqvcczvns6Mg0vUgb50bg99OZBPyTEHMuy7gPwqmkeaXd6FScOo6YhPJ8tbHa8TL3ewKqGBoeiLickx4yIZ1415TZsv5F0uRxg53/LHVUUdYMVQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 12:28:23 +0000 From: Yoshihiro Shimoda To: balbi@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 1/5] Revert "usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel" Date: Fri, 21 Sep 2018 21:26:28 +0900 Message-Id: <1537532792-20376-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537532792-20376-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537532792-20376-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSAPR01CA0129.jpnprd01.prod.outlook.com (2603:1096:604:f::21) To OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 648a18cc-5d1e-4c2e-8fae-08d61fbdb939 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2293; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;3:UDksUCR6NixksPbWjvKg+7iz5xR+LClIL7Gk5hTE7jJd/0ddnnrqaTd4JhDioSI3mSdk/kLoOuxfaqA6CxPtjHN6myLxIKnA+oTJ9/+fLomfhRv9SkDEPFysr6yGfyUi2YQZ4RRank7w7EVd5o1GaasuutyclwiAyPQ8wa/8dlahRCnsX8saSATQ4U8SETwLnjLk56YcnmEapQeY8qvDRnn7rYN060fGOIwkQQdVm0ZayTstEuetEpJGbJP1I+Ub;25:XBUyQoDGz/zjDjSXc4ILNcSEABn3+KpM1ttjxMceyA7loRNwANn7qoXxSr3ke3UUtGTFvZLdf0ZnIDlK9MWdP4IurAcVqhoaSxJblwgOc6gp79VS9m+x2jJZmnNoLAHvEX93x5qB18UFwL0b0KMRCBrAo3k7wG17s3GB3C3Ti607XWQHlsdgOqeDCp+fajKtu8RIVg3KSb1fDdTEjy26SvxN8WPEEXM0xk7/dE/KxvMIfbCE6uZ6vwNP2dmTlS5ITfrv5+O/OtU0yUOJ2J+t/qf0Csn/+3Ogv+X1vabIehsiCyXgjdIOzzg9pMcGGwG47LQAQrU/h2ytTOuuduFuNw==;31:r3f1fe3Y5U1Zlzo91stZp8S4LLyrH6P9lC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-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231355)(944501410)(52105095)(93006095)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123560045)(20161123564045)(201708071742011)(7699051);SRVR:OSBPR01MB2293;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2293; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(366004)(376002)(136003)(396003)(39860400002)(199004)(189003)(6506007)(6486002)(107886003)(956004)(2616005)(476003)(42882007)(97736004)(386003)(48376002)(47776003)(25786009)(4326008)(446003)(11346002)(26005)(7736002)(305945005)(14444005)(8936002)(8676002)(78352004)(69590400006)(50226002)(81166006)(81156014)(575784001)(68736007)(51416003)(52116002)(76176011)(36756003)(3846002)(2906002)(6116002)(53936002)(316002)(16586007)(16526019)(486006)(498600001)(66066001)(6512007)(5660300001)(105586002)(106356001)(50466002)(3720700003)(309714004);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2293;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;23:tTAFXrThj0ciMZ6/2iHdfFFspNa7kVeIoO8izbrAaoR1R60gDVxwh9DnUkJJxdgA5UsEbpdszjn4fooByv8vK3aGlvU4gG4ekgwvHl/FpvbJ5RiPKaQ1rcbBS70vcW8rA4OHtIGC9LIt872AuQv4OKk0DO2Fw3hbbvmrab4e5bxuwj48yyROJ9LNlq48HwQT7ckApYy8JZhtHYDntpUXBp+bsBR+3NeOPyGa3iLRCm0fHma1FgEALr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fqntjl8Tn/jice4sFGUbNvIumYn6bpkMIEE1xtva6UqpgrBtMmYJR170xUsQsPN59F89N8xrrCh0wDen+fbb6KBJ7ouL0tY+fnpalvy22vu4T/5TKFel0VdI0iMKFbG9WuVbF3oVkGrSzHZxextr6BnrLbyzEVElqV0o01lCkHupiMDlQfI5hm9u/Y2NldUKajf3/KUYyXDt/UYEevHfumm SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;20:vF7wOjN8p9x0OT8Kqaq5bJvgUQTavI68ERztaovxzsxaAdLPAZnRtc2bSGZTjmfaLuNQt6QvZMxONtrBX23S8Cg/YL8uwIbpkPIslbIotfo8ittJdAVrHezPlk86u31PSu7blvFh6UVKxNrL82++45qk0NHkcrft9RRhSOHynKE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 12:28:23.4730 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 648a18cc-5d1e-4c2e-8fae-08d61fbdb939 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2293 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 8ada211d0383b72878582bd312b984a9eae62b30. R-Car D3 can use OTG mode in fact. So, the commit doesn't need anymore. In other words, like other R-Car Gen3 SoCs, R-Car D3 can change the mode by using the phy-rcar-gen3-usb2 driver. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/common.c | 9 --------- drivers/usb/renesas_usbhs/common.h | 1 - drivers/usb/renesas_usbhs/rcar3.c | 11 ----------- 3 files changed, 21 deletions(-) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index d6c39ba..522cc09 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -677,15 +677,6 @@ static int usbhs_probe(struct platform_device *pdev) break; case USBHS_TYPE_RCAR_GEN3_WITH_PLL: priv->pfunc = usbhs_rcar3_with_pll_ops; - if (!IS_ERR_OR_NULL(priv->edev)) { - priv->nb.notifier_call = priv->pfunc.notifier; - ret = devm_extcon_register_notifier(&pdev->dev, - priv->edev, - EXTCON_USB_HOST, - &priv->nb); - if (ret < 0) - dev_err(&pdev->dev, "no notifier registered\n"); - } break; case USBHS_TYPE_RZA1: priv->pfunc = usbhs_rza1_ops; diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h index 555b3e7..3777af8 100644 --- a/drivers/usb/renesas_usbhs/common.h +++ b/drivers/usb/renesas_usbhs/common.h @@ -257,7 +257,6 @@ struct usbhs_priv { struct platform_device *pdev; struct extcon_dev *edev; - struct notifier_block nb; spinlock_t lock; diff --git a/drivers/usb/renesas_usbhs/rcar3.c b/drivers/usb/renesas_usbhs/rcar3.c index d0ea4ff..b9a8453 100644 --- a/drivers/usb/renesas_usbhs/rcar3.c +++ b/drivers/usb/renesas_usbhs/rcar3.c @@ -112,16 +112,6 @@ static int usbhs_rcar3_get_id(struct platform_device *pdev) return USBHS_GADGET; } -static int usbhs_rcar3_notifier(struct notifier_block *nb, unsigned long event, - void *data) -{ - struct usbhs_priv *priv = container_of(nb, struct usbhs_priv, nb); - - usbhs_rcar3_set_usbsel(priv, !!event); - - return NOTIFY_DONE; -} - const struct renesas_usbhs_platform_callback usbhs_rcar3_ops = { .power_ctrl = usbhs_rcar3_power_ctrl, .get_id = usbhs_rcar3_get_id, @@ -130,5 +120,4 @@ static int usbhs_rcar3_notifier(struct notifier_block *nb, unsigned long event, const struct renesas_usbhs_platform_callback usbhs_rcar3_with_pll_ops = { .power_ctrl = usbhs_rcar3_power_and_pll_ctrl, .get_id = usbhs_rcar3_get_id, - .notifier = usbhs_rcar3_notifier, };