From patchwork Tue Sep 18 08:16:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 146884 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4736177ljw; Tue, 18 Sep 2018 01:17:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaLd/DpBuOizjiAQe/Wvz0Md5nJsr+qrdnep32I15BKsiydB+4MxvRC+6OPiIq9y5+UZ9ax X-Received: by 2002:a63:eb0e:: with SMTP id t14-v6mr26827053pgh.198.1537258651792; Tue, 18 Sep 2018 01:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537258651; cv=none; d=google.com; s=arc-20160816; b=Cf/luvWc3qEWn6qEBCv+7uKA5SH/9kg44qgXwhtStgdnTzyx24oMbf4oeDdtJjGDQx We8pzp7qABT2jjKjxX6EN9qdSmj+1Em2AILYnIE7ZRiK/dfOJVYf8Mo8COejwXpCZ9S+ hyZqSWebfnH0zRj3V9habDje8c3xdI/Mt+huEvlUusOjBsW11u60Fuz+niovpzeCm/fV Z21DjuuYSNf2jVvHPYI9FlkHMrACC7Rhid8Ivw9X1SpRvSEK5cASFSKh+l7wzKA94bfx puTH+hZLEVT5u2KtZNSNv7BybMJxMk/hC4V6wQgTwaslplxA8V7JT76JjpZPbG2yNSbM qxPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=5nMv7VSQCMHKkca3mIzGPSPq7/SYPfQI4vPGqtpZxu4=; b=Lg06qGxy9UYGnR4uQRRHrkosfT2jtHZdvmvcwz77gWoj3o7W0OJR/4XEnPmZCpBigV 5MpwyLm+AAAunNKv+yUIV/PnnqoPa/dhhPKGN0gcF8AHHVNAfiwztllY7Z8QZkKDttLl 1VL6ICI1jpYQDSVIo5hmehgnhNdCzLkueVU9xDkODRuITpAUMzGoJfoOVtJXiyzBz2R2 seZ5chLmh61UEBhWvFcOFoQ76jjj5pQsCbfSJQtSLnNKfBqspTfERzaFxG0h2P5jljsQ Gq00zJ+TMMqtQNFklkIoj8ZYj8tVHVc3cxJWO3r95/SmdzMNa1ZLZ2Y8NB2atymnGfy9 kEBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=viDhE7tV; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15-v6si18364541pff.117.2018.09.18.01.17.31; Tue, 18 Sep 2018 01:17:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-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=@samsung.com header.s=mail20170921 header.b=viDhE7tV; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729223AbeIRNs7 (ORCPT + 5 others); Tue, 18 Sep 2018 09:48:59 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:36643 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727846AbeIRNsk (ORCPT ); Tue, 18 Sep 2018 09:48:40 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180918081708euoutp0291a261658ce6101d3e6b805d170bc38d~VcJPubH0v2970329703euoutp02z; Tue, 18 Sep 2018 08:17:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180918081708euoutp0291a261658ce6101d3e6b805d170bc38d~VcJPubH0v2970329703euoutp02z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1537258628; bh=5nMv7VSQCMHKkca3mIzGPSPq7/SYPfQI4vPGqtpZxu4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=viDhE7tVCwl9vd6X1oBr2QYQTFTFtMoyFq2GqRZ2iXfY6hYLiP06q24ibjlIxxkEV 4MWt08Jn/uOktwmddM1IY2yGU5jSeAu7KffScEkbw7hVaG2JeVhVe14be+1sqFGFPs Hz8VN6YqpHddg6XD7vmIgoedSWNFAA4W3iYmR5fk= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180918081707eucas1p26bc810842f9a959f5e8d4b9a7f673c8e~VcJPKytPG1987119871eucas1p20; Tue, 18 Sep 2018 08:17:07 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 63.4D.04294.384B0AB5; Tue, 18 Sep 2018 09:17:07 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180918081706eucas1p10c03f027b993178ede5cff6d81bedfed~VcJOVuXzD1590615906eucas1p1_; Tue, 18 Sep 2018 08:17:06 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-62-5ba0b483a83f Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F7.6B.04128.284B0AB5; Tue, 18 Sep 2018 09:17:06 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PF800C5KSCD4H70@eusync4.samsung.com>; Tue, 18 Sep 2018 09:17:06 +0100 (BST) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Greg Kroah-Hartman , Felipe Balbi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH 1/4] usb: dwc3: exynos: Remove dead code Date: Tue, 18 Sep 2018 10:16:50 +0200 Message-id: <20180918081653.314-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20180918081653.314-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRmVeSWpSXmKPExsWy7djP87rNWxZEGxz4I2exccZ6VotjbU/Y LZoXr2ezOH9+A7vFjPP7mCwWLWtltlh75C67A7vHplWdbB77565h9+jbsorR4/MmuQCWKC6b lNSczLLUIn27BK6MU/NfMBVcl63oP+rXwPhKoouRk0NCwERi8oWFrF2MXBxCAisYJQ7sP80I 4XxmlDj49iEzTNWJGTdYIBLLGCV+LNgO5TQwSVw88IkJpIpNwFCi620XG4gtIuAgsWTpHTaQ ImaBJ4wSuzd/YQRJCAtYSLxp6AFKcHCwCKhKXPkdDRLmFbCWONq4lBVim7zE6g0HwDZzCthI 7Nz4CGyZhMBfVomXV1ayQxS5SBxvPMcEYQtLvDq+BSouI3F5cjdUQzOjRPuMWewQTg+jxNY5 O9ggqqwlDh+/CLaOWYBPYtK26cwgF0kI8Ep0tAlBmB4Ss34XQHzZzyjRuGYV6wRGyQWMDKsY xVNLi3PTU4uN8lLL9YoTc4tL89L1kvNzNzEC4+70v+NfdjDu+pN0iFGAg1GJh3fBgvnRQqyJ ZcWVuYcYJTiYlUR4OXMWRAvxpiRWVqUW5ccXleakFh9ilOZgURLn5dNKixYSSE8sSc1OTS1I LYLJMnFwSjUwGp12XHgurrDWbG2sRvOqAvf1TN9vL2PXil1yR/H2DS3exFkru8I9TjTp5/0u eCXxh09wbZznXrGA+5/W7d29xvzMas8KhcD1b+12rs9W8H/cdHTJlqURwYYpLe9cndpVOQ46 xFVEuikbcSUE6c6+WrNAzOWX2Wljjrehm5LiZ3MtWnFhOu9VJZbijERDLeai4kQAAnHByrcC AAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkluLIzCtJLcpLzFFi42I5/e/4Nd2mLQuiDTassrbYOGM9q8Wxtifs Fs2L17NZnD+/gd1ixvl9TBaLlrUyW6w9cpfdgd1j06pONo/9c9ewe/RtWcXo8XmTXABLFJdN SmpOZllqkb5dAlfGqfkvmAquy1b0H/VrYHwl0cXIySEhYCJxYsYNli5GLg4hgSWMEu1b2pkg nCYmif1PZjGCVLEJGEp0ve1iA7FFBBwkliy9wwZSxCzwhFHixpX5YAlhAQuJNw09QDYHB4uA qsSV39EgYV4Ba4mjjUtZIbbJS6zecIAZxOYUsJHYufERC4gtBFSzrO0y6wRGngWMDKsYRVJL i3PTc4uN9IoTc4tL89L1kvNzNzECA2bbsZ9bdjB2vQs+xCjAwajEw/tj0fxoIdbEsuLK3EOM EhzMSiK8nDkLooV4UxIrq1KL8uOLSnNSiw8xSnOwKInznjeojBISSE8sSc1OTS1ILYLJMnFw SjUwWiisUbFu9a5ep3zU9rag/1Ne4wXsb+Ne2Igk62g1zpnOJiw/oXf+sQZl4ePHZBzzCs+f 2+K7f6nlNh7fOz2Sah7zTazezWs66e/Iaxvw7/BTzuAJkYe+2HMWSnlJSvN6B73g61m/ZcZV s6TllRe7/dgmRrVa3tzAsVq865T19fez1WQvT9qnxFKckWioxVxUnAgArsB1CBQCAAA= X-CMS-MailID: 20180918081706eucas1p10c03f027b993178ede5cff6d81bedfed X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180918081706eucas1p10c03f027b993178ede5cff6d81bedfed References: <20180918081653.314-1-m.szyprowski@samsung.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org All supported Exynos variants provide respective generic PHY framework based drivers for controlling USB PHYs, so there is no point creating fake USB PHYs based on platform devices. While removing useless code, remove calls to runtime PM, which have no effect. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc3/dwc3-exynos.c | 75 ---------------------------------- 1 file changed, 75 deletions(-) -- 2.17.1 diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index a94fb1ba8f2c..0a946c66c3bb 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c @@ -13,15 +13,11 @@ #include #include #include -#include -#include #include #include #include struct dwc3_exynos { - struct platform_device *usb2_phy; - struct platform_device *usb3_phy; struct device *dev; struct clk *clk; @@ -32,61 +28,6 @@ struct dwc3_exynos { struct regulator *vdd10; }; -static int dwc3_exynos_register_phys(struct dwc3_exynos *exynos) -{ - struct usb_phy_generic_platform_data pdata; - struct platform_device *pdev; - int ret; - - memset(&pdata, 0x00, sizeof(pdata)); - - pdev = platform_device_alloc("usb_phy_generic", PLATFORM_DEVID_AUTO); - if (!pdev) - return -ENOMEM; - - exynos->usb2_phy = pdev; - pdata.type = USB_PHY_TYPE_USB2; - pdata.gpio_reset = -1; - - ret = platform_device_add_data(exynos->usb2_phy, &pdata, sizeof(pdata)); - if (ret) - goto err1; - - pdev = platform_device_alloc("usb_phy_generic", PLATFORM_DEVID_AUTO); - if (!pdev) { - ret = -ENOMEM; - goto err1; - } - - exynos->usb3_phy = pdev; - pdata.type = USB_PHY_TYPE_USB3; - - ret = platform_device_add_data(exynos->usb3_phy, &pdata, sizeof(pdata)); - if (ret) - goto err2; - - ret = platform_device_add(exynos->usb2_phy); - if (ret) - goto err2; - - ret = platform_device_add(exynos->usb3_phy); - if (ret) - goto err3; - - return 0; - -err3: - platform_device_del(exynos->usb2_phy); - -err2: - platform_device_put(exynos->usb3_phy); - -err1: - platform_device_put(exynos->usb2_phy); - - return ret; -} - static int dwc3_exynos_remove_child(struct device *dev, void *unused) { struct platform_device *pdev = to_platform_device(dev); @@ -164,12 +105,6 @@ static int dwc3_exynos_probe(struct platform_device *pdev) goto vdd10_err; } - ret = dwc3_exynos_register_phys(exynos); - if (ret) { - dev_err(dev, "couldn't register PHYs\n"); - goto phys_err; - } - if (node) { ret = of_platform_populate(node, NULL, NULL, dev); if (ret) { @@ -185,9 +120,6 @@ static int dwc3_exynos_probe(struct platform_device *pdev) return 0; populate_err: - platform_device_unregister(exynos->usb2_phy); - platform_device_unregister(exynos->usb3_phy); -phys_err: regulator_disable(exynos->vdd10); vdd10_err: regulator_disable(exynos->vdd33); @@ -205,8 +137,6 @@ static int dwc3_exynos_remove(struct platform_device *pdev) struct dwc3_exynos *exynos = platform_get_drvdata(pdev); device_for_each_child(&pdev->dev, NULL, dwc3_exynos_remove_child); - platform_device_unregister(exynos->usb2_phy); - platform_device_unregister(exynos->usb3_phy); clk_disable_unprepare(exynos->axius_clk); clk_disable_unprepare(exynos->susp_clk); @@ -258,11 +188,6 @@ static int dwc3_exynos_resume(struct device *dev) clk_enable(exynos->clk); clk_enable(exynos->axius_clk); - /* runtime set active to reflect active state. */ - pm_runtime_disable(dev); - pm_runtime_set_active(dev); - pm_runtime_enable(dev); - return 0; }