From patchwork Fri Dec 13 16:51:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 22335 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ECADE202E2 for ; Fri, 13 Dec 2013 16:51:46 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id lx4sf7588410iec.6 for ; Fri, 13 Dec 2013 08:51:46 -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=P9uqhnIr5VCRk/NLy3e6Q4nzBGKoSUy9W0a3Ozt5iQw=; b=fWJXwxgw5If62UnMT+3qMnBI0OZmFdX9LFF5semgTREcoxNC+C3VZaqe3TiSa+lWNl ygDJ8C8i4EEndm0s3jks+JfLJxw9O71/3krv+kZ8T7vnvKVrE+BL+oqIjxbXCZ4n0gwo razV7YJsrJyUHEgxPhcmmy6bSEDogbn14QoxexyyaTj8KP32QrYo2j2HCr5YJWbxjJDE iiDo3NiuuNLxK+wRg/AebkOutrnF4A8PChT9c7+EAQ1MtlkZPaplzalqStjnniyP91Fd F6nggFBAfidNTidJFXBKkO37GTzzuU0qJUpt/umiCPob89lwyPv5BA/HeczfclwW5V3f xTGA== X-Gm-Message-State: ALoCoQl8zx8WjxYnLxhIDXsWU4ylvTo2SWUFmcVFVew3mhBTuKXbcoy8h+iyPd+ytKw50i5MIJ9R X-Received: by 10.42.85.148 with SMTP id q20mr1078655icl.22.1386953506588; Fri, 13 Dec 2013 08:51:46 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.127.99 with SMTP id nf3ls1089327qeb.30.gmail; Fri, 13 Dec 2013 08:51:46 -0800 (PST) X-Received: by 10.220.177.132 with SMTP id bi4mr1624067vcb.49.1386953506429; Fri, 13 Dec 2013 08:51:46 -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 xn9si931519vcb.116.2013.12.13.08.51.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 08:51:46 -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 ks9so1456564vcb.40 for ; Fri, 13 Dec 2013 08:51:46 -0800 (PST) X-Received: by 10.53.13.44 with SMTP id ev12mr1380228vdd.17.1386953506341; Fri, 13 Dec 2013 08:51:46 -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 u4csp51934vcz; Fri, 13 Dec 2013 08:51:45 -0800 (PST) X-Received: by 10.50.119.130 with SMTP id ku2mr3628693igb.28.1386953505450; Fri, 13 Dec 2013 08:51:45 -0800 (PST) Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) by mx.google.com with ESMTPS id mg9si2495755icc.89.2013.12.13.08.51.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 08:51:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.173 is neither permitted nor denied by best guess record for domain of mporter@linaro.org) client-ip=209.85.223.173; Received: by mail-ie0-f173.google.com with SMTP id to1so3170584ieb.18 for ; Fri, 13 Dec 2013 08:51:45 -0800 (PST) X-Received: by 10.42.67.74 with SMTP id s10mr2595256ici.1.1386953505164; Fri, 13 Dec 2013 08:51:45 -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 hv5sm5155766igb.9.2013.12.13.08.51.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 08:51:44 -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 , Dinh Nguyen , Russell King , Linux USB List , Linux ARM Kernel List , Linux Kernel Mailing List , Devicetree List , Linaro Patches Subject: [PATCH v6 5/9] usb: gadget: s3c-hsotg: use generic phy_init()/phy_exit() support Date: Fri, 13 Dec 2013 11:51:19 -0500 Message-Id: <1386953483-21631-6-git-send-email-mporter@linaro.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1386953483-21631-1-git-send-email-mporter@linaro.org> References: <1386953483-21631-1-git-send-email-mporter@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mporter@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 Acked-by: Kishon Vijay Abraham I --- 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;