Block diagram for composite gadget

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

 



Hi,

I am trying to understand usb composite gadget drivers.  I tried to
make a block diagram for understanding a communication flow.
Attached a text file with this email. This is based on source code and
haven't verified on real target yet. Please, point me if I
misunderstood anything.

Thanks lot, for the help.

Thanks and Regards,
Shivdas Gujare
                                                                                                                 ,------------------,
                                                                                                                 |      USER        |
                                                                                                                 |   application    |
                                                                                                                 '------------------'
															/|\
															 |
USER															\|/
=========================================================================================================================================
KERNEL															/|\
															 |
															\|/
														 ,------------------,
														 |  drivers/char/   |
											              tty_layer	 |   tty_io.c       |
														 '------------------'
														        /|\
															 |
					    struct      			  (1)					 | open/close/read/write (9)
					usb_gadget_driver		         struct 				 |
                                                                (2)        usb_composite_driver                         \|/
,---------------------,                 ,---------------, usb_composite_ ,----------------------,     (4)	,----------------------,                                             
|                     |      (3)        |               |   register     |                      | gserial_setup |    u_serial.c        |
|  USB Device         |<----------------|  composite.c  |<---------------|     serial.c         |-------------->|                      |
|  Controller driver  | usb_gadget_     |               | usb_add_       | 		        |   struct      |      struct          |
|                     | register_driver |               | config         |                      |  tty_driver   |  tty_operations      |
'---------------------'                 '---------------'      (5)       '----------------------'               '----------------------' 
					/|\    /|\    /|\		struct usb_configuration                            /|\
					 |	|	\		  (serial_bind_config)                               |
					 |	 \	 \		     /	     |	    \ (6)                            | Notify USB status to tty_io
					  \	  \	  \		 (6)/	     |(6)    \	                             | 
					   \	   \	   \		   /	     |	      \			         gserial_connect/disconnect [active/inactive] (8)
					    \ 	    \       \ 		  / 	     |         \__gser_bind_config__         | [same for f_acm.c and f_obex.c]  
					     \	     \       \		 /	     |    			    \	     |
					      \       \       \_________/____________|___usb_add_function______	     \	     |
					       \       \ 	       /	     |	        (7)            \      \	     | 
				 		\       \_(7)usb_add_function__	     |				\      \     | 
						 \    	     _______/	       \     |		           	 \	\    |
				    (7) usb_add_function    |acm_bind_config    \    |obex_bind_config	          \	 \   |
						    \      \|/	                 \  \|/				   \  	\|/  |
                                                  ,---------------,             ,---------------,      		 ,---------------,
                                                  |               |             |               |                |               |
						  |    f_acm.c    |	        |   f_obex.c    |	         |  f_serial.c   |
                                                  |               |             |               |                |               |
                                                  '---------------'             '---------------'                '---------------'
        					struct usb_function		struct usb_function		struct usb_function

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux