Re: [PATCH 2/2] usb: gadget: convert all users to the new udc

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

 



On Mon, 13 Jun 2011, Felipe Balbi wrote:

> Hi,
> 
> On Sat, Jun 11, 2011 at 12:04:32PM -0400, Alan Stern wrote:
> > > Why was g_file_storage done differently, I don't know ;-)
> > 
> > I know, because it was at my request.  :-)  During the initial
> > development of f_mass_storage I didn't want to eliminate a working
> > driver in favor of one that was still buggy and under development.
> > 
> > Also, there must be a lot of people and distributions using
> > g_file_storage now; doing what you suggest would force them to change
> > over to g_mass_storage.  Not too difficult (as the drivers are highly
> > compatible), but also not something to be done very quickly.
> 
> you wouldn't have to eliminate g_file_storage at all. See that we still
> have g_ether, g_serial and g_zero. None of those were eliminated when
> they were converted to composite framework. Rather, the functions were
> phased to f_*.c files and [ether | serial | zero].c are just tying
> things together.
> 
> The same could've been done for g_file_storage :-)

It essentially _was_ done; the result was g_mass_storage.  The two 
drivers are almost but not quite entirely the same (apart from use of 
the composite framework).


> > I'm still confused.  Why do you want to get rid of _all_ the inlines in
> > gadget.h just so you can add notifications to _some_ of them?
> 
> I wouldn't get rid of all inlines... only the ones receiving a
> notification:
> 
> static inline int usb_gadget_wakeup()
> static inline int usb_gadget_set_selfpowered()
> static inline int usb_gadget_clear_selfpowered()
> static inline int usb_gadget_vbus_connect()
> static inline int usb_gadget_vbus_draw()
> static inline int usb_gadget_vbus_disconnect()
> static inline int usb_gadget_connect()
> static inline int usb_gadget_disconnect()
> 
> To those I would also add suspend() and resume().

Okay, now I get it.  You can understand why I was confused, seeing as 
how your original message said:

	We also need to cleanup all the ->start()/->stop() calls from
	all udc controllers, then we need to uninline all the
	operations we have on gadget.h ...

Evidently you didn't really mean "all".

Alan Stern

--
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