Re: [PATCH 1/2] musb: Inform user when gadget cable is disconnected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Nov 03, 2009 at 07:35:39AM +0100, ext Ajay Kumar Gupta wrote:
> 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 <ajay.gupta@xxxxxx>
> ---
>  drivers/usb/musb/musb_core.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 3a61ddb..ec67ec7 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -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

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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux