From patchwork Thu Dec 12 11:18:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 3331321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2F549C0D4A for ; Thu, 12 Dec 2013 11:22:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A6A8207D3 for ; Thu, 12 Dec 2013 11:22:43 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB964207CE for ; Thu, 12 Dec 2013 11:22:41 +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 1Vr4Jn-0007zI-4G; Thu, 12 Dec 2013 11:20:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr4JM-0000GO-QI; Thu, 12 Dec 2013 11:20:08 +0000 Received: from mail-ie0-f169.google.com ([209.85.223.169]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr4Ia-00008Y-Ro for linux-arm-kernel@lists.infradead.org; Thu, 12 Dec 2013 11:19:21 +0000 Received: by mail-ie0-f169.google.com with SMTP id e14so331879iej.0 for ; Thu, 12 Dec 2013 03:18:59 -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=WkNCRGJR5myCHQJWdNXhW1bFqOZTD48olSJIBy5KEjg=; b=mr1e/LGIV9ti/qW7P9ZyTT8IAV67onRJc7erd9O1rIukHEoAnVsmSCwlur/wQVnfdu wdstrf8TFxc5v6W44kAxK8KSGooWlEqR+rTyJSiFaFu11QBF/4Pe6eNcR4CLqOSBHsFQ stvgB+sFPBVbpIsW3r/Xe/lhFeS5TegYvpBwnBEd/bRk5eb15SwUBpVT45h0KtbomtdX G1mcMqZx36WERe23uK2P9O0AYRGPK4xNt8pW5mqvRPg8cVyJP1ON0hJmpYSaIT7PSGHo y1FF3FN+62iHct+Qy6IGT9ojjVqhVY0klYAkaw7pzZ40dyf0acIzUf/SEOhMTDvLn0jH tQZQ== X-Gm-Message-State: ALoCoQkZFDQqVoDUUJnXIPZzjn91uNU0Z8A2sn6q1zgryWrPy6drAGCCJPxZdEsdVJtDMRw6SS7r X-Received: by 10.42.33.65 with SMTP id h1mr5727168icd.13.1386847139592; Thu, 12 Dec 2013 03:18:59 -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 u1sm14511537ige.1.2013.12.12.03.18.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 03:18:58 -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 v4 5/9] usb: gadget: s3c-hsotg: use generic phy_init()/phy_exit() support Date: Thu, 12 Dec 2013 06:18:33 -0500 Message-Id: <1386847117-21240-6-git-send-email-mporter@linaro.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1386847117-21240-1-git-send-email-mporter@linaro.org> References: <1386847117-21240-1-git-send-email-mporter@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131212_061920_984784_8D3D6914 X-CRM114-Status: GOOD ( 10.12 ) 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 7c5d8bd..e9683c2 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -3621,6 +3621,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); @@ -3714,6 +3717,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;