Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754931AbaDWMby (ORCPT ); Wed, 23 Apr 2014 08:31:54 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:48543 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754781AbaDWMbu (ORCPT ); Wed, 23 Apr 2014 08:31:50 -0400 X-AuditID: cbfee691-b7f3e6d000002ce8-c8-5357b2b3b5fa From: Jingoo Han To: "'Vivek Gautam'" Cc: "'Anton Tikhomirov'" , "'Linux USB Mailing List'" , linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "'Greg KH'" , "'Alan Stern'" , "'Felipe Balbi'" , "'Kukjin Kim'" , "'Jingoo Han'" References: <1398082604-3013-1-git-send-email-gautam.vivek@samsung.com> <1398082604-3013-3-git-send-email-gautam.vivek@samsung.com> <00bf01cf5ed6$28de18d0$7a9a4a70$%tikhomirov@samsung.com> <00d201cf5ee2$d55c4e90$8014ebb0$%tikhomirov@samsung.com> In-reply-to: Subject: Re: [PATCH 3/3] usb: dwc3-exynos: Make provision for vdd regulators Date: Wed, 23 Apr 2014 21:31:47 +0900 Message-id: <000901cf5eef$fe79e5f0$fb6db1d0$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac9e5dkb3YBqQHxNSDeCXspB2ivhfAACUszQ Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLIsWRmVeSWpSXmKPExsVy+t8zQ93Nm8KDDfommFss2X2D1eLg/XqL tisH2S2aF69ns7i88BKrRe+Cq2wWmx5fY7W4vGsOm8XsJf0sFjPO72OyWLSsldliwu8LbA48 HvvnrmH32Lyk3mP23R+MHn1bVjF6HL+xncnj8ya5ALYoLpuU1JzMstQifbsEroy7q0+yF3yV qfh+dQd7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N+MEq1zfrKCVLEJqEl8+XKYHcQWEdCV6Jn4kQWkiFlgE7PEpyd32SE6 Opklnu47yQZSxSkQLDFhyQSmLkYODmEBH4kz3WCrWQRUJT7+X88EYvMK2ErMujSFDcIWlPgx +R4LiM0soC4xad4iZghbXmLzmrfMIGMkgOKP/uqCmCICRhLb93tBVIhI7HvxjnECo9AsJINm IRk0C8mgWUhaFjCyrGIUTS1ILihOSs811CtOzC0uzUvXS87P3cQITirPpHYwrmywOMQowMGo xMNbsDIsWIg1say4MvcQowQHs5II75JF4cFCvCmJlVWpRfnxRaU5qcWHGJOB/pzILCWanA9M eHkl8YbGJmZGlkZmFkYm5uakCSuJ8x5otQ4UEkhPLEnNTk0tSC2C2cLEwSnVwFh384z3g/Te aJXlt9dV7p9md0Yqh3/9TCn7B3rfzk1/e9LpZ0feB43Dn4u1v1ecXtq5n+XtvT2msdkP9mdu 8X5ScGYl08fL33auv6dUlbRJ7K7EJc3OLRdv347UNpT5JDE7yvbtW4FwO2VV9+KTG/ZO5v55 4Nd+nXQV17De5uqQt5u3zU/4EMqvxFKckWioxVxUnAgAipT5em4DAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, April 23, 2014 8:06 PM, Vivek Gautam wrote: > On Wednesday, April 23, 2014 7:58 PM, Anton Tikhomirov wrote: > > On Wednesday, April 23, 2014 6:52 PM, Vivek Gautam wrote: > >> On Wednesday, April 23, 2014 6:27 PM, Anton Tikhomirov wrote: > >> > On Monday, April 21, 2014 9:17 PM, Vivek Gautam wrote: > >> >> > >> >> Facilitate getting required 3.3V and 1.0V VDD supply for > >> >> DWC3 controller on Exynos. > >> >> > >> >> With patches for regulators' nodes merged in 3.15: > >> >> c8c253f ARM: dts: Add regulator entries to smdk5420 > >> >> 275dcd2 ARM: dts: add max77686 pmic node for smdk5250, > >> >> > >> >> certain perripherals will now need to ensure that, > >> >> they request VDD regulators in their drivers, and enable > >> >> them so as to make them working. > >> >> > >> >> Signed-off-by: Vivek Gautam > >> >> Cc: Anton Tikhomirov > >> >> --- > >> >> > >> >> Based on 'usb-next' branch of Greg's USB tree. > >> >> Also cleanly applies on 'next' branch of Balbi's USB tree. > >> >> > >> >> drivers/usb/dwc3/dwc3-exynos.c | 51 > >> >> ++++++++++++++++++++++++++++++++++++++-- > >> >> 1 file changed, 49 insertions(+), 2 deletions(-) > >> >> > >> >> diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3- > >> >> exynos.c > >> >> index 28c8ad7..c9d9102 100644 > >> >> --- a/drivers/usb/dwc3/dwc3-exynos.c > >> >> +++ b/drivers/usb/dwc3/dwc3-exynos.c > >> >> @@ -27,6 +27,7 @@ > >> >> #include > >> >> #include > >> >> #include > >> >> +#include > >> >> > >> >> struct dwc3_exynos { > >> >> struct platform_device *usb2_phy; > >> >> @@ -34,6 +35,8 @@ struct dwc3_exynos { > >> >> struct device *dev; > >> >> > >> >> struct clk *clk; > >> >> + struct regulator *vdd33; > >> >> + struct regulator *vdd10; > >> >> }; > >> >> > >> >> static int dwc3_exynos_register_phys(struct dwc3_exynos *exynos) > >> >> @@ -144,20 +147,46 @@ static int dwc3_exynos_probe(struct > >> >> platform_device *pdev) > >> >> > >> >> clk_prepare_enable(exynos->clk); > >> >> > >> >> + exynos->vdd33 = devm_regulator_get(dev, "vdd33"); > >> >> + if (IS_ERR(exynos->vdd33)) { > >> >> + ret = PTR_ERR(exynos->vdd33); > >> >> + goto err2; > >> > > >> > Is regulator property mandatory for dwc3-exynos? If it is not > >> > and device tree doesn't provide it, dwc3-exynos driver probe > >> shouldn't > >> > fail here. > >> > >> These are the VDD regulators (from PMIC ldo supplies), in absence of > >> which the controller will not be powered up. > >> So doesn't it make sense to stop the probe when these are not supplied > >> by device tree ? > > > > Agree. Just curious, is there special reason for this change except making > > things right? > > Yea, actually after the patch (which got merged in 3.15 rc1) > 275dcd2 ARM: dts: add max77686 pmic node for smdk5250, > > the USB stops working, and that's because the regulators related to > usb are not turned on by default (ldo12 and ldo15 to be specific). > So we need to enable those regulators, which ofcourse the driver > should be doing, if i am not wrong. > Similar is the reason for EHCI, and OHCI exynos patches in this series. Oh, I see. Thank you for your explanation. > > I shall be sending the dt patch for this soon. OK, I will wait for your patch. Best regards, Jingoo Han > > > -- > Best Regards > Vivek Gautam > Samsung R&D Institute, Bangalore > India -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/