From patchwork Wed Apr 24 17:20:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 10915335 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 D41EB13B5 for ; Wed, 24 Apr 2019 17:21:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B98CE28B4F for ; Wed, 24 Apr 2019 17:21:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADDD428B54; Wed, 24 Apr 2019 17:21:10 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4BB5328B50 for ; Wed, 24 Apr 2019 17:21:10 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 4EDFD14E7; Wed, 24 Apr 2019 17:20:57 +0000 (UTC) X-Original-To: cip-dev@lists.cip-project.org Delivered-To: cip-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 0D85C14E5 for ; Wed, 24 Apr 2019 17:20:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 74ABC855 for ; Wed, 24 Apr 2019 17:20:55 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,390,1549897200"; d="scan'208";a="14017241" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 25 Apr 2019 02:20:55 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id F20D640BFA9B; Thu, 25 Apr 2019 02:20:53 +0900 (JST) From: Fabrizio Castro To: cip-dev@lists.cip-project.org Date: Wed, 24 Apr 2019 18:20:30 +0100 Message-Id: <1556126440-27978-8-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556126440-27978-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1556126440-27978-1-git-send-email-fabrizio.castro@bp.renesas.com> Cc: Biju Das Subject: [cip-dev] [PATCH 4.19.y 07/17] Revert "usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel" X-BeenThere: cip-dev@lists.cip-project.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: cip-dev-bounces@lists.cip-project.org Errors-To: cip-dev-bounces@lists.cip-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yoshihiro Shimoda commit 91b20c5a5be0088f9534483276f86230c3a5872f upstream. 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 Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman Signed-off-by: Fabrizio Castro --- 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 33088b9..4b5621d 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -681,15 +681,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 555b3e78..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 @@ const struct renesas_usbhs_platform_callback usbhs_rcar3_ops = { 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, };