Fixed to stop services of functionfs when gadget is disabled
[platform/core/system/libdevice-node.git] / hw / usb_gadget.h
index fe909ed..dc4b539 100644 (file)
@@ -65,10 +65,13 @@ typedef enum {
  * legacy enable(usb plug)    : enable gadget -> handler(1) -> ffs_service start -> service start
  * legacy disable(usb unplug) : service stop -> ffs_service stop -> handler(0) -> disable gadget
  *
- * configfs init(booting)       : ffs_service start
- * configfs enable(usb plug)    : enable gadget -> handler(1) -> service start
- * configfs disable(usb unplug) : service stop -> handler(0) -> disable gadget
- * configfs deinit              : ffs_service stop
+ * configfs init(booting)       : ffs_service.socket start
+ * configfs enable(usb plug)*   : enable gadget -> handler(1) -> service start
+ * configfs disable(usb unplug) : service stop -> handler(0) -> disable gadget -> ffs_service.service stop
+ * configfs deinit              : ffs_service.socket stop
+ *
+ * Since ffs_service works by socket activation, it will be started automatically when data is enqueued to the usb socket.
+ * So when enabling configfs gadget, it doesn't start ffs_service.
  */
 struct usb_function {
        int id;