composite.h (06b851e58b73a268f8092c2d990f697b2e7c53bd) | composite.h (88af8bbe4ef781031ad3370847553f3b42ba0076) |
---|---|
1/* 2 * composite.h -- framework for usb gadgets which are composite devices 3 * 4 * Copyright (C) 2006-2008 David Brownell 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 25 unchanged lines hidden (view full) --- 34 * the composite model the host can use both functions at the same time. 35 */ 36 37#include <linux/bcd.h> 38#include <linux/version.h> 39#include <linux/usb/ch9.h> 40#include <linux/usb/gadget.h> 41#include <linux/log2.h> | 1/* 2 * composite.h -- framework for usb gadgets which are composite devices 3 * 4 * Copyright (C) 2006-2008 David Brownell 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 25 unchanged lines hidden (view full) --- 34 * the composite model the host can use both functions at the same time. 35 */ 36 37#include <linux/bcd.h> 38#include <linux/version.h> 39#include <linux/usb/ch9.h> 40#include <linux/usb/gadget.h> 41#include <linux/log2.h> |
42#include <linux/configfs.h> |
|
42 43/* 44 * USB function drivers should return USB_GADGET_DELAYED_STATUS if they 45 * wish to delay the data/status stages of the control transfer till they 46 * are ready. The control transfer will then be kept from completing till 47 * all the function drivers that requested for USB_GADGET_DELAYED_STAUS 48 * invoke usb_composite_setup_continue(). 49 */ --- 409 unchanged lines hidden (view full) --- 459 const char *name; 460 struct module *mod; 461 struct list_head list; 462 struct usb_function_instance *(*alloc_inst)(void); 463 struct usb_function *(*alloc_func)(struct usb_function_instance *inst); 464}; 465 466struct usb_function_instance { | 43 44/* 45 * USB function drivers should return USB_GADGET_DELAYED_STATUS if they 46 * wish to delay the data/status stages of the control transfer till they 47 * are ready. The control transfer will then be kept from completing till 48 * all the function drivers that requested for USB_GADGET_DELAYED_STAUS 49 * invoke usb_composite_setup_continue(). 50 */ --- 409 unchanged lines hidden (view full) --- 460 const char *name; 461 struct module *mod; 462 struct list_head list; 463 struct usb_function_instance *(*alloc_inst)(void); 464 struct usb_function *(*alloc_func)(struct usb_function_instance *inst); 465}; 466 467struct usb_function_instance { |
468 struct config_group group; 469 struct list_head cfs_list; |
|
467 struct usb_function_driver *fd; 468 void (*free_func_inst)(struct usb_function_instance *inst); 469}; 470 471void usb_function_unregister(struct usb_function_driver *f); 472int usb_function_register(struct usb_function_driver *newf); 473void usb_put_function_instance(struct usb_function_instance *fi); 474void usb_put_function(struct usb_function *f); --- 44 unchanged lines hidden --- | 470 struct usb_function_driver *fd; 471 void (*free_func_inst)(struct usb_function_instance *inst); 472}; 473 474void usb_function_unregister(struct usb_function_driver *f); 475int usb_function_register(struct usb_function_driver *newf); 476void usb_put_function_instance(struct usb_function_instance *fi); 477void usb_put_function(struct usb_function *f); --- 44 unchanged lines hidden --- |