diff options
| author | Felipe Balbi <balbi@ti.com> | 2013-01-24 07:52:24 -0500 |
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 05:16:39 -0400 |
| commit | f07bd56bbdaa2340ebf46af9a37e7b2d1b4578e3 (patch) | |
| tree | 00e341ad9d37d01667a82462b76365ca353cfe37 /include/linux/usb | |
| parent | 7eaf8f2a7da6506df0e6edc4fdb22678f0eb3602 (diff) | |
usb: gadget: udc-core: allow udc class register gadget device
Currently all UDC drivers are calling
device_register() before calling
usb_add_gadget_udc(). In order to avoid
code duplication, we can allow udc-core.c
register that device.
However that would become a really large patch,
so to cope with the meanwhile and allow us
to write bite-sized patches, we're adding
a flag which will be set by UDC driver once
it removes the code for registering the
gadget device.
Once all are converted, the new flag will
be removed.
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb')
| -rw-r--r-- | include/linux/usb/gadget.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 2e297e80d59a..fcd9ef8d3f70 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -494,6 +494,9 @@ struct usb_gadget_ops { | |||
| 494 | * only supports HNP on a different root port. | 494 | * only supports HNP on a different root port. |
| 495 | * @b_hnp_enable: OTG device feature flag, indicating that the A-Host | 495 | * @b_hnp_enable: OTG device feature flag, indicating that the A-Host |
| 496 | * enabled HNP support. | 496 | * enabled HNP support. |
| 497 | * @register_my_device: Flag telling udc-core that UDC driver didn't | ||
| 498 | * register the gadget device to the driver model. Temporary until | ||
| 499 | * all UDC drivers are fixed up properly. | ||
| 497 | * @name: Identifies the controller hardware type. Used in diagnostics | 500 | * @name: Identifies the controller hardware type. Used in diagnostics |
| 498 | * and sometimes configuration. | 501 | * and sometimes configuration. |
| 499 | * @dev: Driver model state for this abstract device. | 502 | * @dev: Driver model state for this abstract device. |
| @@ -531,6 +534,7 @@ struct usb_gadget { | |||
| 531 | unsigned b_hnp_enable:1; | 534 | unsigned b_hnp_enable:1; |
| 532 | unsigned a_hnp_support:1; | 535 | unsigned a_hnp_support:1; |
| 533 | unsigned a_alt_hnp_support:1; | 536 | unsigned a_alt_hnp_support:1; |
| 537 | unsigned register_my_device:1; | ||
| 534 | const char *name; | 538 | const char *name; |
| 535 | struct device dev; | 539 | struct device dev; |
| 536 | unsigned out_epnum; | 540 | unsigned out_epnum; |
