All of lore.kernel.org
 help / color / mirror / Atom feed
* usb-gadget: dynamic reconfiguration
@ 2021-11-08 12:54 Shantur Rathore
  2021-11-08 13:02 ` Greg KH
  2021-11-08 13:07 ` Felipe Balbi
  0 siblings, 2 replies; 4+ messages in thread
From: Shantur Rathore @ 2021-11-08 12:54 UTC (permalink / raw)
  To: linux-usb

Hi all,

I am trying to figure out if it's possible to reconfigure a usb-gadget
when it's live.
The idea is to create a gadget with 1 function - lets say a serial gadget.

Upon communication with the host, the host could specify (via Serial
communication) which is the next gadget it needs for example a mass
storage or ecm and the next gadget can be added to the configuration.

For now this only works if the gadget is disconnected and reconnected
to the UDC.

I want to understand if it is technically possible to add more
functions to a live config without affecting existing functions.

Kind regards,
Shantur

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

* Re: usb-gadget: dynamic reconfiguration
  2021-11-08 12:54 usb-gadget: dynamic reconfiguration Shantur Rathore
@ 2021-11-08 13:02 ` Greg KH
  2021-11-08 13:07 ` Felipe Balbi
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-11-08 13:02 UTC (permalink / raw)
  To: Shantur Rathore; +Cc: linux-usb

On Mon, Nov 08, 2021 at 12:54:37PM +0000, Shantur Rathore wrote:
> Hi all,
> 
> I am trying to figure out if it's possible to reconfigure a usb-gadget
> when it's live.
> The idea is to create a gadget with 1 function - lets say a serial gadget.
> 
> Upon communication with the host, the host could specify (via Serial
> communication) which is the next gadget it needs for example a mass
> storage or ecm and the next gadget can be added to the configuration.
> 
> For now this only works if the gadget is disconnected and reconnected
> to the UDC.
> 
> I want to understand if it is technically possible to add more
> functions to a live config without affecting existing functions.

The USB standard does not allow for this type of thing, sorry.  So this
really isn't anything you could do on the gadget side and expect the
host side to notice it.

thanks,

greg k-h

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

* Re: usb-gadget: dynamic reconfiguration
  2021-11-08 12:54 usb-gadget: dynamic reconfiguration Shantur Rathore
  2021-11-08 13:02 ` Greg KH
@ 2021-11-08 13:07 ` Felipe Balbi
  2021-11-08 14:05   ` Shantur Rathore
  1 sibling, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2021-11-08 13:07 UTC (permalink / raw)
  To: Shantur Rathore; +Cc: linux-usb


Hi,

Shantur Rathore <i@shantur.com> writes:
> Hi all,
>
> I am trying to figure out if it's possible to reconfigure a usb-gadget
> when it's live.
> The idea is to create a gadget with 1 function - lets say a serial gadget.
>
> Upon communication with the host, the host could specify (via Serial
> communication) which is the next gadget it needs for example a mass
> storage or ecm and the next gadget can be added to the configuration.
>
> For now this only works if the gadget is disconnected and reconnected
> to the UDC.
>
> I want to understand if it is technically possible to add more
> functions to a live config without affecting existing functions.

the only thing you can do is upon a certain command, logically
disconnect from the bus and connect again as a new device.

-- 
balbi

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

* Re: usb-gadget: dynamic reconfiguration
  2021-11-08 13:07 ` Felipe Balbi
@ 2021-11-08 14:05   ` Shantur Rathore
  0 siblings, 0 replies; 4+ messages in thread
From: Shantur Rathore @ 2021-11-08 14:05 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-usb

On Mon, Nov 8, 2021 at 1:08 PM Felipe Balbi <balbi@kernel.org> wrote:
>
>
> Hi,
>
> Shantur Rathore <i@shantur.com> writes:
> > Hi all,
> >
> > I am trying to figure out if it's possible to reconfigure a usb-gadget
> > when it's live.
> > The idea is to create a gadget with 1 function - lets say a serial gadget.
> >
> > Upon communication with the host, the host could specify (via Serial
> > communication) which is the next gadget it needs for example a mass
> > storage or ecm and the next gadget can be added to the configuration.
> >
> > For now this only works if the gadget is disconnected and reconnected
> > to the UDC.
> >
> > I want to understand if it is technically possible to add more
> > functions to a live config without affecting existing functions.
>
> the only thing you can do is upon a certain command, logically
> disconnect from the bus and connect again as a new device.

thanks guys, always helpful.

>
> --
> balbi

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

end of thread, other threads:[~2021-11-08 14:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 12:54 usb-gadget: dynamic reconfiguration Shantur Rathore
2021-11-08 13:02 ` Greg KH
2021-11-08 13:07 ` Felipe Balbi
2021-11-08 14:05   ` Shantur Rathore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.