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: 22274 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2499523FC9 for ; Thu, 12 Dec 2013 11:19:01 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id f11sf3551758qae.7 for ; Thu, 12 Dec 2013 03:19:01 -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=WkNCRGJR5myCHQJWdNXhW1bFqOZTD48olSJIBy5KEjg=; b=JagZIY4Ilw5XtSj7mQo8oQNLchCvWB3C2sJrJ8vZbz70YOQloOEjUQk5Af2tOGFPWl 9+rw6BVRSFQyLWAH0XQ4Pz61So3yn/DeIbK8ACVJnI9UQ01Ovt8eUp9/I6xecDAshi6r qUiPzKICFbzhFN/vA5BwiGmjXIvEV9p1SlwhZTOxjbKRAYkpVKqFUzy2U2JZ7IYXqfwf hPiBXaQ1Hbug33u9dhVgW/at4orqUX3PZHDycGVzJ9M1f1p2IwZRgu/HK3QgildKAZrD SGMAfFWzxUCxZ2i2RUamFm/CmWyWRWkj3dEdhbjf7BVKrJ4TgqnW6P1mpndVo1lP8tMU uT3A== X-Gm-Message-State: ALoCoQmp5pxM+E56SWT76Kr9QoJpIa6H58slG814ttASbcMOftkauGkY94LavZuWMeRysQ0jDmMd X-Received: by 10.236.228.170 with SMTP id f40mr2353677yhq.43.1386847141026; Thu, 12 Dec 2013 03:19:01 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.106.132 with SMTP id gu4ls410782qeb.8.gmail; Thu, 12 Dec 2013 03:19:00 -0800 (PST) X-Received: by 10.58.210.66 with SMTP id ms2mr3369092vec.10.1386847140930; Thu, 12 Dec 2013 03:19:00 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id k17si7602802vck.27.2013.12.12.03.19.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 03:19:00 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.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.128.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so178412veb.12 for ; Thu, 12 Dec 2013 03:19:00 -0800 (PST) X-Received: by 10.221.19.5 with SMTP id qi5mr3270567vcb.15.1386847140866; Thu, 12 Dec 2013 03:19:00 -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 u4csp345874vcz; Thu, 12 Dec 2013 03:19:00 -0800 (PST) X-Received: by 10.50.128.137 with SMTP id no9mr8395694igb.36.1386847140085; Thu, 12 Dec 2013 03:19:00 -0800 (PST) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by mx.google.com with ESMTPS id e5si10910099igd.61.2013.12.12.03.18.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 03:19:00 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.176 is neither permitted nor denied by best guess record for domain of mporter@linaro.org) client-ip=209.85.223.176; Received: by mail-ie0-f176.google.com with SMTP id at1so318839iec.35 for ; Thu, 12 Dec 2013 03:18:59 -0800 (PST) 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 Cc: Tomasz Figa , Kamil Debski , Kyungmin Park , Linux USB List , Linux ARM Kernel List , Linux Kernel Mailing List , Devicetree List , Linaro Patches 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-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.128.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 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;