Messages in this thread | | | Date | Wed, 05 Mar 2014 16:34:10 +0400 | From | Sergei Shtylyov <> | Subject | Re: [PATCH v5 10/14] usb: phy: msm: Use reset framework for LINK and PHY resets |
| |
Hello.
On 05-03-2014 14:13, Ivan T. Ivanov wrote:
> From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> > --- > drivers/usb/phy/phy-msm-usb.c | 30 ++++++++++++++++++++++-------- > include/linux/usb/msm_hsusb.h | 3 +++ > 2 files changed, 25 insertions(+), 8 deletions(-)
> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c > index 298820f..7e5c4ab 100644 > --- a/drivers/usb/phy/phy-msm-usb.c > +++ b/drivers/usb/phy/phy-msm-usb.c [...] > @@ -235,12 +236,16 @@ static void ulpi_init(struct msm_otg *motg) > > static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert) > { > - int ret = 0; > + int ret; > > - if (!motg->pdata->link_clk_reset) > - return ret; > + if (motg->pdata->link_clk_reset) > + ret = motg->pdata->link_clk_reset(motg->clk, assert); > + else > + if (assert)
Kernel style assumes:
else if (assert)
> + ret = reset_control_assert(motg->link_rst); > + else > + ret = reset_control_deassert(motg->link_rst); > [...]
WBR, Sergei
| |