public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] Hook start_hnp into ohci struct
@ 2008-07-06 10:26 Dmitry Baryshkov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2008-07-06 10:26 UTC (permalink / raw)
  To: linux-usb

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
---
 drivers/usb/host/ohci-hub.c  |    4 +---
 drivers/usb/host/ohci-omap.c |    1 +
 drivers/usb/host/ohci.h      |    1 +
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 79a7802..6a4e5b6 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -581,8 +581,6 @@ static int ohci_start_port_reset (struct usb_hcd *hcd, unsigned port)
 	return 0;
 }
 
-static void start_hnp(struct ohci_hcd *ohci);
-
 #else
 
 #define	ohci_start_port_reset		NULL
@@ -769,7 +767,7 @@ static int ohci_hub_control (
 #ifdef	CONFIG_USB_OTG
 			if (hcd->self.otg_port == (wIndex + 1)
 					&& hcd->self.b_hnp_enable)
-				start_hnp(ohci);
+				ohci->start_hnp(ohci);
 			else
 #endif
 			ohci_writel (ohci, RH_PS_PSS,
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 4f21646..8b92532 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -222,6 +222,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
 			dev_err(hcd->self.controller, "can't find transceiver\n");
 			return -ENODEV;
 		}
+		ohci->start_hnp = start_hnp;
 	}
 #endif
 
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index 4e3d9b2..90e17b0 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -371,6 +371,7 @@ struct ohci_hcd {
 	 * other external transceivers should be software-transparent
 	 */
 	struct otg_transceiver	*transceiver;
+	void (*start_hnp)(struct ohci_hcd *ohci);
 
 	/*
 	 * memory management for queue data structures
-- 
1.5.6


-- 
With best wishes
Dmitry


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] Hook start_hnp into ohci struct
       [not found]   ` <20080706103050.GB20019-4vvIQG7NF+ITKvXZea5imILpUPVTGn5w@public.gmane.org>
@ 2008-07-06 10:33     ` Dmitry Baryshkov
       [not found]       ` <20080706103332.GA28505-nIupHZaCssqR2kOLt6zJ8ErlnG4Plg33XqFh9Ls21Oc@public.gmane.org>
  2008-07-06 23:00       ` David Brownell
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2008-07-06 10:33 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

On Sun, Jul 06, 2008 at 01:30:50PM +0300, Felipe Balbi wrote:
> On Sun, Jul 06, 2008 at 02:26:30PM +0400, Dmitry Baryshkov wrote:
> > diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
> > index 4f21646..8b92532 100644
> > --- a/drivers/usb/host/ohci-omap.c
> > +++ b/drivers/usb/host/ohci-omap.c
> > @@ -222,6 +222,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
> >  			dev_err(hcd->self.controller, "can't find transceiver\n");
> >  			return -ENODEV;
> >  		}
> > +		ohci->start_hnp = start_hnp;
> 
> Why? It's part of struct otg_transceiver.
> 

Actually the ohci-omap.c:start_hnp does a bit more than just
otg_start_hnp(tranceiver). Maybe it should be merged. I dunno.

-- 
With best wishes
Dmitry

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] Hook start_hnp into ohci struct
       [not found]       ` <20080706103332.GA28505-nIupHZaCssqR2kOLt6zJ8ErlnG4Plg33XqFh9Ls21Oc@public.gmane.org>
@ 2008-07-06 11:05         ` Felipe Balbi
  2008-07-06 11:55           ` Dmitry Baryshkov
  0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2008-07-06 11:05 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Felipe Balbi, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

On Sun, Jul 06, 2008 at 02:33:32PM +0400, Dmitry Baryshkov wrote:
> Actually the ohci-omap.c:start_hnp does a bit more than just
> otg_start_hnp(tranceiver). Maybe it should be merged. I dunno.

Most likely it should be merged, or at least the name should change.

--
	- Balbi
--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] Hook start_hnp into ohci struct
  2008-07-06 11:05         ` Felipe Balbi
@ 2008-07-06 11:55           ` Dmitry Baryshkov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2008-07-06 11:55 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-usb, linux-omap

On Sun, Jul 06, 2008 at 02:05:07PM +0300, Felipe Balbi wrote:
> On Sun, Jul 06, 2008 at 02:33:32PM +0400, Dmitry Baryshkov wrote:
> > Actually the ohci-omap.c:start_hnp does a bit more than just
> > otg_start_hnp(tranceiver). Maybe it should be merged. I dunno.
> 
> Most likely it should be merged, or at least the name should change.

As I'm neither OMAP nor OTG expert, leaving the decision for somebody
with more experience.

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] Hook start_hnp into ohci struct
  2008-07-06 10:33     ` [PATCH 3/4] Hook start_hnp into ohci struct Dmitry Baryshkov
       [not found]       ` <20080706103332.GA28505-nIupHZaCssqR2kOLt6zJ8ErlnG4Plg33XqFh9Ls21Oc@public.gmane.org>
@ 2008-07-06 23:00       ` David Brownell
  1 sibling, 0 replies; 5+ messages in thread
From: David Brownell @ 2008-07-06 23:00 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: Felipe Balbi, linux-usb, linux-omap

On Sunday 06 July 2008, Dmitry Baryshkov wrote:
> > > +           ohci->start_hnp = start_hnp;
> > 
> > Why? It's part of struct otg_transceiver.
> > 
> 
> Actually the ohci-omap.c:start_hnp does a bit more than just
> otg_start_hnp(tranceiver). Maybe it should be merged. I dunno.

I'm fine with it staying the way it is.  It starts HNP ...
that job is split between several components, and the
transceiver doesn't handle them all.

- Dave

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-06 23:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080706102630.GA29934@doriath.ww600.siemens.net>
     [not found] ` <20080706103050.GB20019@kedavra.cpe.vivax.com.br>
     [not found]   ` <20080706103050.GB20019-4vvIQG7NF+ITKvXZea5imILpUPVTGn5w@public.gmane.org>
2008-07-06 10:33     ` [PATCH 3/4] Hook start_hnp into ohci struct Dmitry Baryshkov
     [not found]       ` <20080706103332.GA28505-nIupHZaCssqR2kOLt6zJ8ErlnG4Plg33XqFh9Ls21Oc@public.gmane.org>
2008-07-06 11:05         ` Felipe Balbi
2008-07-06 11:55           ` Dmitry Baryshkov
2008-07-06 23:00       ` David Brownell
2008-07-06 10:26 Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox