From patchwork Thu Dec 12 13:26:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 22284 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2FA9523FC9 for ; Thu, 12 Dec 2013 13:26:30 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id o6sf1491247oag.3 for ; Thu, 12 Dec 2013 05:26:29 -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=ikYE7VwD0ac/mE7Yos5cOqi7fxEcztP4t6TNa1UmOEirzhAP7xiWFqimzx5Ww9bQu7 r7uFp+KLxjZQEoAFAE8pKHAYsaIQExBC3bTZSIXY4wEBZeuSLCz0dGyQjDguEgPskmQJ d7waqiTpLEFluMTZaervG0QcrTW/SpUPCQbqOBATM+yJeVbh+H3RFtxtPQgdNicLW4AL +zYe0UOC+8olLwqkC2ntsB0o+2MFMSZipwpk4ZPA9IX7Lj+GkClwV03WhyPFyq64DSJH sPVC82Z+fUHyPF5ua3dSMsQ0Yq9Co6dO1YtseyvDnkRVGE5U/7j2m8lUwiPviFbdMpz6 pQAg== X-Gm-Message-State: ALoCoQnawtiyBUNMHdcZcF6xZaKano9qiqZheowkPuoVnWwk8LvV+nqNjRzl8hL7PTAuLnMfD9Ob X-Received: by 10.182.153.68 with SMTP id ve4mr2930830obb.39.1386854789765; Thu, 12 Dec 2013 05:26:29 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.38.36 with SMTP id d4ls488770qek.7.gmail; Thu, 12 Dec 2013 05:26:29 -0800 (PST) X-Received: by 10.58.11.73 with SMTP id o9mr3815862veb.8.1386854789525; Thu, 12 Dec 2013 05:26:29 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id er6si7697314vdc.23.2013.12.12.05.26.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 05:26:29 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 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.170; Received: by mail-vc0-f170.google.com with SMTP id la4so278323vcb.29 for ; Thu, 12 Dec 2013 05:26:29 -0800 (PST) X-Received: by 10.58.254.200 with SMTP id ak8mr3825492ved.12.1386854789444; Thu, 12 Dec 2013 05:26:29 -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 u4csp354244vcz; Thu, 12 Dec 2013 05:26:29 -0800 (PST) X-Received: by 10.50.61.205 with SMTP id s13mr8759674igr.29.1386854788967; Thu, 12 Dec 2013 05:26:28 -0800 (PST) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx.google.com with ESMTPS id s10si21598992icv.73.2013.12.12.05.26.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 05:26:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.182 is neither permitted nor denied by best guess record for domain of mporter@linaro.org) client-ip=209.85.223.182; Received: by mail-ie0-f182.google.com with SMTP id as1so526844iec.41 for ; Thu, 12 Dec 2013 05:26:28 -0800 (PST) X-Received: by 10.50.131.163 with SMTP id on3mr30858063igb.46.1386854788633; Thu, 12 Dec 2013 05:26:28 -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 l7sm14983106igx.2.2013.12.12.05.26.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 05:26:27 -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 , Russell King , Linux USB List , Linux ARM Kernel List , Linux Kernel Mailing List , Devicetree List , Linaro Patches Subject: [PATCH v5 5/9] usb: gadget: s3c-hsotg: use generic phy_init()/phy_exit() support Date: Thu, 12 Dec 2013 08:26:06 -0500 Message-Id: <1386854770-2173-6-git-send-email-mporter@linaro.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1386854770-2173-1-git-send-email-mporter@linaro.org> References: <1386854770-2173-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.170 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;