Re: [RFC/PATCH v2 1/3] usb: gadget: introduce start() and stop()

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

 



On Thu, Sep 16, 2010 at 04:10:49AM -0500, Michał Nazarewicz wrote:
I don't understand one thing.  Isn't bind() and unbind() enough for that?

bind() unbind() is for the gadget driver, these are for the controller
(musb, omap_udc, dummy, etc).

+ *
+ * Returns zero on success, else negative errno.
+ */
+static inline int usb_gadget_start(struct usb_gadget *gadget)
+{
+	if (!gadget->ops->start)
+		return -EOPNOTSUPP;

Wouldn't it be better to return 0 here?

nope, this is necessary for the framework to actually work. Otherwise
the controller has no way to now it has to e.g. enable clocks, setup
control register, etc.


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