devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zhangfei <zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: balbi-l0cyMroinI0@public.gmane.org
Cc: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Sergei Shtylyov
	<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>,
	"dan . zhao" <dan.zhao-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
	Wangbinghui <wangbinghui-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v4 4/4] phy: add phy-hi6220-usb
Date: Fri, 20 Feb 2015 18:27:27 +0800	[thread overview]
Message-ID: <54E70C0F.1030601@linaro.org> (raw)
In-Reply-To: <20150220043805.GA22128-HgARHv6XitJaoMGHk7MhZQC/G2K4zDHf@public.gmane.org>



On 02/20/2015 12:38 PM, Felipe Balbi wrote:
> On Fri, Feb 20, 2015 at 11:07:21AM +0800, zhangfei wrote:
>> Hi, Balbi
>>
>> On 02/18/2015 10:35 PM, Felipe Balbi wrote:
>>> On Wed, Feb 18, 2015 at 01:44:21PM +0800, zhangfei wrote:
>>>> Hi, Kishon
>>>>
>>>> On 02/18/2015 01:35 PM, Kishon Vijay Abraham I wrote:
>>>>> Hi,
>>>>>
>>>>> On Thursday 12 February 2015 01:07 PM, Zhangfei Gao wrote:
>>>>>> Add usb phy controller for hi6220 platform
>>>>>>
>>>>>> Signed-off-by: Zhangfei Gao <zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>>>>> ---
>>>>>>   drivers/phy/Kconfig          |   9 ++
>>>>>>   drivers/phy/Makefile         |   1 +
>>>>>>   drivers/phy/phy-hi6220-usb.c | 306
>>>>>> +++++++++++++++++++++++++++++++++++++++++++
>>>>>>   3 files changed, 316 insertions(+)
>>>>>>   create mode 100644 drivers/phy/phy-hi6220-usb.c
>>>>>
>>>>> why is this driver in drivers/phy when it doesn't use the generic PHY
>>>>> framework at all?
>>>>>
>>>>
>>>> Balbi recommended "new drivers only on drivers/phy/", including usb
>>>> phy.
>>>
>>> but it should use the API too. It's not only about a directory, you need
>>> to use the new API.
>>>
>>>> So Move drivers/usb/phy/phy-hi6220-usb.c to
>>>> drivers/phy/phy-hi6220-usb.c, required by Balbi.
>>>
>>> you're reading what I stated the way you like.
>>
>> Sorry for my bad understanding.
>>
>> Still not clear about the otg_set_peripheral, which is required in
>> phy-hi6220-usb.c
>>
>> 1. drivers/usb/dwc2/gadget.c use
>> otg_set_peripheral(hsotg->uphy->otg, &hsotg->gadget);
>>
>> 2. include/linux/phy/phy.h
>> struct phy do not have member otg, while struct usb_phy has.
>>
>> Could you give more hints?
>
> your set_peripheral doesn't do anything, just holds a pointer. Might as
> well not implement it. I'll review your driver more fully tomorrow.
>
> There a few things which must be changed.
>

Thanks in advance.

We need this call back set_peripheral setting otg->gadget, which used in 
usb_gadget_connect/disconnect(otg->gadget).

The workable method test here is not provide phy-names = "usb2-phy";
Then dwc2 will still use hsotg->uphy instead of hsotg->phy.
Though devm_phy_create is used in phy-hi6220-usb.c, phy_ops is not used 
in fact.

Thanks

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-02-20 10:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12  7:37 [PATCH v4 0/4] add usb support for hi6220 Zhangfei Gao
2015-02-12  7:37 ` [PATCH v4 1/4] Documentation: dt-bindings: add dt binding info for hi6220 dwc2 Zhangfei Gao
2015-02-12  7:37 ` [PATCH v4 2/4] Documentation: dt-bindings: add dt binding info for hi6220 Zhangfei Gao
2015-02-12  7:37 ` [PATCH v4 3/4] usb: dwc2: platform: add hi6220 support Zhangfei Gao
2015-02-12  7:37 ` [PATCH v4 4/4] phy: add phy-hi6220-usb Zhangfei Gao
2015-02-18  5:35   ` Kishon Vijay Abraham I
2015-02-18  5:44     ` zhangfei
2015-02-18 14:35       ` Felipe Balbi
2015-02-20  3:07         ` zhangfei
     [not found]           ` <54E6A4E9.4030401-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-02-20  4:38             ` Felipe Balbi
     [not found]               ` <20150220043805.GA22128-HgARHv6XitJaoMGHk7MhZQC/G2K4zDHf@public.gmane.org>
2015-02-20 10:27                 ` zhangfei [this message]
2015-02-20 14:41   ` Felipe Balbi
     [not found]     ` <20150220144119.GB1707-HgARHv6XitJaoMGHk7MhZQC/G2K4zDHf@public.gmane.org>
2015-02-20 15:44       ` zhangfei
2015-02-20 16:06         ` Felipe Balbi
2015-02-21 15:03           ` zhangfei
2015-02-21 16:21             ` Felipe Balbi
2015-02-22  3:10               ` zhangfei
     [not found]                 ` <54E948AC.2010609-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-02-23 15:36                   ` Felipe Balbi
2015-02-25 13:28                     ` zhangfei
2015-02-25 16:32                       ` Felipe Balbi
2015-02-24 10:13                 ` Roger Quadros
     [not found]                   ` <54EC4ECA.2090300-l0cyMroinI0@public.gmane.org>
2015-02-26  8:48                     ` zhangfei
2015-02-26  9:36                       ` Roger Quadros
2015-02-27  2:07                       ` Peter Chen

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=54E70C0F.1030601@linaro.org \
    --to=zhangfei.gao-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=dan.zhao-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kishon-l0cyMroinI0@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org \
    --cc=wangbinghui-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
    /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).