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: 21752 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1CA3B20299 for ; Mon, 25 Nov 2013 18:16:25 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id a41sf8909215yho.8 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:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=YScGweGG2CKBdogj8wJ1w/2/+00Pw7waeMDFZuAQoTo=; b=f7CMtnZR3QoBB1sGsY8b3YUJLquIJJxwH7j/ImW3SLdcMtCD1KD9mZPOEeLImS+pLT 3E1p0vez7Wepdjn804zB3fHj9GaNKG/WgLdmLjkSVWrcjYvN5YWyEbkMwRquqeUVItbS i40bkDMkE7U6uuVqOzx8wyaK9D7QVyLgZ9yj5lV0mwfmM9BZq0YLBFbEW/hRHWps+xz7 0iD2Kci7asdW7aO/Lw3ifA9xjLnfvbAkBx6fSDvolKMsA6BNUwQf9f5LW3iPnyp0Sgex MGsmgNh+OYKE28sGmfv9eudbSpdDcbmnyOKJudLkLP7mceRFcf3n9FDU9AUIl2ZqYIcK /BIg== X-Gm-Message-State: ALoCoQnVcLxLx9kvxxcVBlFrFnjmpvaQiVrp08eu9oq9gZKVsIGPiVw1MTQFZqI+Bka+YgRyC9Wz X-Received: by 10.236.147.18 with SMTP id s18mr14399738yhj.28.1385403384907; Mon, 25 Nov 2013 10:16:24 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.37.134 with SMTP id y6ls2250769qej.15.gmail; Mon, 25 Nov 2013 10:16:24 -0800 (PST) X-Received: by 10.58.143.17 with SMTP id sa17mr28125503veb.14.1385403384814; Mon, 25 Nov 2013 10:16:24 -0800 (PST) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id sv4si8894517vdc.133.2013.11.25.10.16.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Nov 2013 10:16:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ks9so2961017vcb.26 for ; Mon, 25 Nov 2013 10:16:24 -0800 (PST) X-Received: by 10.52.182.39 with SMTP id eb7mr22255070vdc.6.1385403384733; Mon, 25 Nov 2013 10:16:24 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp152996vcz; Mon, 25 Nov 2013 10:16:24 -0800 (PST) X-Received: by 10.43.129.70 with SMTP id hh6mr1325707icc.68.1385403384208; Mon, 25 Nov 2013 10:16:24 -0800 (PST) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx.google.com with ESMTPS id jv7si30109731icc.62.2013.11.25.10.16.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Nov 2013 10:16:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.178 is neither permitted nor denied by best guess record for domain of matt.porter@linaro.org) client-ip=209.85.223.178; Received: by mail-ie0-f178.google.com with SMTP id lx4so7490710iec.37 for ; Mon, 25 Nov 2013 10:16:24 -0800 (PST) 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 Cc: Tomasz Figa , Kamil Debski , Kyungmin Park , Linux USB List , Linux ARM Kernel List , Linux Kernel Mailing List , Devicetree List , Linaro Patches 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: matt.porter@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;