From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752928AbbJSLuy (ORCPT ); Mon, 19 Oct 2015 07:50:54 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:30025 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752827AbbJSLuw (ORCPT ); Mon, 19 Oct 2015 07:50:52 -0400 X-IronPort-AV: E=Sophos;i="5.17,701,1437404400"; d="scan'208";a="197944225" Message-ID: <5624D918.4040709@rvc.renesas.com> Date: Mon, 19 Oct 2015 18:50:48 +0700 From: Khiem Nguyen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Kishon Vijay Abraham I CC: Yoshihiro Shimoda , "robh+dt@kernel.org" , "pawel.moll@arm.com" , "mark.rutland@arm.com" , "ijc+devicetree@hellion.org.uk" , "galak@codeaurora.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-sh@vger.kernel.org" , Toru Oishi Subject: Re: [PATCH v4 2/3] phy: rcar-gen3-usb2: change the mode to OTG on the combined channel References: <1444731726-5328-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> <1444731726-5328-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> <5621A8D4.40405@ti.com> In-Reply-To: <5621A8D4.40405@ti.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kishon, On 10/17/2015 8:48 AM, Kishon Vijay Abraham I wrote: > Hi, > > On Tuesday 13 October 2015 03:52 PM, Yoshihiro Shimoda wrote: >> To use the channel 0 of R-Car gen3 as periperal mode, This patch changes >> the mode to OTG instead of HOST. Then, this driver needs to set some >> registers to enable host mode and detects ID pin and VBUS pin at >> phy_init() timing. >> >> For now, the channel 0 can be used as host mode only. >> >> Signed-off-by: Yoshihiro Shimoda >> --- >> drivers/phy/phy-rcar-gen3-usb2.c | 126 ++++++++++++++++++++++++++++++++++++++- >> 1 file changed, 124 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/phy/phy-rcar-gen3-usb2.c b/drivers/phy/phy-rcar-gen3-usb2.c >> index d90dfcf..03d7079 100644 >> --- a/drivers/phy/phy-rcar-gen3-usb2.c >> +++ b/drivers/phy/phy-rcar-gen3-usb2.c [ .... ] snip >> + >> + dev_dbg(&ch->phy->dev, "%s: %08x, %d\n", __func__, tmp, host); > > This shoulod be dev_vdbg. I guess using dev_dbg() is equivalent. I searched in same directory (drivers/phy) and the number of drivers using dev_vdbg() are just few drivers. (in my search, only 3 drivers). Other drivers use dev_dbg(). The last driver using dev_dbg was from Jan 2015. I also recognized that dev_vdbug was used mostly in USB drivers... Is it your favorite way or is there any good point of using dev_vdbg() ? >> + if (host) >> + tmp &= ~USB2_COMMCTRL_OTG_PERI; >> + else >> + tmp |= USB2_COMMCTRL_OTG_PERI; >> + writel(tmp, usb2_base + USB2_COMMCTRL); >> +} >> + >> +static void rcar_gen3_set_linectrl(struct rcar_gen3_chan *ch, int dp, int dm) >> +{ >> + void __iomem *usb2_base = ch->usb2.base; >> + u32 tmp = readl(usb2_base + USB2_LINECTRL1); >> + >> + dev_dbg(&ch->phy->dev, "%s: %08x, %d, %d\n", __func__, tmp, dp, dm); > > same here. [.....] snip > > Thanks > Kishon > -- > To unsubscribe from this list: send the line "unsubscribe linux-sh" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >