From patchwork Mon Nov 25 18:16:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 3233861 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6755A9F3B8 for ; Mon, 25 Nov 2013 18:20:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58660201BF for ; Mon, 25 Nov 2013 18:20:27 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 130D720265 for ; Mon, 25 Nov 2013 18:20:26 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vl0ju-0001OE-Ur; Mon, 25 Nov 2013 18:18:31 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vl0jJ-0001o0-7F; Mon, 25 Nov 2013 18:17:53 +0000 Received: from mail-ie0-f172.google.com ([209.85.223.172]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vl0iD-0001eP-1v for linux-arm-kernel@lists.infradead.org; Mon, 25 Nov 2013 18:16:49 +0000 Received: by mail-ie0-f172.google.com with SMTP id qd12so7653400ieb.17 for ; Mon, 25 Nov 2013 10:16:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YScGweGG2CKBdogj8wJ1w/2/+00Pw7waeMDFZuAQoTo=; b=YWvygY9kl+SzV6ecTkhUj2kcYLjbN6cKovJUKu1eMromsjY/yUffPvPaFt5Wl05xSj 8RMaZRpXmYxm6dN+MEkbb/TGHlybvxQ03tApNlkZXqfbk1Z5EKweJcTIIko1ClyVMkuX rpDJIWxeJb8HdOl6ItmU0PE3XFgwbDgX14LQlfy25sR8/KvheMh8bE3VRf428zYsdCUh eBohX0f5M6esC4GaY3OwiAI4Q04RbMvh/IvD/vE17xErQ98lpznvgyt3AmfJ4iZOsyr7 isyBpuaxQcrGipx65hxb+HVVS9r3sdwliFVklb15PXz0uGHZUcgPY+9j+VZD4OJE+1KK YfWg== X-Gm-Message-State: ALoCoQlCvC5QkDClmu0uOwUO9ir2fpCJ3vaCqBOczs6QXTjreYuUn29zXoJS08jbS416I1nj+Wu6 X-Received: by 10.43.170.130 with SMTP id nq2mr1318926icc.69.1385403383959; Mon, 25 Nov 2013 10:16:23 -0800 (PST) Received: from beef.ohporter.com (cpe-98-27-254-98.neo.res.rr.com. [98.27.254.98]) by mx.google.com with ESMTPSA id j16sm26901318igf.6.2013.11.25.10.16.22 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Nov 2013 10:16:23 -0800 (PST) From: Matt Porter To: Felipe Balbi , Greg Kroah-Hartman , Kishon Vijay Abraham I , Rob Herring , Pawel Moll , Mark Rutland , Kumar Gala , Ian Campbell , Christian Daudt , Paul Zimmerman Subject: [PATCH v3 5/9] usb: gadget: s3c-hsotg: use generic phy_init()/phy_exit() support Date: Mon, 25 Nov 2013 13:16:03 -0500 Message-Id: <1385403367-18144-6-git-send-email-matt.porter@linaro.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1385403367-18144-1-git-send-email-matt.porter@linaro.org> References: <1385403367-18144-1-git-send-email-matt.porter@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131125_131645_208245_2662E65D X-CRM114-Status: GOOD ( 10.73 ) X-Spam-Score: -2.6 (--) Cc: Devicetree List , Kamil Debski , Linaro Patches , Tomasz Figa , Linux USB List , Linux Kernel Mailing List , Kyungmin Park , Linux ARM Kernel List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If a generic phy is present, call phy_init()/phy_exit(). This supports generic phys that must be soft reset before power on. Signed-off-by: Matt Porter --- drivers/usb/gadget/s3c-hsotg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index da3879b..8dfe33f 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -3622,6 +3622,9 @@ static int s3c_hsotg_probe(struct platform_device *pdev) goto err_supplies; } + if (hsotg->phy) + phy_init(hsotg->phy); + /* usb phy enable */ s3c_hsotg_phy_enable(hsotg); @@ -3715,6 +3718,8 @@ static int s3c_hsotg_remove(struct platform_device *pdev) } s3c_hsotg_phy_disable(hsotg); + if (hsotg->phy) + phy_exit(hsotg->phy); clk_disable_unprepare(hsotg->clk); return 0;