devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"pawel.moll@arm.com" <pawel.moll@arm.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
	"galak@codeaurora.org" <galak@codeaurora.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
	Toru Oishi <toru.oishi.zj@rvc.renesas.com>
Subject: Re: [PATCH v4 2/3] phy: rcar-gen3-usb2: change the mode to OTG on the combined channel
Date: Mon, 19 Oct 2015 18:50:48 +0700	[thread overview]
Message-ID: <5624D918.4040709@rvc.renesas.com> (raw)
In-Reply-To: <5621A8D4.40405@ti.com>

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 <yoshihiro.shimoda.uh@renesas.com>
>> ---
>>   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
>


  parent reply	other threads:[~2015-10-19 11:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 10:22 [PATCH v4 0/3] phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver Yoshihiro Shimoda
2015-10-13 10:22 ` [PATCH v4 1/3] " Yoshihiro Shimoda
2015-10-17  1:43   ` Kishon Vijay Abraham I
2015-10-19  8:30     ` Yoshihiro Shimoda
2015-10-13 10:22 ` [PATCH v4 2/3] phy: rcar-gen3-usb2: change the mode to OTG on the combined channel Yoshihiro Shimoda
2015-10-17  1:48   ` Kishon Vijay Abraham I
2015-10-19  8:32     ` Yoshihiro Shimoda
2015-10-19 11:50     ` Khiem Nguyen [this message]
2015-10-13 10:22 ` [PATCH v4 3/3] phy: rcar-gen3-usb2: add runtime ID/VBUS pin detection Yoshihiro Shimoda
2015-10-17  1:53   ` Kishon Vijay Abraham I
2015-10-19  8:35     ` Yoshihiro Shimoda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5624D918.4040709@rvc.renesas.com \
    --to=khiem.nguyen.xt@rvc.renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=toru.oishi.zj@rvc.renesas.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).