Message ID | 1361974590-21237-1-git-send-email-mkl@pengutronix.de |
---|---|
State | New |
Headers | show |
On Wed, Feb 27, 2013 at 03:16:29PM +0100, Marc Kleine-Budde wrote: > From: Michael Grzeschik <m.grzeschik@pengutronix.de> > > This adds two little devicetree helper functions for determining the dr_mode > (host, peripheral, otg, dual-role) and phy_type (utmi, ulpi,...) from the > devicetree. > > Cc: Felipe Balbi <balbi@ti.com> > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> causes build breakage: include/linux/usb/of.h:21:32: error: return type is an incomplete type include/linux/usb/of.h: In function ‘of_usb_get_dr_mode’: include/linux/usb/of.h:23:9: error: ‘USB_DR_MODE_UNKNOWN’ undeclared (first use in this function) include/linux/usb/of.h:23:9: note: each undeclared identifier is reported only once for each function it appears in include/linux/usb/of.h:23:2: warning: ‘return’ with a value, in function returning void [enabled by default] make[1]: *** [drivers/usb/usb-common.o] Error 1
hi, On Wed, Feb 27, 2013 at 03:16:30PM +0100, Marc Kleine-Budde wrote: > From: Sascha Hauer <s.hauer@pengutronix.de> > > We now have usb_add_phy_dev(), so use it to register with the framework > to be able to find the phy from the USB driver. > > Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com> > Reviewed-by: Peter Chen <peter.chen@freescale.com> > Acked-by: Felipe Balbi <balbi@ti.com> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> any chance you can move away from {write,read}[bwl]_relaxed() so we can build this driver on other architectures ?
On 02/28/2013 09:01 AM, Felipe Balbi wrote: > hi, > > On Wed, Feb 27, 2013 at 03:16:30PM +0100, Marc Kleine-Budde wrote: >> From: Sascha Hauer <s.hauer@pengutronix.de> >> >> We now have usb_add_phy_dev(), so use it to register with the framework >> to be able to find the phy from the USB driver. >> >> Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com> >> Reviewed-by: Peter Chen <peter.chen@freescale.com> >> Acked-by: Felipe Balbi <balbi@ti.com> >> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> >> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > > any chance you can move away from {write,read}[bwl]_relaxed() so we can > build this driver on other architectures ? The hardware is in the ARM imx2{2,8} only. Another option would be to add an "depends on ARCH_ARM". Marc
On 02/28/2013 08:57 AM, Felipe Balbi wrote: > On Wed, Feb 27, 2013 at 03:16:29PM +0100, Marc Kleine-Budde wrote: >> From: Michael Grzeschik <m.grzeschik@pengutronix.de> >> >> This adds two little devicetree helper functions for determining the dr_mode >> (host, peripheral, otg, dual-role) and phy_type (utmi, ulpi,...) from the >> devicetree. >> >> Cc: Felipe Balbi <balbi@ti.com> >> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> >> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> >> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > > causes build breakage: > > include/linux/usb/of.h:21:32: error: return type is an incomplete type > include/linux/usb/of.h: In function ‘of_usb_get_dr_mode’: > include/linux/usb/of.h:23:9: error: ‘USB_DR_MODE_UNKNOWN’ undeclared (first use in this function) > include/linux/usb/of.h:23:9: note: each undeclared identifier is reported only once for each function it appears in > include/linux/usb/of.h:23:2: warning: ‘return’ with a value, in function returning void [enabled by default] > make[1]: *** [drivers/usb/usb-common.o] Error 1 Doh! That occurs only for non DT kernels, but who doesn't use device tree these days? Fixed, Marc
Marc Kleine-Budde <mkl@pengutronix.de> writes: > On 02/28/2013 09:01 AM, Felipe Balbi wrote: >> hi, >> >> On Wed, Feb 27, 2013 at 03:16:30PM +0100, Marc Kleine-Budde wrote: >>> From: Sascha Hauer <s.hauer@pengutronix.de> >>> >>> We now have usb_add_phy_dev(), so use it to register with the framework >>> to be able to find the phy from the USB driver. >>> >>> Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com> >>> Reviewed-by: Peter Chen <peter.chen@freescale.com> >>> Acked-by: Felipe Balbi <balbi@ti.com> >>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> >>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> >> >> any chance you can move away from {write,read}[bwl]_relaxed() so we can >> build this driver on other architectures ? > > The hardware is in the ARM imx2{2,8} only. Another option would be to > add an "depends on ARCH_ARM". Doesn't mean that we shouldn't be able to compile-test the driver. Regards, -- Alex
On 02/28/2013 10:40 AM, Alexander Shishkin wrote: > Marc Kleine-Budde <mkl@pengutronix.de> writes: > >> On 02/28/2013 09:01 AM, Felipe Balbi wrote: >>> hi, >>> >>> On Wed, Feb 27, 2013 at 03:16:30PM +0100, Marc Kleine-Budde wrote: >>>> From: Sascha Hauer <s.hauer@pengutronix.de> >>>> >>>> We now have usb_add_phy_dev(), so use it to register with the framework >>>> to be able to find the phy from the USB driver. >>>> >>>> Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com> >>>> Reviewed-by: Peter Chen <peter.chen@freescale.com> >>>> Acked-by: Felipe Balbi <balbi@ti.com> >>>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> >>>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> >>> >>> any chance you can move away from {write,read}[bwl]_relaxed() so we can >>> build this driver on other architectures ? >> >> The hardware is in the ARM imx2{2,8} only. Another option would be to >> add an "depends on ARCH_ARM". > > Doesn't mean that we shouldn't be able to compile-test the driver. Fixed in the just posted otg-for-v3.10-v2 series. Marc
On Thu, Feb 28, 2013 at 10:23:03AM +0100, Marc Kleine-Budde wrote: > On 02/28/2013 08:57 AM, Felipe Balbi wrote: > > On Wed, Feb 27, 2013 at 03:16:29PM +0100, Marc Kleine-Budde wrote: > >> From: Michael Grzeschik <m.grzeschik@pengutronix.de> > >> > >> This adds two little devicetree helper functions for determining the dr_mode > >> (host, peripheral, otg, dual-role) and phy_type (utmi, ulpi,...) from the > >> devicetree. > >> > >> Cc: Felipe Balbi <balbi@ti.com> > >> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> > >> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > >> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > > > > causes build breakage: > > > > include/linux/usb/of.h:21:32: error: return type is an incomplete type > > include/linux/usb/of.h: In function ‘of_usb_get_dr_mode’: > > include/linux/usb/of.h:23:9: error: ‘USB_DR_MODE_UNKNOWN’ undeclared (first use in this function) > > include/linux/usb/of.h:23:9: note: each undeclared identifier is reported only once for each function it appears in > > include/linux/usb/of.h:23:2: warning: ‘return’ with a value, in function returning void [enabled by default] > > make[1]: *** [drivers/usb/usb-common.o] Error 1 > > Doh! That occurs only for non DT kernels, but who doesn't use device > tree these days? x86 and a bunch of ARM-SoC which haven't been converted yet