usb: phy: cleanups to Kconfig and directories
Subsystems (7)
cover usb: phy: cleanups to Kconfig and directories
Hi folks,
inspired by Paul's DWC2 patchset which added usb_otg_state_string() (a copy of otg_state_string()) I have now renamed otg_state_string() to usb_otg_state_string(), moved it to usb-common, then moved all phy drivers to drivers/usb/phy/ and completely deleted the otg directory.
We're also removing CONFIG_USB_OTG_UTILS since that has lots its meaning long ago.
I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
Felipe Balbi (10):
usb: otg: prefix otg_state_string with usb_
usb: otg: move usb_otg_state_string to usb-common.c
usb: phy: convert EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
usb: phy: move all PHY drivers to drivers/usb/phy/
usb: phy: make it a menuconfig
usb: power: pda_power: check against CONFIG_USB_PHY
usb: gadget: mv_udc_core: check against CONFIG_USB_PHY
usb: ehci: marvel: check against CONFIG_USB_PHY
usb: ehci: tegra: check against CONFIG_USB_PHY
usb: phy: remove CONFIG_USB_OTG_UTILS
drivers/Makefile | 2 +-
drivers/power/pda_power.c | 14 +--
drivers/usb/Kconfig | 2 -
drivers/usb/Makefile | 2 -
drivers/usb/gadget/mv_udc_core.c | 2 +-
drivers/usb/host/ehci-mv.c | 4 +-
drivers/usb/host/ehci-tegra.c | 6 +-
drivers/usb/musb/am35x.c | 8 +-
drivers/usb/musb/blackfin.c | 6 +-
drivers/usb/musb/da8xx.c | 8 +-
drivers/usb/musb/davinci.c | 4 +-
drivers/usb/musb/musb_core.c | 39 ++++----
drivers/usb/musb/musb_dsps.c | 8 +-
drivers/usb/musb/musb_gadget.c | 8 +-
drivers/usb/musb/musb_host.c | 2 +-
drivers/usb/musb/musb_virthub.c | 4 +-
drivers/usb/musb/omap2430.c | 6 +-
drivers/usb/musb/tusb6010.c | 14 +--
drivers/usb/otg/Kconfig | 141 --------------------------
drivers/usb/otg/Makefile | 24 -----
drivers/usb/otg/otg.c | 47 ---------
drivers/usb/phy/Kconfig | 166 ++++++++++++++++++++++++++-----
drivers/usb/phy/Makefile | 26 ++++-
drivers/usb/{otg => phy}/ab8500-usb.c | 0
drivers/usb/{otg => phy}/fsl_otg.c | 2 +-
drivers/usb/{otg => phy}/fsl_otg.h | 0
drivers/usb/{otg => phy}/gpio_vbus.c | 0
drivers/usb/{otg => phy}/isp1301_omap.c | 6 +-
drivers/usb/{otg => phy}/msm_otg.c | 0
drivers/usb/{otg => phy}/mv_otg.c | 0
drivers/usb/{otg => phy}/mv_otg.h | 0
drivers/usb/{otg => phy}/mxs-phy.c | 0
drivers/usb/{otg => phy}/nop-usb-xceiv.c | 0
drivers/usb/{otg => phy}/otg_fsm.c | 2 +-
drivers/usb/{otg => phy}/otg_fsm.h | 0
drivers/usb/phy/phy.c | 20 ++--
drivers/usb/{otg => phy}/twl4030-usb.c | 0
drivers/usb/{otg => phy}/twl6030-usb.c | 0
drivers/usb/{otg => phy}/ulpi.c | 0
drivers/usb/{otg => phy}/ulpi_viewport.c | 0
drivers/usb/usb-common.c | 26 +++++
include/linux/usb/otg.h | 9 +-
include/linux/usb/phy.h | 2 +-
43 files changed, 274 insertions(+), 336 deletions(-)
delete mode 100644 drivers/usb/otg/Kconfig
delete mode 100644 drivers/usb/otg/Makefile
delete mode 100644 drivers/usb/otg/otg.c
rename drivers/usb/{otg => phy}/ab8500-usb.c (100%)
rename drivers/usb/{otg => phy}/fsl_otg.c (99%)
rename drivers/usb/{otg => phy}/fsl_otg.h (100%)
rename drivers/usb/{otg => phy}/gpio_vbus.c (100%)
rename drivers/usb/{otg => phy}/isp1301_omap.c (99%)
rename drivers/usb/{otg => phy}/msm_otg.c (100%)
rename drivers/usb/{otg => phy}/mv_otg.c (100%)
rename drivers/usb/{otg => phy}/mv_otg.h (100%)
rename drivers/usb/{otg => phy}/mxs-phy.c (100%)
rename drivers/usb/{otg => phy}/nop-usb-xceiv.c (100%)
rename drivers/usb/{otg => phy}/otg_fsm.c (99%)
rename drivers/usb/{otg => phy}/otg_fsm.h (100%)
rename drivers/usb/{otg => phy}/twl4030-usb.c (100%)
rename drivers/usb/{otg => phy}/twl6030-usb.c (100%)
rename drivers/usb/{otg => phy}/ulpi.c (100%)
rename drivers/usb/{otg => phy}/ulpi_viewport.c (100%)Signature · 1 line
1.8.1.rc1.5.g7e0651a
PATCH 1/10 usb: otg: prefix otg_state_string with usb_
all other functions under drivers/usb/ start
with usb_, let's do the same thing.
This patch is in preparation for moving otg_state_string to usb-common.c and deleting otg.c completely.
--- drivers/usb/musb/am35x.c | 8 ++++---- drivers/usb/musb/blackfin.c | 6 +++--- drivers/usb/musb/da8xx.c | 8 ++++---- drivers/usb/musb/davinci.c | 4 ++-- drivers/usb/musb/musb_core.c | 39 ++++++++++++++++++++------------------- drivers/usb/musb/musb_dsps.c | 8 ++++---- drivers/usb/musb/musb_gadget.c | 8 ++++---- drivers/usb/musb/musb_host.c | 2 +- drivers/usb/musb/musb_virthub.c | 4 ++-- drivers/usb/musb/omap2430.c | 6 +++--- drivers/usb/musb/tusb6010.c | 14 +++++++------- drivers/usb/otg/fsl_otg.c | 2 +- drivers/usb/otg/isp1301_omap.c | 6 +++--- drivers/usb/otg/otg.c | 4 ++-- drivers/usb/otg/otg_fsm.c | 2 +- include/linux/usb/otg.h | 4 ++-- 16 files changed, 63 insertions(+), 62 deletions(-)
drivers/usb/musb/am35x.c +4 -4
@@ -149,7 +149,7 @@ static void otg_timer(unsigned long _musb)*/ devctl =musb_readb (mregs,MUSB_DEVCTL );dev_dbg (musb->controller,"Poll devctl %02x (%s)\n" , devctl, -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));spin_lock_irqsave (&musb->lock, flags);switch (musb->xceiv->state) {
@@ -195,7 +195,7 @@ static void am35x_musb_try_idle(struct musb *musb, unsigned long timeout)if (musb->is_active || (musb->a_wait_bcon ==0 && musb->xceiv->state ==OTG_STATE_A_WAIT_BCON )) {dev_dbg (musb->controller,"%s active, deleting timer\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));del_timer (&otg_workaround); last_timer = jiffies;return ;
@@ -208,7 +208,7 @@ static void am35x_musb_try_idle(struct musb *musb, unsigned long timeout) last_timer = timeout;dev_dbg (musb->controller,"%s inactive, starting idle timer for %u ms\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state),jiffies_to_msecs (timeout - jiffies));mod_timer (&otg_workaround, timeout); }
@@ -298,7 +298,7 @@ static irqreturn_t am35x_musb_interrupt(int irq, void *hci)/* NOTE: this must complete power-on within 100 ms. */ dev_dbg (musb->controller,"VBUS %s (%s)%s, devctl %02x\n" , drvvbus ?"on" :"off" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state), err ?" ERROR" :"" , devctl); ret =IRQ_HANDLED ;
drivers/usb/musb/blackfin.c +3 -3
@@ -280,13 +280,13 @@ static void musb_conn_timer_handler(unsigned long _musb)break ;default :dev_dbg (musb->controller,"%s state not handled\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));break ; }spin_unlock_irqrestore (&musb->lock, flags);dev_dbg (musb->controller,"state is %s\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); }static void bfin_musb_enable (struct musb *musb)
@@ -307,7 +307,7 @@ static void bfin_musb_set_vbus(struct musb *musb, int is_on)dev_dbg (musb->controller,"VBUS %s, devctl %02x " /* otg %3x conf %08x prcm %08x */ "\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state),musb_readb (musb->mregs,MUSB_DEVCTL )); }
drivers/usb/musb/da8xx.c +4 -4
@@ -198,7 +198,7 @@ static void otg_timer(unsigned long _musb)*/ devctl =musb_readb (mregs,MUSB_DEVCTL );dev_dbg (musb->controller,"Poll devctl %02x (%s)\n" , devctl, -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));spin_lock_irqsave (&musb->lock, flags);switch (musb->xceiv->state) {
@@ -267,7 +267,7 @@ static void da8xx_musb_try_idle(struct musb *musb, unsigned long timeout)if (musb->is_active || (musb->a_wait_bcon ==0 && musb->xceiv->state ==OTG_STATE_A_WAIT_BCON )) {dev_dbg (musb->controller,"%s active, deleting timer\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));del_timer (&otg_workaround); last_timer = jiffies;return ;
@@ -280,7 +280,7 @@ static void da8xx_musb_try_idle(struct musb *musb, unsigned long timeout) last_timer = timeout;dev_dbg (musb->controller,"%s inactive, starting idle timer for %u ms\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state),jiffies_to_msecs (timeout - jiffies));mod_timer (&otg_workaround, timeout); }
@@ -360,7 +360,7 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)dev_dbg (musb->controller,"VBUS %s (%s)%s, devctl %02x\n" , drvvbus ?"on" :"off" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state), err ?" ERROR" :"" , devctl); ret =IRQ_HANDLED ;
drivers/usb/musb/davinci.c +2 -2
@@ -215,7 +215,7 @@ static void otg_timer(unsigned long _musb)*/ devctl =musb_readb (mregs,MUSB_DEVCTL );dev_dbg (musb->controller,"poll devctl %02x (%s)\n" , devctl, -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));spin_lock_irqsave (&musb->lock, flags);switch (musb->xceiv->state) {
@@ -349,7 +349,7 @@ static irqreturn_t davinci_musb_interrupt(int irq, void *__hci)davinci_musb_source_power (musb, drvvbus,0 );dev_dbg (musb->controller,"VBUS %s (%s)%s, devctl %02x\n" , drvvbus ?"on" :"off" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state), err ?" ERROR" :"" , devctl); retval =IRQ_HANDLED ;
drivers/usb/musb/musb_core.c +20 -19
@@ -372,13 +372,13 @@ static void musb_otg_timer_func(unsigned long data)case OTG_STATE_A_SUSPEND :case OTG_STATE_A_WAIT_BCON :dev_dbg (musb->controller,"HNP: %s timeout\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));musb_platform_set_vbus (musb,0 ); musb->xceiv->state =OTG_STATE_A_WAIT_VFALL ;break ;default :dev_dbg (musb->controller,"HNP: Unhandled mode %s\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); } musb->ignore_disconnect =0 ;spin_unlock_irqrestore (&musb->lock, flags);
@@ -393,13 +393,14 @@ void musb_hnp_stop(struct musb *musb)void __iomem *mbase = musb->mregs;u8 reg; -dev_dbg (musb->controller,"HNP: stop from %s\n" ,otg_state_string (musb->xceiv->state)); +dev_dbg (musb->controller,"HNP: stop from %s\n" , +usb_otg_state_string (musb->xceiv->state));switch (musb->xceiv->state) {case OTG_STATE_A_PERIPHERAL :musb_g_disconnect (musb);dev_dbg (musb->controller,"HNP: back to %s\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));break ;case OTG_STATE_B_HOST :dev_dbg (musb->controller,"HNP: Disabling HR\n" );
@@ -413,7 +414,7 @@ void musb_hnp_stop(struct musb *musb)break ;default :dev_dbg (musb->controller,"HNP: Stopping in unknown state %s\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); }/*
@@ -451,7 +452,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,*/ if (int_usb &MUSB_INTR_RESUME ) { handled =IRQ_HANDLED ; -dev_dbg (musb->controller,"RESUME (%s)\n" ,otg_state_string (musb->xceiv->state)); +dev_dbg (musb->controller,"RESUME (%s)\n" ,usb_otg_state_string (musb->xceiv->state));if (devctl &MUSB_DEVCTL_HM ) {void __iomem *mbase = musb->mregs;
@@ -493,7 +494,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,default :WARNING ("bogus %s RESUME (%s)\n" ,"host" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); } }else {switch (musb->xceiv->state) {
@@ -522,7 +523,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,default :WARNING ("bogus %s RESUME (%s)\n" ,"peripheral" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); } } }
@@ -538,7 +539,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, }dev_dbg (musb->controller,"SESSION_REQUEST (%s)\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));/* IRQ arrives from ID pin sense or (later, if VBUS power * is removed) SRP. responses are time critical:
@@ -603,7 +604,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, } dev_dbg(musb->controller, "VBUS_ERROR in %s (%02x, %s), retry #%d, port1 %08x\n", - otg_state_string(musb->xceiv->state), + usb_otg_state_string(musb->xceiv->state), devctl, ({ char *s; switch (devctl & MUSB_DEVCTL_VBUS) {
@@ -628,7 +629,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,if (int_usb &MUSB_INTR_SUSPEND ) {dev_dbg (musb->controller,"SUSPEND (%s) devctl %02x\n" , -otg_state_string (musb->xceiv->state), devctl); +usb_otg_state_string (musb->xceiv->state), devctl); handled =IRQ_HANDLED ;switch (musb->xceiv->state) {
@@ -745,12 +746,12 @@ b_host:usb_hcd_resume_root_hub (hcd);dev_dbg (musb->controller,"CONNECT (%s) devctl %02x\n" , -otg_state_string (musb->xceiv->state), devctl); +usb_otg_state_string (musb->xceiv->state), devctl); }if ((int_usb &MUSB_INTR_DISCONNECT ) && !musb->ignore_disconnect) {dev_dbg (musb->controller,"DISCONNECT (%s) as %s, devctl %02x\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state),MUSB_MODE (musb), devctl); handled =IRQ_HANDLED ;
@@ -787,7 +788,7 @@ b_host:break ;default :WARNING ("unhandled DISCONNECT transition (%s)\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));break ; } }
@@ -813,7 +814,7 @@ b_host: } }else {dev_dbg (musb->controller,"BUS RESET as %s\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));switch (musb->xceiv->state) {case OTG_STATE_A_SUSPEND :/* We need to ignore disconnect on suspend
@@ -826,7 +827,7 @@ b_host:case OTG_STATE_A_WAIT_BCON :/* OPT TD.4.7-900ms */ /* never use invalid T(a_wait_bcon) */ dev_dbg (musb->controller,"HNP: in %s, %d msec timeout\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state),TA_WAIT_BCON (musb));mod_timer (&musb->otg_timer, jiffies +msecs_to_jiffies (TA_WAIT_BCON (musb)));
@@ -838,7 +839,7 @@ b_host:break ;case OTG_STATE_B_WAIT_ACON :dev_dbg (musb->controller,"HNP: RESET (%s), to b_peripheral\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); musb->xceiv->state =OTG_STATE_B_PERIPHERAL ;musb_g_reset (musb);break ;
@@ -850,7 +851,7 @@ b_host:break ;default :dev_dbg (musb->controller,"Unhandled BUS RESET as %s\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); } } }
@@ -1634,7 +1635,7 @@ musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf)int ret = -EINVAL ;spin_lock_irqsave (&musb->lock, flags); - ret =sprintf (buf,"%s\n" ,otg_state_string (musb->xceiv->state)); + ret =sprintf (buf,"%s\n" ,usb_otg_state_string (musb->xceiv->state));spin_unlock_irqrestore (&musb->lock, flags);return ret;
drivers/usb/musb/musb_dsps.c +4 -4
@@ -225,7 +225,7 @@ static void otg_timer(unsigned long _musb)*/ devctl =dsps_readb (mregs,MUSB_DEVCTL );dev_dbg (musb->controller,"Poll devctl %02x (%s)\n" , devctl, -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));spin_lock_irqsave (&musb->lock, flags);switch (musb->xceiv->state) {
@@ -274,7 +274,7 @@ static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout)if (musb->is_active || (musb->a_wait_bcon ==0 && musb->xceiv->state ==OTG_STATE_A_WAIT_BCON )) {dev_dbg (musb->controller,"%s active, deleting timer\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));del_timer (&glue->timer[pdev->id]); glue->last_timer[pdev->id] = jiffies;return ;
@@ -289,7 +289,7 @@ static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout) glue->last_timer[pdev->id] = timeout;dev_dbg (musb->controller,"%s inactive, starting idle timer for %u ms\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state),jiffies_to_msecs (timeout - jiffies));mod_timer (&glue->timer[pdev->id], timeout); }
@@ -378,7 +378,7 @@ static irqreturn_t dsps_interrupt(int irq, void *hci)/* NOTE: this must complete power-on within 100 ms. */ dev_dbg (musb->controller,"VBUS %s (%s)%s, devctl %02x\n" , drvvbus ?"on" :"off" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state), err ?" ERROR" :"" , devctl); ret =IRQ_HANDLED ;
drivers/usb/musb/musb_gadget.c +4 -4
@@ -1519,7 +1519,7 @@ static int musb_gadget_wakeup(struct usb_gadget *gadget) goto done;default :dev_dbg (musb->controller,"Unhandled wake: %s\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); goto done; }
@@ -1918,7 +1918,7 @@ void musb_g_resume(struct musb *musb)break ;default :WARNING ("unhandled RESUME transition (%s)\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); } }
@@ -1948,7 +1948,7 @@ void musb_g_suspend(struct musb *musb)* A_PERIPHERAL may need care too */ WARNING ("unhandled SUSPEND transition (%s)\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); } }
@@ -1982,7 +1982,7 @@ void musb_g_disconnect(struct musb *musb)switch (musb->xceiv->state) {default :dev_dbg (musb->controller,"Unhandled disconnect %s, setting a_idle\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); musb->xceiv->state =OTG_STATE_A_IDLE ;MUSB_HST_MODE (musb);break ;
drivers/usb/musb/musb_host.c +1 -1
@@ -2453,7 +2453,7 @@ static int musb_bus_suspend(struct usb_hcd *hcd)if (musb->is_active) {WARNING ("trying to suspend as %s while active\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));return -EBUSY ; }else return 0 ;
drivers/usb/musb/musb_virthub.c +2 -2
@@ -95,7 +95,7 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend)break ;default :dev_dbg (musb->controller,"bogus rh suspend? %s\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); } }else if (power &MUSB_POWER_SUSPENDM ) { power &= ~MUSB_POWER_SUSPENDM ;
@@ -203,7 +203,7 @@ void musb_root_disconnect(struct musb *musb)break ;default :dev_dbg (musb->controller,"host disconnect (%s)\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); } }
drivers/usb/musb/omap2430.c +3 -3
@@ -117,7 +117,7 @@ static void omap2430_musb_try_idle(struct musb *musb, unsigned long timeout)if (musb->is_active || ((musb->a_wait_bcon ==0 ) && (musb->xceiv->state ==OTG_STATE_A_WAIT_BCON ))) {dev_dbg (musb->controller,"%s active, deleting timer\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));del_timer (&musb_idle_timer); last_timer = jiffies;return ;
@@ -134,7 +134,7 @@ static void omap2430_musb_try_idle(struct musb *musb, unsigned long timeout) last_timer = timeout;dev_dbg (musb->controller,"%s inactive, for idle timer for %lu ms\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state), (unsigned long )jiffies_to_msecs (timeout - jiffies));mod_timer (&musb_idle_timer, timeout); }
@@ -200,7 +200,7 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on)dev_dbg (musb->controller,"VBUS %s, devctl %02x " /* otg %3x conf %08x prcm %08x */ "\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state),musb_readb (musb->mregs,MUSB_DEVCTL )); }
drivers/usb/musb/tusb6010.c +7 -7
@@ -423,7 +423,7 @@ static void musb_do_idle(unsigned long _musb) && (musb->idle_timeout == 0 || time_after(jiffies, musb->idle_timeout))) {dev_dbg (musb->controller,"Nothing connected %s, turning off VBUS\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state)); }/* FALLTHROUGH */ case OTG_STATE_A_IDLE :
@@ -478,7 +478,7 @@ static void tusb_musb_try_idle(struct musb *musb, unsigned long timeout)if (musb->is_active || ((musb->a_wait_bcon ==0 ) && (musb->xceiv->state ==OTG_STATE_A_WAIT_BCON ))) {dev_dbg (musb->controller,"%s active, deleting timer\n" , -otg_state_string (musb->xceiv->state)); +usb_otg_state_string (musb->xceiv->state));del_timer (&musb_idle_timer); last_timer = jiffies;return ;
@@ -495,7 +495,7 @@ static void tusb_musb_try_idle(struct musb *musb, unsigned long timeout) last_timer = timeout;dev_dbg (musb->controller,"%s inactive, for idle timer for %lu ms\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state), (unsigned long )jiffies_to_msecs (timeout - jiffies));mod_timer (&musb_idle_timer, timeout); }
@@ -571,7 +571,7 @@ static void tusb_musb_set_vbus(struct musb *musb, int is_on)musb_writeb (musb->mregs,MUSB_DEVCTL , devctl);dev_dbg (musb->controller,"VBUS %s, devctl %02x otg %3x conf %08x prcm %08x\n" , -otg_state_string (musb->xceiv->state), +usb_otg_state_string (musb->xceiv->state),musb_readb (musb->mregs,MUSB_DEVCTL ),musb_readl (tbase,TUSB_DEV_OTG_STAT ), conf, prcm);
@@ -678,13 +678,13 @@ tusb_otg_ints(struct musb *musb, u32 int_src, void __iomem *tbase) musb->is_active =0 ; }dev_dbg (musb->controller,"vbus change, %s, otg %03x\n" , -otg_state_string (musb->xceiv->state), otg_stat); +usb_otg_state_string (musb->xceiv->state), otg_stat); idle_timeout = jiffies + (1 *HZ );schedule_work (&musb->irq_work); }else /* A-dev state machine */ {dev_dbg (musb->controller,"vbus change, %s, otg %03x\n" , -otg_state_string (musb->xceiv->state), otg_stat); +usb_otg_state_string (musb->xceiv->state), otg_stat);switch (musb->xceiv->state) {case OTG_STATE_A_IDLE :
@@ -733,7 +733,7 @@ tusb_otg_ints(struct musb *musb, u32 int_src, void __iomem *tbase)u8 devctl;dev_dbg (musb->controller,"%s timer, %03x\n" , -otg_state_string (musb->xceiv->state), otg_stat); +usb_otg_state_string (musb->xceiv->state), otg_stat);switch (musb->xceiv->state) {case OTG_STATE_A_WAIT_VRISE :
drivers/usb/otg/fsl_otg.c +1 -1
@@ -992,7 +992,7 @@ static int show_fsl_usb2_otg_state(struct device *dev,/* State */ t =scnprintf (next, size,"OTG state: %s\n\n" , -otg_state_string (fsl_otg_dev->phy.state)); +usb_otg_state_string (fsl_otg_dev->phy.state)); size -= t; next += t;
drivers/usb/otg/isp1301_omap.c +3 -3
@@ -236,7 +236,7 @@ isp1301_clear_bits(struct isp1301 *isp, u8 reg, u8 bits)static inline const char *state_name (struct isp1301 *isp) { -return otg_state_string (isp->phy.state); +return usb_otg_state_string (isp->phy.state); }/*-------------------------------------------------------------------------*/
@@ -481,7 +481,7 @@ static void check_state(struct isp1301 *isp, const char *tag)if (isp->phy.state == state && !extra)return ;pr_debug ("otg: %s FSM %s/%02x, %s, %06x\n" , tag, -otg_state_string (state), fsm,state_name (isp), +usb_otg_state_string (state), fsm,state_name (isp),omap_readl (OTG_CTRL )); }
@@ -1077,7 +1077,7 @@ static void isp_update_otg(struct isp1301 *isp, u8 stat)if (state != isp->phy.state)pr_debug (" isp, %s -> %s\n" , -otg_state_string (state),state_name (isp)); +usb_otg_state_string (state),state_name (isp));#ifdef CONFIG_USB_OTG /* update the OTG controller state to match the isp1301; may
drivers/usb/otg/otg.c +2 -2
@@ -11,7 +11,7 @@#include <linux/export.h> #include <linux/usb/otg.h> -const char *otg_state_string (enum usb_otg_state state) +const char *usb_otg_state_string (enum usb_otg_state state) {switch (state) {case OTG_STATE_A_IDLE :
@@ -44,4 +44,4 @@ const char *otg_state_string(enum usb_otg_state state)return "UNDEFINED" ; } } -EXPORT_SYMBOL (otg_state_string); +EXPORT_SYMBOL (usb_otg_state_string);
drivers/usb/otg/otg_fsm.c +1 -1
@@ -119,7 +119,7 @@ int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state) state_changed =1 ;if (fsm->otg->phy->state == new_state)return 0 ; -VDBG ("Set state: %s\n" ,otg_state_string (new_state)); +VDBG ("Set state: %s\n" ,usb_otg_state_string (new_state));otg_leave_state (fsm, fsm->otg->phy->state);switch (new_state) {case OTG_STATE_B_IDLE :
include/linux/usb/otg.h +2 -2
@@ -37,9 +37,9 @@ struct usb_otg { };#ifdef CONFIG_USB_OTG_UTILS -extern const char *otg_state_string (enum usb_otg_state state); +extern const char *usb_otg_state_string (enum usb_otg_state state);#else -static inline const char *otg_state_string (enum usb_otg_state state) +static inline const char *usb_otg_state_string (enum usb_otg_state state) {return NULL ; }
Signature · 1 line
1.8.1.rc1.5.g7e0651a
PATCH 2/10 usb: otg: move usb_otg_state_string to usb-common.c
In reply to Felipe Balbiotg.c only had a single function definition
which might make more sense to be placed inusb-common.c. While doing that, we also deleteotg.c since it's now empty.
--- drivers/usb/otg/Makefile | 3 --- drivers/usb/otg/otg.c | 47 ----------------------------------------------- drivers/usb/usb-common.c | 26 ++++++++++++++++++++++++++ include/linux/usb/otg.h | 7 ------- 4 files changed, 26 insertions(+), 57 deletions(-) delete mode 100644 drivers/usb/otg/otg.c
drivers/usb/otg/Makefile +0 -3
@@ -5,9 +5,6 @@ ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG ccflags-$(CONFIG_USB_GADGET_DEBUG) += -DDEBUG -# infrastructure -obj-$(CONFIG_USB_OTG_UTILS) += otg.o - # transceiver drivers obj-$(CONFIG_USB_GPIO_VBUS) += gpio_vbus.o obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
drivers/usb/otg/otg.c deleted +0 -47
47 lines not on this page · raw message
drivers/usb/usb-common.c +26 -0
@@ -14,6 +14,32 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/usb/ch9.h> +#include <linux/usb/otg.h> + +const char *usb_otg_state_string (enum usb_otg_state state) +{ +static const char *const names[] = { + [OTG_STATE_A_IDLE ] ="a_idle" , + [OTG_STATE_A_WAIT_VRISE ] ="a_wait_vrise" , + [OTG_STATE_A_WAIT_BCON ] ="a_wait_bcon" , + [OTG_STATE_A_HOST ] ="a_host" , + [OTG_STATE_A_SUSPEND ] ="a_suspend" , + [OTG_STATE_A_PERIPHERAL ] ="a_peripheral" , + [OTG_STATE_A_WAIT_VFALL ] ="a_wait_vfall" , + [OTG_STATE_A_VBUS_ERR ] ="a_vbus_err" , + [OTG_STATE_B_IDLE ] ="b_idle" , + [OTG_STATE_B_SRP_INIT ] ="b_srp_init" , + [OTG_STATE_B_PERIPHERAL ] ="b_peripheral" , + [OTG_STATE_B_WAIT_ACON ] ="b_wait_acon" , + [OTG_STATE_B_HOST ] ="b_host" , + }; + +if (state <0 || state >=ARRAY_SIZE (names)) +return "UNDEFINED" ; + +return names[state]; +} +EXPORT_SYMBOL_GPL (usb_otg_state_string);const char *usb_speed_string (enum usb_device_speed speed) {
include/linux/usb/otg.h +0 -7
@@ -36,14 +36,7 @@ struct usb_otg { }; -#ifdef CONFIG_USB_OTG_UTILS extern const char *usb_otg_state_string (enum usb_otg_state state); -#else -static inline const char *usb_otg_state_string (enum usb_otg_state state) -{ -return NULL ; -} -#endif /* Context: can sleep */ static inline int
Signature · 1 line
1.8.1.rc1.5.g7e0651a
PATCH 3/10 usb: phy: convert EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
In reply to Felipe Balbiwe only want GPL users for our generic functions,
so let's switch over to EXPORT_SYMBOL_GPL.
--- drivers/usb/phy/phy.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/usb/phy/phy.c +10 -10
@@ -109,7 +109,7 @@ struct usb_phy *devm_usb_get_phy(struct device *dev, enum usb_phy_type type)return phy; } -EXPORT_SYMBOL (devm_usb_get_phy); +EXPORT_SYMBOL_GPL (devm_usb_get_phy);/** * usb_get_phy - find the USB PHY
@@ -142,7 +142,7 @@ err0:return phy; } -EXPORT_SYMBOL (usb_get_phy); +EXPORT_SYMBOL_GPL (usb_get_phy);/** * devm_usb_get_phy_by_phandle - find the USB PHY by phandle
@@ -206,7 +206,7 @@ err0:return phy; } -EXPORT_SYMBOL (devm_usb_get_phy_by_phandle); +EXPORT_SYMBOL_GPL (devm_usb_get_phy_by_phandle);/** * usb_get_phy_dev - find the USB PHY
@@ -239,7 +239,7 @@ err0:return phy; } -EXPORT_SYMBOL (usb_get_phy_dev); +EXPORT_SYMBOL_GPL (usb_get_phy_dev);/** * devm_usb_get_phy_dev - find the USB PHY using device ptr and index
@@ -269,7 +269,7 @@ struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)return phy; } -EXPORT_SYMBOL (devm_usb_get_phy_dev); +EXPORT_SYMBOL_GPL (devm_usb_get_phy_dev);/** * devm_usb_put_phy - release the USB PHY
@@ -288,7 +288,7 @@ void devm_usb_put_phy(struct device *dev, struct usb_phy *phy) r =devres_destroy (dev, devm_usb_phy_release, devm_usb_phy_match, phy);dev_WARN_ONCE (dev, r,"couldn't find PHY resource\n" ); } -EXPORT_SYMBOL (devm_usb_put_phy); +EXPORT_SYMBOL_GPL (devm_usb_put_phy);/** * usb_put_phy - release the USB PHY
@@ -307,7 +307,7 @@ void usb_put_phy(struct usb_phy *x)module_put (owner); } } -EXPORT_SYMBOL (usb_put_phy); +EXPORT_SYMBOL_GPL (usb_put_phy);/** * usb_add_phy - declare the USB PHY
@@ -347,7 +347,7 @@ out:spin_unlock_irqrestore (&phy_lock, flags);return ret; } -EXPORT_SYMBOL (usb_add_phy); +EXPORT_SYMBOL_GPL (usb_add_phy);/** * usb_add_phy_dev - declare the USB PHY
@@ -377,7 +377,7 @@ int usb_add_phy_dev(struct usb_phy *x)spin_unlock_irqrestore (&phy_lock, flags);return 0 ; } -EXPORT_SYMBOL (usb_add_phy_dev); +EXPORT_SYMBOL_GPL (usb_add_phy_dev);/** * usb_remove_phy - remove the OTG PHY
@@ -399,7 +399,7 @@ void usb_remove_phy(struct usb_phy *x) }spin_unlock_irqrestore (&phy_lock, flags); } -EXPORT_SYMBOL (usb_remove_phy); +EXPORT_SYMBOL_GPL (usb_remove_phy);/** * usb_bind_phy - bind the phy and the controller that uses the phy
Signature · 1 line
1.8.1.rc1.5.g7e0651a
PATCH 4/10 usb: phy: move all PHY drivers to drivers/usb/phy/
In reply to Felipe Balbithat's a much more reasonable location for those drivers. It helps us saving drivers/usb/otg/ for when we actually start adding generic OTG code.
Also completely delete drivers/usb/otg/ as there's nothing left there.
---
drivers/usb/Kconfig | 2 -
drivers/usb/Makefile | 2 -
drivers/usb/otg/Kconfig | 141 --------------------------
drivers/usb/otg/Makefile | 21 ----
drivers/usb/phy/Kconfig | 168 +++++++++++++++++++++++++++----
drivers/usb/phy/Makefile | 24 ++++-
drivers/usb/{otg => phy}/ab8500-usb.c | 0
drivers/usb/{otg => phy}/fsl_otg.c | 0
drivers/usb/{otg => phy}/fsl_otg.h | 0
drivers/usb/{otg => phy}/gpio_vbus.c | 0
drivers/usb/{otg => phy}/isp1301_omap.c | 0
drivers/usb/{otg => phy}/msm_otg.c | 0
drivers/usb/{otg => phy}/mv_otg.c | 0
drivers/usb/{otg => phy}/mv_otg.h | 0
drivers/usb/{otg => phy}/mxs-phy.c | 0
drivers/usb/{otg => phy}/nop-usb-xceiv.c | 0
drivers/usb/{otg => phy}/otg_fsm.c | 0
drivers/usb/{otg => phy}/otg_fsm.h | 0
drivers/usb/{otg => phy}/twl4030-usb.c | 0
drivers/usb/{otg => phy}/twl6030-usb.c | 0
drivers/usb/{otg => phy}/ulpi.c | 0
drivers/usb/{otg => phy}/ulpi_viewport.c | 0
22 files changed, 171 insertions(+), 187 deletions(-)
delete mode 100644 drivers/usb/otg/Kconfig
delete mode 100644 drivers/usb/otg/Makefile
rename drivers/usb/{otg => phy}/ab8500-usb.c (100%)
rename drivers/usb/{otg => phy}/fsl_otg.c (100%)
rename drivers/usb/{otg => phy}/fsl_otg.h (100%)
rename drivers/usb/{otg => phy}/gpio_vbus.c (100%)
rename drivers/usb/{otg => phy}/isp1301_omap.c (100%)
rename drivers/usb/{otg => phy}/msm_otg.c (100%)
rename drivers/usb/{otg => phy}/mv_otg.c (100%)
rename drivers/usb/{otg => phy}/mv_otg.h (100%)
rename drivers/usb/{otg => phy}/mxs-phy.c (100%)
rename drivers/usb/{otg => phy}/nop-usb-xceiv.c (100%)
rename drivers/usb/{otg => phy}/otg_fsm.c (100%)
rename drivers/usb/{otg => phy}/otg_fsm.h (100%)
rename drivers/usb/{otg => phy}/twl4030-usb.c (100%)
rename drivers/usb/{otg => phy}/twl6030-usb.c (100%)
rename drivers/usb/{otg => phy}/ulpi.c (100%)
rename drivers/usb/{otg => phy}/ulpi_viewport.c (100%)drivers/usb/Kconfig +0 -2
@@ -186,6 +186,4 @@ source "drivers/usb/atm/Kconfig" source "drivers/usb/gadget/Kconfig" -source "drivers/usb/otg/Kconfig" - endif # USB_SUPPORT
drivers/usb/Makefile +0 -2
@@ -6,8 +6,6 @@ obj-$(CONFIG_USB) += core/ -obj-$(CONFIG_USB_OTG_UTILS) += otg/ - obj-$(CONFIG_USB_DWC3) += dwc3/ obj-$(CONFIG_USB_MON) += mon/
drivers/usb/otg/Kconfig deleted +0 -141
141 lines not on this page · raw message
drivers/usb/otg/Makefile deleted +0 -21
@@ -1,21 +0,0 @@ -# -# OTG infrastructure and transceiver drivers -# - -ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG -ccflags-$(CONFIG_USB_GADGET_DEBUG) += -DDEBUG - -# transceiver drivers -obj-$(CONFIG_USB_GPIO_VBUS) += gpio_vbus.o -obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o -obj-$(CONFIG_TWL4030_USB) += twl4030-usb.o -obj-$(CONFIG_TWL6030_USB) += twl6030-usb.o -obj-$(CONFIG_NOP_USB_XCEIV) += nop-usb-xceiv.o -obj-$(CONFIG_USB_ULPI) += ulpi.o -obj-$(CONFIG_USB_ULPI_VIEWPORT) += ulpi_viewport.o -obj-$(CONFIG_USB_MSM_OTG) += msm_otg.o -obj-$(CONFIG_AB8500_USB) += ab8500-usb.o -fsl_usb2_otg-objs := fsl_otg.o otg_fsm.o -obj-$(CONFIG_FSL_USB2_OTG) += fsl_usb2_otg.o -obj-$(CONFIG_USB_MXS_PHY) += mxs-phy.o -obj-$(CONFIG_USB_MV_OTG) += mv_otg.o
drivers/usb/phy/Kconfig +151 -17
194 lines not on this page · raw message
drivers/usb/phy/Makefile +20 -4
@@ -5,11 +5,27 @@ ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG obj-$(CONFIG_USB_OTG_UTILS) += phy.o + +# transceiver drivers, keep the list sorted + +obj-$(CONFIG_AB8500_USB) += ab8500-usb.o +fsl_usb2_otg-objs := fsl_otg.o otg_fsm.o +obj-$(CONFIG_FSL_USB2_OTG) += fsl_usb2_otg.o +obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o +obj-$(CONFIG_MV_U3D_PHY) += mv_u3d_phy.o +obj-$(CONFIG_NOP_USB_XCEIV) += nop-usb-xceiv.o +obj-$(CONFIG_OMAP_CONTROL_USB) += omap-control-usb.o obj-$(CONFIG_OMAP_USB2) += omap-usb2.o obj-$(CONFIG_OMAP_USB3) += omap-usb3.o -obj-$(CONFIG_OMAP_CONTROL_USB) += omap-control-usb.o +obj-$(CONFIG_SAMSUNG_USBPHY) += samsung-usbphy.o +obj-$(CONFIG_TWL4030_USB) += twl4030-usb.o +obj-$(CONFIG_TWL6030_USB) += twl6030-usb.o +obj-$(CONFIG_USB_EHCI_TEGRA) += tegra_usb_phy.o +obj-$(CONFIG_USB_GPIO_VBUS) += gpio_vbus.o obj-$(CONFIG_USB_ISP1301) += isp1301.o -obj-$(CONFIG_MV_U3D_PHY) += mv_u3d_phy.o -obj-$(CONFIG_USB_EHCI_TEGRA) += tegra_usb_phy.o +obj-$(CONFIG_USB_MSM_OTG) += msm_otg.o +obj-$(CONFIG_USB_MV_OTG) += mv_otg.o +obj-$(CONFIG_USB_MXS_PHY) += mxs-phy.o obj-$(CONFIG_USB_RCAR_PHY) += rcar-phy.o -obj-$(CONFIG_SAMSUNG_USBPHY) += samsung-usbphy.o +obj-$(CONFIG_USB_ULPI) += ulpi.o +obj-$(CONFIG_USB_ULPI_VIEWPORT) += ulpi_viewport.o
drivers/usb/phy/ab8500-usb.c renamed from drivers/usb/otg/ab8500-usb.c +0 -0
drivers/usb/phy/fsl_otg.c renamed from drivers/usb/otg/fsl_otg.c +0 -0
drivers/usb/phy/fsl_otg.h renamed from drivers/usb/otg/fsl_otg.h +0 -0
drivers/usb/phy/gpio_vbus.c renamed from drivers/usb/otg/gpio_vbus.c +0 -0
drivers/usb/phy/isp1301_omap.c renamed from drivers/usb/otg/isp1301_omap.c +0 -0
drivers/usb/phy/msm_otg.c renamed from drivers/usb/otg/msm_otg.c +0 -0
drivers/usb/phy/mv_otg.c renamed from drivers/usb/otg/mv_otg.c +0 -0
drivers/usb/phy/mv_otg.h renamed from drivers/usb/otg/mv_otg.h +0 -0
drivers/usb/phy/mxs-phy.c renamed from drivers/usb/otg/mxs-phy.c +0 -0
drivers/usb/phy/nop-usb-xceiv.c renamed from drivers/usb/otg/nop-usb-xceiv.c +0 -0
drivers/usb/phy/otg_fsm.c renamed from drivers/usb/otg/otg_fsm.c +0 -0
drivers/usb/phy/otg_fsm.h renamed from drivers/usb/otg/otg_fsm.h +0 -0
drivers/usb/phy/twl4030-usb.c renamed from drivers/usb/otg/twl4030-usb.c +0 -0
drivers/usb/phy/twl6030-usb.c renamed from drivers/usb/otg/twl6030-usb.c +0 -0
drivers/usb/phy/ulpi.c renamed from drivers/usb/otg/ulpi.c +0 -0
drivers/usb/phy/ulpi_viewport.c renamed from drivers/usb/otg/ulpi_viewport.c +0 -0
Signature · 1 line
1.8.1.rc1.5.g7e0651a
PATCH 5/10 usb: phy: make it a menuconfig
In reply to Felipe BalbiWe already have a considerable amount of USB PHY drivers, making it a menuconfig just prevents us from adding too much churn to USB's menuconfig.
While at that, also select USB_OTG_UTILS from this new menuconfig just to keep backwards compatibility until we manage to remove that symbol.
--- drivers/Makefile | 2 +- drivers/usb/phy/Kconfig | 17 ++++++++++++----- drivers/usb/phy/Makefile | 2 +- include/linux/usb/phy.h | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-)
drivers/Makefile +1 -1
@@ -79,7 +79,7 @@ obj-$(CONFIG_ATA_OVER_ETH) += block/aoe/ obj-$(CONFIG_PARIDE) += block/paride/ obj-$(CONFIG_TC) += tc/ obj-$(CONFIG_UWB) += uwb/ -obj-$(CONFIG_USB_OTG_UTILS) += usb/ +obj-$(CONFIG_USB_PHY) += usb/ obj-$(CONFIG_USB) += usb/ obj-$(CONFIG_PCI) += usb/ obj-$(CONFIG_USB_GADGET) += usb/
drivers/usb/phy/Kconfig +12 -5
@@ -1,8 +1,17 @@ # # Physical Layer USB driver configuration # -comment "USB Physical Layer drivers" - depends on USB || USB_GADGET +menuconfig USB_PHY + tristate "USB Physical Layer drivers" + select USB_OTG_UTILS + help + USB controllers (those which are host, device or DRD) need a + device to handle the physical layer signalling, commonly called + a PHY. + + The following drivers add support for such PHY devices. + +if USB_PHY config USB_OTG_UTILS bool
@@ -10,8 +19,6 @@ config USB_OTG_UTILS Select this to make sure the build includes objects from the OTG infrastructure directory. -if USB || USB_GADGET - # # USB Transceiver Drivers #
@@ -206,4 +213,4 @@ config USB_ULPI_VIEWPORT Provides read/write operations to the ULPI phy register set for controllers with a viewport register (e.g. Chipidea/ARC controllers). -endif # USB || OTG +endif # USB_PHY
drivers/usb/phy/Makefile +1 -1
@@ -4,7 +4,7 @@ ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG -obj-$(CONFIG_USB_OTG_UTILS) += phy.o +obj-$(CONFIG_USB_PHY) += phy.o # transceiver drivers, keep the list sorted
include/linux/usb/phy.h +1 -1
@@ -161,7 +161,7 @@ usb_phy_shutdown(struct usb_phy *x) }/* for usb host and peripheral controller drivers */ -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )extern struct usb_phy *usb_get_phy (enum usb_phy_type type);extern struct usb_phy *devm_usb_get_phy (struct device *dev,enum usb_phy_type type);
Signature · 1 line
1.8.1.rc1.5.g7e0651a
A message that is not in the archive (sent off-list or not yet received): 1362648969-13737-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org
PATCH 6/10 usb: power: pda_power: check against CONFIG_USB_PHY
CONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.
--- drivers/power/pda_power.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/power/pda_power.c +7 -7
@@ -35,7 +35,7 @@ static struct timer_list supply_timer;static struct timer_list polling_timer;static int polling; -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )static struct usb_phy *transceiver;static struct notifier_block otg_nb;#endif
@@ -218,7 +218,7 @@ static void polling_timer_func(unsigned long unused) jiffies + msecs_to_jiffies(pdata->polling_interval)); } -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )static int otg_is_usb_online (void ) { return (transceiver->last_event == USB_EVENT_VBUS ||
@@ -315,7 +315,7 @@ static int pda_power_probe(struct platform_device *pdev) pda_psy_usb.num_supplicants = pdata->num_supplicants; } -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY ) transceiver =usb_get_phy (USB_PHY_TYPE_USB2 );if (!IS_ERR_OR_NULL (transceiver)) {if (!pdata->is_usb_online)
@@ -367,7 +367,7 @@ static int pda_power_probe(struct platform_device *pdev) } } -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )if (!IS_ERR_OR_NULL (transceiver) && pdata->use_otg_notifier) { otg_nb.notifier_call = otg_handle_notification; ret =usb_register_notifier (transceiver, &otg_nb);
@@ -391,7 +391,7 @@ static int pda_power_probe(struct platform_device *pdev)return 0 ; -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY ) otg_reg_notifier_failed:if (pdata->is_usb_online && usb_irq)free_irq (usb_irq->start, &pda_psy_usb);
@@ -402,7 +402,7 @@ usb_irq_failed: usb_supply_failed:if (pdata->is_ac_online && ac_irq)free_irq (ac_irq->start, &pda_psy_ac); -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )if (!IS_ERR_OR_NULL (transceiver))usb_put_phy (transceiver);#endif
@@ -437,7 +437,7 @@ static int pda_power_remove(struct platform_device *pdev)power_supply_unregister (&pda_psy_usb);if (pdata->is_ac_online)power_supply_unregister (&pda_psy_ac); -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )if (!IS_ERR_OR_NULL (transceiver))usb_put_phy (transceiver);#endif
Signature · 6 lines
1.8.1.rc1.5.g7e0651a -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 8/10 usb: ehci: marvel: check against CONFIG_USB_PHY
In reply to a message not in the archiveCONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.
--- drivers/usb/host/ehci-mv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-mv.c +2 -2
@@ -240,7 +240,7 @@ static int mv_ehci_probe(struct platform_device *pdev) ehci_mv->mode = pdata->mode;if (ehci_mv->mode ==MV_USB_MODE_OTG ) { -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY ) ehci_mv->otg =devm_usb_get_phy (&pdev->dev,USB_PHY_TYPE_USB2 );if (IS_ERR_OR_NULL (ehci_mv->otg)) { dev_err(&pdev->dev,
@@ -260,7 +260,7 @@ static int mv_ehci_probe(struct platform_device *pdev)mv_ehci_disable (ehci_mv);#else dev_info (&pdev->dev,"MV_USB_MODE_OTG " -"must have CONFIG_USB_OTG_UTILS enabled\n" ); +"must have CONFIG_USB_PHY enabled\n" ); goto err_disable_clk;#endif }else {
Signature · 6 lines
1.8.1.rc1.5.g7e0651a -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Felipe Balbi
Hi folks,
inspired by Paul's DWC2 patchset which added
usb_otg_state_string()(a copy ofotg_state_string()) I have now renamedotg_state_string()tousb_otg_state_string(), moved it to usb-common, then moved all phy drivers todrivers/usb/phy/and completely deleted the otg directory.
Quoted 6 lines
We're also removing
CONFIG_USB_OTG_UTILSsince that has lots its meaning long ago.I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
What branch do the patches apply to? They didn't "git am" for me on either next-20130305, norgit://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 11 lines · Stephen Warren
Quoted 10 lines · Felipe Balbi
Hi folks,
inspired by Paul's DWC2 patchset which added
usb_otg_state_string()(a copy ofotg_state_string()) I have now renamedotg_state_string()tousb_otg_state_string(), moved it to usb-common, then moved all phy drivers todrivers/usb/phy/and completely deleted the otg directory.We're also removing
CONFIG_USB_OTG_UTILSsince that has lots its meaning long ago.
Quoted 7 lines
Quoted 3 lines
I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
What branch do the patches apply to? They didn't "git am" for me on either next-20130305, nor
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.gitnext.
they're on top of my testing branch. There were a few other patches touching drivers/phy which you need. Namely :
0e3b847 usb: phy: mxs: use readl(), writel() instead of the _relaxed() versions 35f0683 usb: phy: mxs-phy: register phy with framework
f6797d0 usb: phy: move bulk of otg/otg.c to phy/phy.c
It's easier to cherry-pick them all from my testing branch, or merge the full branch which contains a bunch of other cleanups.
Signature · 1 line
balbi
A message that is not in the archive (sent off-list or not yet received): 20130308071453.GD21589-S8G//mZuvNWo5Im9Ml3/[email protected]
Quoted 19 lines · Felipe Balbi
Hi,
Quoted 16 lines · Stephen Warren
Quoted 14 lines · Felipe Balbi
Hi folks,
inspired by Paul's DWC2 patchset which added
usb_otg_state_string()(a copy ofotg_state_string()) I have now renamedotg_state_string()tousb_otg_state_string(), moved it to usb-common, then moved all phy drivers todrivers/usb/phy/and completely deleted the otg directory.We're also removing
CONFIG_USB_OTG_UTILSsince that has lots its meaning long ago.I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
Quoted 6 lines
Quoted 4 lines
What branch do the patches apply to? They didn't "git am" for me on either next-20130305, nor
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
next.they're on top of my testing branch.
Ah, thanks. I took that whole branch, built ARM's tegra_defconfig, and see:
Quoted 10 lines
warning: (
ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning:
(ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI)
Manually enabling USB_PHY fixes this. However, this highlights an issue with your removal of all selects (as mentioned in your other email) - it will break perhaps any defconfig that has USB enabled.
After enabling USB_PHY, the code builds and runs without issue. --
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 41 lines · Stephen Warren
Quoted 19 lines · Felipe Balbi
Hi,
Quoted 16 lines · Stephen Warren
Quoted 14 lines · Felipe Balbi
Hi folks,
inspired by Paul's DWC2 patchset which added
usb_otg_state_string()(a copy ofotg_state_string()) I have now renamedotg_state_string()tousb_otg_state_string(), moved it to usb-common, then moved all phy drivers todrivers/usb/phy/and completely deleted the otg directory.We're also removing
CONFIG_USB_OTG_UTILSsince that has lots its meaning long ago.I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
Quoted 6 lines
Quoted 4 lines
What branch do the patches apply to? They didn't "git am" for me on either next-20130305, nor
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
next.they're on top of my testing branch.
Ah, thanks. I took that whole branch, built ARM's
tegra_defconfig, and see:Quoted 10 lines
warning: (
ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning:
(ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI)
Quoted 5 lines
Manually enabling
USB_PHYfixes this. However, this highlights an issue with your removal of all selects (as mentioned in your other email) - it will break perhaps any defconfig that has USB enabled.After enabling
USB_PHY, the code builds and runs without issue.
fair enough, but then I'm just exposing the trouble. ARCH shouldn't select USB_ULTI or any of the phy drivers, for that matter.
Signature · 1 line
balbi
A message that is not in the archive (sent off-list or not yet received): 20130308182623.GD900-S8G//mZuvNWo5Im9Ml3/[email protected]
Quoted 49 lines · Felipe Balbi
Quoted 48 lines · Stephen Warren
Quoted 21 lines · Felipe Balbi
Hi,
Quoted 17 lines · Stephen Warren
Quoted 15 lines · Felipe Balbi
Hi folks,
inspired by Paul's DWC2 patchset which added
usb_otg_state_string()(a copy ofotg_state_string()) I have now renamedotg_state_string()tousb_otg_state_string(), moved it to usb-common, then moved all phy drivers todrivers/usb/phy/and completely deleted the otg directory.We're also removing
CONFIG_USB_OTG_UTILSsince that has lots its meaning long ago.I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
Quoted 6 lines
Quoted 4 lines
What branch do the patches apply to? They didn't "git am" for me on either next-20130305, nor
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
next.they're on top of my testing branch.
Ah, thanks. I took that whole branch, built ARM's
tegra_defconfig, and see:Quoted 10 lines
warning: (
ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI)
warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI)Manually enabling
USB_PHYfixes this. However, this highlights an issue with your removal of all selects (as mentioned in your other email) - it will break perhaps any defconfig that has USB enabled.
Quoted 5 lines
Quoted 1 line
After enabling
USB_PHY, the code builds and runs without issue.fair enough, but then I'm just exposing the trouble. ARCH shouldn't select
USB_ULTIor any of the phy drivers, for that matter.
Yes, I think it should instead work like:
ARCH_TEGRA* selects nothing in particular related to USB.
The Tegra EHCI controller Kconfig depends on ARCH_TEGRA so it doesn't show up for other builds. I hope it's OK for the EHCI controller to select USB_ARCH_HAS_EHCI?
The Tegra EHCI controller Kconfig selects everything needed for it to be useful, i.e. PHY support and the Tegra PHY, and I guess the ULPI viewport options.
The Tegra PHY Kconfig probably shouldn't be user-visible (relying on being selected by the Tegra EHCI controller) and itself selects anything it relies on.
Does that sound reasonable?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Stephen Warren
Yes, I think it should instead work like:
ARCH_TEGRA* selects nothing in particular related to USB.
The Tegra EHCI controller
Kconfigdepends onARCH_TEGRAso it doesn't show up for other builds.
Yes, that's fine.
Quoted 1 line
I hope it's OK for the EHCI controller to select
USB_ARCH_HAS_EHCI?
I think that would create a circular dependency, which Kconfig will refuse. We talked about the USB_ARCH_HAS_* Kconfig symbols recently and Alan Stern agreed to my suggestion of removing all of them, reworking the logic so we can always enable USB and EHCI but even when there is no bus glue enabled.
I'll have to do a proper patch one of these days, or find someone in my team to do it right for all the corner cases.
Quoted 5 lines
The Tegra PHY
Kconfigprobably shouldn't be user-visible (relying on being selected by the Tegra EHCI controller) and itself selects anything it relies on.Does that sound reasonable?
It is often safer to express the logic using "depends on" than using "select", e.g. doing
config USB_EHCI_TEGRA
bool "EHCI support for NVIDIA Tegra"
depends on USB_EHCI_HCD
depends on ARCH_TEGRA
config USB_ULPI_VIEWPORT
def_bool y
depends on USB_EHCI_TEGRA
If USB_ULPI_VIEWPORT has any other dependencies, the best solution in the above scenario is to make USB_EHCI_TEGRA depend on those.
Arnd
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 35 lines · Arnd Bergmann
Quoted 6 lines · Stephen Warren
Yes, I think it should instead work like:
ARCH_TEGRA* selects nothing in particular related to USB.
The Tegra EHCI controller
Kconfigdepends onARCH_TEGRAso it doesn't show up for other builds.Yes, that's fine.
Quoted 1 line
I hope it's OK for the EHCI controller to select
USB_ARCH_HAS_EHCI?I think that would create a circular dependency, which
Kconfigwill refuse. We talked about the USB_ARCH_HAS_*Kconfigsymbols recently and Alan Stern agreed to my suggestion of removing all of them, reworking the logic so we can always enable USB and EHCI but even when there is no bus glue enabled.I'll have to do a proper patch one of these days, or find someone in my team to do it right for all the corner cases.
Quoted 5 lines
The Tegra PHY
Kconfigprobably shouldn't be user-visible (relying on being selected by the Tegra EHCI controller) and itself selects anything it relies on.Does that sound reasonable?
It is often safer to express the logic using "depends on" than using "select", e.g. doing
config
USB_EHCI_TEGRA
bool "EHCI support for NVIDIA Tegra"
depends onUSB_EHCI_HCD
depends onARCH_TEGRA
Quoted 6 lines
config
USB_ULPI_VIEWPORT
def_booly
depends onUSB_EHCI_TEGRAIf
USB_ULPI_VIEWPORThas any other dependencies, the best solution in the above scenario is to makeUSB_EHCI_TEGRAdepend on those.
USB_ULPI_VIEWPORT is, AFAIK, a generic piece of infra-structure that USB_EHCI_TEGRA depends upon.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Stephen Warren
Quoted 6 lines
config
USB_ULPI_VIEWPORT
def_booly
depends onUSB_EHCI_TEGRAIf
USB_ULPI_VIEWPORThas any other dependencies, the best solution in the above scenario is to makeUSB_EHCI_TEGRAdepend on those.
USB_ULPI_VIEWPORTis, AFAIK, a generic piece of infra-structure thatUSB_EHCI_TEGRAdepends upon.
Sorry, I was probably confusing the symbol names. I meant whatever you were going to "select" from USB_EHCI_TEGRA.
Arnd
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Arnd Bergmann
Quoted 4 lines · Stephen Warren
Quoted 4 lines
config
USB_ULPI_VIEWPORT
def_booly
depends onUSB_EHCI_TEGRA
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
If
USB_ULPI_VIEWPORThas any other dependencies, the best solution in the above scenario is to makeUSB_EHCI_TEGRAdepend on those.
USB_ULPI_VIEWPORTis, AFAIK, a generic piece of infra-structure thatUSB_EHCI_TEGRAdepends upon.Sorry, I was probably confusing the symbol names. I meant whatever you were going to "select" from
USB_EHCI_TEGRA.
Ah OK, that'd be the Tegra PHY driver. Except now that I look, it doesn't actually have its own Kconfig symbol (the Makefile builds it if the Tegra EHCI driver is enabled). Perhaps it should? Otherwise, I guess the Tegra EHCI driver Kconfig symbol would just have to depend on everything that it and the PHY driver depend on.
Quoted 56 lines · Stephen Warren
Quoted 49 lines · Felipe Balbi
Quoted 48 lines · Stephen Warren
Quoted 21 lines · Felipe Balbi
Hi,
Quoted 17 lines · Stephen Warren
Quoted 15 lines · Felipe Balbi
Hi folks,
inspired by Paul's DWC2 patchset which added
usb_otg_state_string()(a copy ofotg_state_string()) I have now renamedotg_state_string()tousb_otg_state_string(), moved it to usb-common, then moved all phy drivers todrivers/usb/phy/and completely deleted the otg directory.We're also removing
CONFIG_USB_OTG_UTILSsince that has lots its meaning long ago.I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
Quoted 6 lines
Quoted 4 lines
What branch do the patches apply to? They didn't "git am" for me on either next-20130305, nor
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
next.they're on top of my testing branch.
Ah, thanks. I took that whole branch, built ARM's
tegra_defconfig, and see:Quoted 10 lines
warning: (
ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI)
warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI)Manually enabling
USB_PHYfixes this. However, this highlights an issue with your removal of all selects (as mentioned in your other email) - it will break perhaps any defconfig that has USB enabled.Quoted 5 lines
Quoted 1 line
After enabling
USB_PHY, the code builds and runs without issue.fair enough, but then I'm just exposing the trouble. ARCH shouldn't select
USB_ULTIor any of the phy drivers, for that matter.
Quoted 7 lines
Yes, I think it should instead work like:
ARCH_TEGRA* selects nothing in particular related to USB.
The Tegra EHCI controller
Kconfigdepends onARCH_TEGRAso it doesn't show up for other builds. I hope it's OK for the EHCI controller to selectUSB_ARCH_HAS_EHCI?
that's something the ARCH should select but it has very little value. I guess there has been some discussions about dropping that and I support it.
Quoted 3 lines
The Tegra EHCI controller
Kconfigselects everything needed for it to be useful, i.e. PHY support and the Tegra PHY, and I guess the ULPI viewport options.
should it ? I don't know... There's no way to select something as module, but there's no eas\(y\|ier\) way to make sure PHY is enabled when building EHCI-tegra.
Quoted 3 lines
The Tegra PHY
Kconfigprobably shouldn't be user-visible (relying on being selected by the Tegra EHCI controller) and itself selects anything it relies on.
That I really don't like. I think the driver should be selectable and build in anything architecture. That's the easier way to:
a) build test a driver when applying patches; and
b) make sure drivers won't include <mach/*> or <asm/*>.
Signature · 1 line
balbi
A message that is not in the archive (sent off-list or not yet received): 20130314110129.GI32369-S8G//mZuvNWo5Im9Ml3/[email protected]
Quoted 85 lines · Felipe Balbi
Quoted 60 lines · Stephen Warren
Quoted 52 lines · Felipe Balbi
Quoted 50 lines · Stephen Warren
Quoted 22 lines · Felipe Balbi
Hi,
Quoted 18 lines · Stephen Warren
Quoted 16 lines · Felipe Balbi
Hi folks,
inspired by Paul's DWC2 patchset which added
usb_otg_state_string()(a copy ofotg_state_string()) I have now renamedotg_state_string()tousb_otg_state_string(), moved it to usb-common, then moved all phy drivers todrivers/usb/phy/and completely deleted the otg directory.We're also removing
CONFIG_USB_OTG_UTILSsince that has lots its meaning long ago.I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
Quoted 6 lines
Quoted 4 lines
What branch do the patches apply to? They didn't "git am" for me on either next-20130305, nor
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
next.they're on top of my testing branch.
Ah, thanks. I took that whole branch, built ARM's
tegra_defconfig, and see:Quoted 11 lines
warning: (
ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPIwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& ARM) warning: (ARCH_TEGRA_2x_SOC&&ARCH_TEGRA_3x_SOC) selectsUSB_ULPI_VIEWPORTwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&&USB_ULPI)Manually enabling
USB_PHYfixes this. However, this highlights an issue with your removal of all selects (as mentioned in your other email) - it will break perhaps any defconfig that has USB enabled.Quoted 6 lines
Quoted 2 lines
After enabling
USB_PHY, the code builds and runs without issue.fair enough, but then I'm just exposing the trouble. ARCH shouldn't select
USB_ULTIor any of the phy drivers, for that matter.Quoted 7 lines
Yes, I think it should instead work like:
ARCH_TEGRA* selects nothing in particular related to USB.
The Tegra EHCI controller
Kconfigdepends onARCH_TEGRAso it doesn't show up for other builds. I hope it's OK for the EHCI controller to selectUSB_ARCH_HAS_EHCI?that's something the ARCH should select but it has very little value. I guess there has been some discussions about dropping that and I support it.
Quoted 3 lines
The Tegra EHCI controller
Kconfigselects everything needed for it to be useful, i.e. PHY support and the Tegra PHY, and I guess the ULPI viewport options.should it ? I don't know... There's no way to select something as module, but there's no eas\(y\|ier\) way to make sure PHY is enabled when building EHCI-tegra.
Quoted 3 lines
The Tegra PHY
Kconfigprobably shouldn't be user-visible (relying on being selected by the Tegra EHCI controller) and itself selects anything it relies on.
Quoted 5 lines
That I really don't like. I think the driver should be selectable and build in anything architecture. That's the easier way to:
a) build test a driver when applying patches; and b) make sure drivers won't include <mach/*> or <asm/*>.
Venu, can you please look into the right changes to make for Tegra, and drive this forward. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 7/10 usb: gadget: mv_udc_core: check against CONFIG_USB_PHY
In reply to Felipe BalbiCONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.
--- drivers/usb/gadget/mv_udc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/mv_udc_core.c +1 -1
@@ -2127,7 +2127,7 @@ static int mv_udc_probe(struct platform_device *pdev) udc->dev = pdev; -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )if (pdata->mode ==MV_USB_MODE_OTG ) { udc->transceiver =devm_usb_get_phy (&pdev->dev,USB_PHY_TYPE_USB2 );
Signature · 1 line
1.8.1.rc1.5.g7e0651a
PATCH 9/10 usb: ehci: tegra: check against CONFIG_USB_PHY
In reply to Felipe BalbiCONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.
--- drivers/usb/host/ehci-tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/host/ehci-tegra.c +3 -3
@@ -768,7 +768,7 @@ static int tegra_ehci_probe(struct platform_device *pdev) goto fail; } -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )if (pdata->operating_mode ==TEGRA_USB_OTG ) { tegra->transceiver =devm_usb_get_phy (&pdev->dev,USB_PHY_TYPE_USB2 );
@@ -794,7 +794,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)return err; fail: -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )if (!IS_ERR_OR_NULL (tegra->transceiver))otg_set_host (tegra->transceiver->otg,NULL );#endif
@@ -815,7 +815,7 @@ static int tegra_ehci_remove(struct platform_device *pdev)pm_runtime_disable (&pdev->dev);pm_runtime_put_noidle (&pdev->dev); -#ifdef CONFIG_USB_OTG_UTILS +#if IS_ENABLED (CONFIG_USB_PHY )if (!IS_ERR_OR_NULL (tegra->transceiver))otg_set_host (tegra->transceiver->otg,NULL );#endif
Signature · 1 line
1.8.1.rc1.5.g7e0651a
A message that is not in the archive (sent off-list or not yet received): 1362648969-13737-10-git-send-email-balbi-l0cyMroinI0@public.gmane.org
Re: [PATCH 09/10] usb: ehci: tegra: check against CONFIG_USB_PHY
Quoted 3 lines · Felipe Balbi
CONFIG_USB_OTG_UTILSwill be removed very
soon, so we should checkCONFIG_USB_PHY
instead.
The Tegra EHCI driver isn't very useful without the Tegra PHY driver. Perhaps its Kconfig should simply "select USB_PHY", and the ifdefs be removed rather than modified?
Re: [PATCH 09/10] usb: ehci: tegra: check against CONFIG_USB_PHY
Quoted 7 lines · Stephen Warren
Quoted 3 lines · Felipe Balbi
CONFIG_USB_OTG_UTILSwill be removed very
soon, so we should checkCONFIG_USB_PHY
instead.The Tegra EHCI driver isn't very useful without the Tegra PHY driver. Perhaps its
Kconfigshould simply "selectUSB_PHY", and the ifdefs be
no selects anymore.
Quoted 1 line
removed rather than modified?
One can still compile-test the driver without a PHY. Ideally, though, we would teach EHCI-core about PHYs.
Signature · 1 line
balbi
PATCH 10/10 usb: phy: remove CONFIG_USB_OTG_UTILS
In reply to Felipe Balbithere are no more users of CONFIG_USB_OTG_UTILS
left in tree, we can remove it just fine.
--- drivers/usb/phy/Kconfig | 23 ----------------------- 1 file changed, 23 deletions(-)
drivers/usb/phy/Kconfig +0 -23
@@ -3,7 +3,6 @@ # menuconfig USB_PHY tristate "USB Physical Layer drivers" - select USB_OTG_UTILS help USB controllers (those which are host, device or DRD) need a device to handle the physical layer signalling, commonly called
@@ -13,19 +12,12 @@ menuconfig USB_PHY if USB_PHY -config USB_OTG_UTILS - bool - help - Select this to make sure the build includes objects from - the OTG infrastructure directory. - # # USB Transceiver Drivers # config AB8500_USB tristate "AB8500 USB Transceiver Driver" depends on AB8500_CORE - select USB_OTG_UTILS help Enable this to support the USB OTG transceiver in AB8500 chip. This transceiver supports high and full speed devices plus,
@@ -35,14 +27,12 @@ config FSL_USB2_OTG bool "Freescale USB OTG Transceiver Driver" depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_SUSPEND select USB_OTG - select USB_OTG_UTILS help Enable this to support Freescale USB OTG transceiver. config ISP1301_OMAP tristate "Philips ISP1301 with OMAP OTG" depends on I2C && ARCH_OMAP_OTG - select USB_OTG_UTILS help If you say yes here you get support for the Philips ISP1301 USB-On-The-Go transceiver working with the OMAP OTG controller.
@@ -56,14 +46,12 @@ config ISP1301_OMAP config MV_U3D_PHY bool "Marvell USB 3.0 PHY controller Driver" depends on USB_MV_U3D - select USB_OTG_UTILS help Enable this to support Marvell USB 3.0 phy controller for Marvell SoC. config NOP_USB_XCEIV tristate "NOP USB Transceiver Driver" - select USB_OTG_UTILS help This driver is to be used by all the usb transceiver which are either built-in with usb ip or which are autonomous and doesn't require any
@@ -81,7 +69,6 @@ config OMAP_CONTROL_USB config OMAP_USB2 tristate "OMAP USB2 PHY Driver" depends on ARCH_OMAP2PLUS - select USB_OTG_UTILS select OMAP_CONTROL_USB help Enable this to support the transceiver that is part of SOC. This
@@ -91,7 +78,6 @@ config OMAP_USB2 config OMAP_USB3 tristate "OMAP USB3 PHY Driver" - select USB_OTG_UTILS select OMAP_CONTROL_USB help Enable this to support the USB3 PHY that is part of SOC. This
@@ -102,7 +88,6 @@ config OMAP_USB3 config SAMSUNG_USBPHY bool "Samsung USB PHY controller Driver" depends on USB_S3C_HSOTG || USB_EHCI_S5P || USB_OHCI_EXYNOS - select USB_OTG_UTILS help Enable this to support Samsung USB phy controller for samsung SoCs.
@@ -110,7 +95,6 @@ config SAMSUNG_USBPHY config TWL4030_USB tristate "TWL4030 USB Transceiver Driver" depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS - select USB_OTG_UTILS help Enable this to support the USB OTG transceiver on TWL4030 family chips (including the TWL5030 and TPS659x0 devices).
@@ -120,7 +104,6 @@ config TWL4030_USB config TWL6030_USB tristate "TWL6030 USB Transceiver Driver" depends on TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS - select USB_OTG_UTILS help Enable this to support the USB OTG transceiver on TWL6030 family chips. This TWL6030 transceiver has the VBUS and ID GND
@@ -132,7 +115,6 @@ config TWL6030_USB config USB_GPIO_VBUS tristate "GPIO based peripheral-only VBUS sensing 'transceiver'" depends on GENERIC_GPIO - select USB_OTG_UTILS help Provides simple GPIO VBUS sensing for controllers with an internal transceiver via the usb_phy interface, and
@@ -154,7 +136,6 @@ config USB_ISP1301 config USB_MSM_OTG tristate "OTG support for Qualcomm on-chip USB controller" depends on (USB || USB_GADGET) && ARCH_MSM - select USB_OTG_UTILS help Enable this to support the USB OTG transceiver on MSM chips. It handles PHY initialization, clock management, and workarounds
@@ -168,7 +149,6 @@ config USB_MV_OTG tristate "Marvell USB OTG support" depends on USB_EHCI_MV && USB_MV_UDC && USB_SUSPEND select USB_OTG - select USB_OTG_UTILS help Say Y here if you want to build Marvell USB OTG transciever driver in kernel (including PXA and MMP series). This driver
@@ -180,7 +160,6 @@ config USB_MXS_PHY tristate "Freescale MXS USB PHY support" depends on ARCH_MXC || ARCH_MXS select STMP_DEVICE - select USB_OTG_UTILS help Enable this to support the Freescale MXS USB PHY.
@@ -189,7 +168,6 @@ config USB_MXS_PHY config USB_RCAR_PHY tristate "Renesas R-Car USB phy support" depends on USB || USB_GADGET - select USB_OTG_UTILS help Say Y here to add support for the Renesas R-Car USB phy driver. This chip is typically used as USB phy for USB host, gadget.
@@ -201,7 +179,6 @@ config USB_RCAR_PHY config USB_ULPI bool "Generic ULPI Transceiver Driver" depends on ARM - select USB_OTG_UTILS help Enable this to support ULPI connected USB OTG transceivers which are likely found on embedded boards.
Signature · 1 line
1.8.1.rc1.5.g7e0651a
A message that is not in the archive (sent off-list or not yet received): 1362648969-13737-11-git-send-email-balbi-l0cyMroinI0@public.gmane.org
PATCH v2 1/1 usb: phy: remove CONFIG_USB_OTG_UTILS
there are no more users of CONFIG_USB_OTG_UTILS
left in tree, we can remove it just fine.
---
v1 -> v2:
. removed a few extra instances which my original (and stupid)
grep didn't find
drivers/power/Kconfig | 2 +- drivers/usb/dwc3/Kconfig | 1 - drivers/usb/gadget/Kconfig | 3 --- drivers/usb/host/Kconfig | 1 - drivers/usb/musb/Kconfig | 1 - drivers/usb/phy/Kconfig | 23 ----------------------- 6 files changed, 1 insertion(+), 30 deletions(-)
drivers/power/Kconfig +1 -1
@@ -254,7 +254,7 @@ config BATTERY_RX51 config CHARGER_ISP1704 tristate "ISP1704 USB Charger Detection" - depends on USB_OTG_UTILS + depends on USB_PHY help Say Y to enable support for USB Charger Detection with ISP1707/ISP1704 USB transceivers.
drivers/usb/dwc3/Kconfig +0 -1
@@ -1,7 +1,6 @@ config USB_DWC3 tristate "DesignWare USB3 DRD Core Support" depends on (USB || USB_GADGET) && GENERIC_HARDIRQS - select USB_OTG_UTILS select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD help Say Y or M here if your system has a Dual Role SuperSpeed
drivers/usb/gadget/Kconfig +0 -3
@@ -195,7 +195,6 @@ config USB_OMAP tristate "OMAP USB Device Controller" depends on ARCH_OMAP1 select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG - select USB_OTG_UTILS if ARCH_OMAP help Many Texas Instruments OMAP processors have flexible full speed USB device controllers, with support for up to 30
@@ -210,7 +209,6 @@ config USB_OMAP config USB_PXA25X tristate "PXA 25x or IXP 4xx" depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX - select USB_OTG_UTILS help Intel's PXA 25x series XScale ARM-5TE processors include an integrated full speed USB 1.1 device controller. The
@@ -258,7 +256,6 @@ config USB_RENESAS_USBHS_UDC config USB_PXA27X tristate "PXA 27x" - select USB_OTG_UTILS help Intel's PXA 27x series XScale ARM v5TE processors include an integrated full speed USB 1.1 device controller.
drivers/usb/host/Kconfig +0 -1
@@ -300,7 +300,6 @@ config USB_OHCI_HCD tristate "OHCI HCD support" depends on USB && USB_ARCH_HAS_OHCI select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 - select USB_OTG_UTILS if ARCH_OMAP depends on USB_ISP1301 || !ARCH_LPC32XX ---help--- The Open Host Controller Interface (OHCI) is a standard for accessing
drivers/usb/musb/Kconfig +0 -1
@@ -10,7 +10,6 @@ config USB_MUSB_HDRC select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN) select NOP_USB_XCEIV if (SOC_TI81XX || SOC_AM33XX) select OMAP_CONTROL_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA - select USB_OTG_UTILS help Say Y here if your system has a dual role high speed USB controller based on the Mentor Graphics silicon IP. Then
drivers/usb/phy/Kconfig +0 -23
@@ -3,7 +3,6 @@ # menuconfig USB_PHY tristate "USB Physical Layer drivers" - select USB_OTG_UTILS help USB controllers (those which are host, device or DRD) need a device to handle the physical layer signalling, commonly called
@@ -13,19 +12,12 @@ menuconfig USB_PHY if USB_PHY -config USB_OTG_UTILS - bool - help - Select this to make sure the build includes objects from - the OTG infrastructure directory. - # # USB Transceiver Drivers # config AB8500_USB tristate "AB8500 USB Transceiver Driver" depends on AB8500_CORE - select USB_OTG_UTILS help Enable this to support the USB OTG transceiver in AB8500 chip. This transceiver supports high and full speed devices plus,
@@ -35,14 +27,12 @@ config FSL_USB2_OTG bool "Freescale USB OTG Transceiver Driver" depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_SUSPEND select USB_OTG - select USB_OTG_UTILS help Enable this to support Freescale USB OTG transceiver. config ISP1301_OMAP tristate "Philips ISP1301 with OMAP OTG" depends on I2C && ARCH_OMAP_OTG - select USB_OTG_UTILS help If you say yes here you get support for the Philips ISP1301 USB-On-The-Go transceiver working with the OMAP OTG controller.
@@ -56,14 +46,12 @@ config ISP1301_OMAP config MV_U3D_PHY bool "Marvell USB 3.0 PHY controller Driver" depends on USB_MV_U3D - select USB_OTG_UTILS help Enable this to support Marvell USB 3.0 phy controller for Marvell SoC. config NOP_USB_XCEIV tristate "NOP USB Transceiver Driver" - select USB_OTG_UTILS help This driver is to be used by all the usb transceiver which are either built-in with usb ip or which are autonomous and doesn't require any
@@ -81,7 +69,6 @@ config OMAP_CONTROL_USB config OMAP_USB2 tristate "OMAP USB2 PHY Driver" depends on ARCH_OMAP2PLUS - select USB_OTG_UTILS select OMAP_CONTROL_USB help Enable this to support the transceiver that is part of SOC. This
@@ -91,7 +78,6 @@ config OMAP_USB2 config OMAP_USB3 tristate "OMAP USB3 PHY Driver" - select USB_OTG_UTILS select OMAP_CONTROL_USB help Enable this to support the USB3 PHY that is part of SOC. This
@@ -102,7 +88,6 @@ config OMAP_USB3 config SAMSUNG_USBPHY bool "Samsung USB PHY controller Driver" depends on USB_S3C_HSOTG || USB_EHCI_S5P || USB_OHCI_EXYNOS - select USB_OTG_UTILS help Enable this to support Samsung USB phy controller for samsung SoCs.
@@ -110,7 +95,6 @@ config SAMSUNG_USBPHY config TWL4030_USB tristate "TWL4030 USB Transceiver Driver" depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS - select USB_OTG_UTILS help Enable this to support the USB OTG transceiver on TWL4030 family chips (including the TWL5030 and TPS659x0 devices).
@@ -120,7 +104,6 @@ config TWL4030_USB config TWL6030_USB tristate "TWL6030 USB Transceiver Driver" depends on TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS - select USB_OTG_UTILS help Enable this to support the USB OTG transceiver on TWL6030 family chips. This TWL6030 transceiver has the VBUS and ID GND
@@ -132,7 +115,6 @@ config TWL6030_USB config USB_GPIO_VBUS tristate "GPIO based peripheral-only VBUS sensing 'transceiver'" depends on GENERIC_GPIO - select USB_OTG_UTILS help Provides simple GPIO VBUS sensing for controllers with an internal transceiver via the usb_phy interface, and
@@ -154,7 +136,6 @@ config USB_ISP1301 config USB_MSM_OTG tristate "OTG support for Qualcomm on-chip USB controller" depends on (USB || USB_GADGET) && ARCH_MSM - select USB_OTG_UTILS help Enable this to support the USB OTG transceiver on MSM chips. It handles PHY initialization, clock management, and workarounds
@@ -168,7 +149,6 @@ config USB_MV_OTG tristate "Marvell USB OTG support" depends on USB_EHCI_MV && USB_MV_UDC && USB_SUSPEND select USB_OTG - select USB_OTG_UTILS help Say Y here if you want to build Marvell USB OTG transciever driver in kernel (including PXA and MMP series). This driver
@@ -180,7 +160,6 @@ config USB_MXS_PHY tristate "Freescale MXS USB PHY support" depends on ARCH_MXC || ARCH_MXS select STMP_DEVICE - select USB_OTG_UTILS help Enable this to support the Freescale MXS USB PHY.
@@ -189,7 +168,6 @@ config USB_MXS_PHY config USB_RCAR_PHY tristate "Renesas R-Car USB phy support" depends on USB || USB_GADGET - select USB_OTG_UTILS help Say Y here to add support for the Renesas R-Car USB phy driver. This chip is typically used as USB phy for USB host, gadget.
@@ -201,7 +179,6 @@ config USB_RCAR_PHY config USB_ULPI bool "Generic ULPI Transceiver Driver" depends on ARM - select USB_OTG_UTILS help Enable this to support ULPI connected USB OTG transceivers which are likely found on embedded boards.
Signature · 1 line
1.8.1.rc1.5.g7e0651a
Quoted 7 lines · Felipe Balbi
Hi folks,
inspired by Paul's DWC2 patchset which added
usb_otg_state_string()(a copy ofotg_state_string()) I have now renamedotg_state_string()tousb_otg_state_string(), moved it to usb-common, then moved all phy drivers todrivers/usb/phy/and completely deleted the otg directory.
Quoted 6 lines
We're also removing
CONFIG_USB_OTG_UTILSsince that has lots its meaning long ago.I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
for the EHCI changes.
A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.44L0.1303071101190.1646-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org
Quoted 12 lines · Alan Stern
Quoted 10 lines · Felipe Balbi
Hi folks,
inspired by Paul's DWC2 patchset which added
usb_otg_state_string()(a copy ofotg_state_string()) I have now renamedotg_state_string()tousb_otg_state_string(), moved it to usb-common, then moved all phy drivers todrivers/usb/phy/and completely deleted the otg directory.We're also removing
CONFIG_USB_OTG_UTILSsince that has lots its meaning long ago.
Quoted 7 lines
Quoted 3 lines
I have compiled all patches with allyes, allno and allmod configs, but please make sure to test on your platforms to make sure we're not leaking any more problems to mainline.
for the EHCI changes.
thanks, added your ack to the patches.
Signature · 1 line
balbi