From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: "ABRAHAM, KISHON VIJAY" <kishon@ti.com>
Cc: Felipe Balbi <balbi@ti.com>, Greg KH <gregkh@suse.de>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCHv6 01/19] usb: otg: Rename otg_transceiver to usb_phy
Date: Tue, 8 Nov 2011 14:06:35 +0200 [thread overview]
Message-ID: <20111108120635.GA2531@xps8300> (raw)
In-Reply-To: <CAAe_U6JnWLioK_NCz03uCGd3T0aV56-M3MFgRUdJVX4nB1uhbg@mail.gmail.com>
Hi,
On Tue, Nov 08, 2011 at 11:27:12AM +0530, ABRAHAM, KISHON VIJAY wrote:
> Hi Heikki,
>
> I tend to defer with your opinion of renaming otg_transceiver to
> usb_phy. According to me otg_transceiver should program hardware
> mechanisms associated to VBUS, ID lines, etc.. and phy is responsible
> for transmitting data over differential data lines (with its own
> programming of phy_init, phy_shutdown, setting phy clocks etc..). So
> in my opinion otg_transceiver and usb_phy should be two different and
> separate entities.
Maybe I'm misunderstanding you, but sounds like you are still marrying
OTG with transceivers. The struct usb_phy is independent of OTG.
Things like the otg_transceiver are dropped. The idea is to have the
OTG utility independent of any hardware. OTG does not need to be tied
to a transceiver or to a controller.
On most platforms the controller is perfectly capable of handling any
OTG related function without any need for the software to program the
PHY, so functions like "drive VBUS" will in practice be implemented by
the controller driver. There may not be PHY driver at all but OTG is
still supported.
If on your platform the PHY needs to be programmed in order to drive
VBUS, or handle some other OTG function, then your PHY driver will
fill the hooks in your struct usb_otg. The utility does not need to
care which driver implements these hooks.
> I would have preferred to rename otg_transceiver as usb_otg as the
> first step. (this differs from your implementation where you rename
> otg_transceiver to usb_phy and create a new structure usb_otg to
> separate otg members from usb_phy).
>
> But it should have been first rename otg_transceiver as usb_otg. Then
> create a new structure usb_phy to move all the phy specific
> implementation there. This kind of implementation will also help when
> we want to have independent phy drivers.
This would not have changed the outcome.
Oh, and keep in mind that this really is only the first step in this
rework. After this the idea is to provide support for multiple
transceivers and move USB PHY structures and functions into separate
files from OTG. The final step, and my ultimate goal, is implementing
a generic OTG state machine for the OTG utility.
Br,
--
heikki
next prev parent reply other threads:[~2011-11-08 12:06 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 12:35 [PATCHv6 00/19] First round in OTG rework Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 01/19] usb: otg: Rename otg_transceiver to usb_phy Heikki Krogerus
2011-11-08 5:57 ` ABRAHAM, KISHON VIJAY
2011-11-08 12:06 ` Heikki Krogerus [this message]
2011-11-08 14:58 ` ABRAHAM, KISHON VIJAY
2011-11-08 15:04 ` Felipe Balbi
2011-11-09 8:52 ` Heikki Krogerus
2011-11-09 10:44 ` Felipe Balbi
2011-11-09 1:22 ` Peter Chen
2011-11-09 6:06 ` Felipe Balbi
2011-11-09 6:15 ` Peter Chen
2011-11-09 6:36 ` Felipe Balbi
2011-10-28 12:35 ` [PATCHv6 02/19] usb: otg: Rename usb_otg and usb_xceiv " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 03/19] usb: otg: Separate otg members from usb_phy Heikki Krogerus
2011-11-07 11:27 ` ABRAHAM, KISHON VIJAY
2011-11-08 12:58 ` Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 04/19] usb: otg: ab8500: Start using struct usb_otg Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 05/19] usb: otg: fsl: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 06/19] usb: otg: gpio_vbus: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 07/19] usb: otg: isp1301_omap: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 08/19] usb: otg: msm: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 09/19] usb: otg: langwell: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 10/19] usb: otg: nop: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 11/19] usb: otg: twl4030: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 12/19] usb: otg: twl6030: " Heikki Krogerus
2011-11-08 14:58 ` ABRAHAM, KISHON VIJAY
2011-10-28 12:35 ` [PATCHv6 13/19] usb: otg: ulpi: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 14/19] arm: imx: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 15/19] usb: musb: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 16/19] power_supply: Convert all users to new usb_phy Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 17/19] usb: " Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 18/19] usb: otg: Remove OTG specific members from usb_phy Heikki Krogerus
2011-10-28 12:35 ` [PATCHv6 19/19] usb: otg: Convert all users to pass struct usb_otg for OTG functions Heikki Krogerus
2011-11-04 13:26 ` [PATCHv6 00/19] First round in OTG rework Heikki Krogerus
2011-11-04 13:51 ` Greg KH
2011-11-04 14:40 ` Heikki Krogerus
2011-11-04 15:35 ` Felipe Balbi
2011-11-04 15:45 ` Greg KH
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=20111108120635.GA2531@xps8300 \
--to=heikki.krogerus@linux.intel.com \
--cc=balbi@ti.com \
--cc=gregkh@suse.de \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
/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