musb: Inform user when gadget cable is disconnected
Subsystems (2)
PATCH 1/2 musb: Inform user when gadget cable is disconnected
Currently we don't see any message to inform user that gadget cable is successfully disconnected leading to suspicion if everything is fine at driver therefore adding an informative print message in gadget disconnect path.
--- drivers/usb/musb/musb_core.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/usb/musb/musb_core.c +4 -0
@@ -795,6 +795,10 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,#ifdef CONFIG_USB_GADGET_MUSB_HDRC case OTG_STATE_B_PERIPHERAL :case OTG_STATE_B_IDLE : +printk (KERN_INFO "musb %s gadget disconnected.\n" , + musb->gadget_driver + ? musb->gadget_driver->driver.name + :"" );musb_g_disconnect (musb);break ;#endif /* GADGET */
Signature · 6 lines
1.6.2.4 -- 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): 1257230140-12958-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org
PATCH 2/2 musb: Remove unwanted message in boot log
Removes below unnecessary log of almost 28 lines during boot.
musb_hdrc: hw_ep 0shared, max 64musb_hdrc: hw_ep 1tx, max 512musb_hdrc: hw_ep 1rx, max 512
...
...musb_hdrc: hw_ep 13shared, max 4096musb_hdrc: hw_ep 14shared, max 1024musb_hdrc: hw_ep 15shared, max 1024
--- drivers/usb/musb/musb_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/musb/musb_core.c +2 -2
@@ -1454,7 +1454,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)#endif if (hw_ep->max_packet_sz_tx) { - printk(KERN_DEBUG + DBG(1, "%s: hw_ep %d%s, %smax %d\n", musb_driver_name, i, hw_ep->is_shared_fifo ? "shared" : "tx",
@@ -1463,7 +1463,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb) hw_ep->max_packet_sz_tx); }if (hw_ep->max_packet_sz_rx && !hw_ep->is_shared_fifo) { - printk(KERN_DEBUG + DBG(1, "%s: hw_ep %d%s, %smax %d\n", musb_driver_name, i, "rx",
Signature · 6 lines
1.6.2.4 -- 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
Hi,
Quoted 15 lines · ext Ajay Kumar Gupta
Currently we don't see any message to inform user that gadget cable is successfully disconnected leading to suspicion if everything is fine at driver therefore adding an informative print message in gadget disconnect path.
Signed-off-by Ajay Kumar Gupta <[email protected]>--- drivers/usb/musb/musb_core.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/usb/musb/musb_core.c +0
-0
drivers/usb/musb/musb_core.c static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb, · line 801
Quoted 7 lines
drivers/usb/musb/musb_core.c +4
-0@@ -795,6 +795,10 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,#ifdef CONFIG_USB_GADGET_MUSB_HDRC case OTG_STATE_B_PERIPHERAL :case OTG_STATE_B_IDLE : +printk (KERN_INFO "musb %s gadget disconnected.\n" , + musb->gadget_driver + ? musb->gadget_driver->driver.name + :"" );
i don't think this is so useful since no normal user will be reading dmesg anyway. User will get this state via /sys/devices/platform/musb_hdrc/mode, which is sysfs_notified and HAL/DeviceKit can use that to show pretty UI messages to user.
I'm currently moving some sysfs files to the transceiver level and creating a more generic set of sysfs files so that we could have a generic hald-addon or DeviceKit daemon for handling that for any transceiver.
I have some under-development patches available at [1] if you want to look. The commit regarding this is on [2].
[1] http://gitorious.org/usb/usb/commits/otg-rework
[2] http://gitorious.org/usb/usb/commit/121ff1e9f17ffa56692b63305bf55e72216df3eb
Signature · 5 lines
balbi -- 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