• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/usb/gadget/

Lines Matching defs:config

76  * @config: the configuration
88 int usb_add_function(struct usb_configuration *config,
93 DBG(config->cdev, "adding '%s'/%p to config '%s'/%p\n",
95 config->label, config);
100 function->config = config;
101 list_add_tail(&function->list, &config->functions);
105 value = function->bind(config, function);
108 function->config = NULL;
118 if (!config->fullspeed && function->descriptors)
119 config->fullspeed = true;
120 if (!config->highspeed && function->hs_descriptors)
121 config->highspeed = true;
125 DBG(config->cdev, "adding '%s'/%p --> %d\n",
151 struct usb_composite_dev *cdev = function->config->cdev;
178 struct usb_composite_dev *cdev = function->config->cdev;
197 * @config: configuration associated with the interface
218 int usb_interface_id(struct usb_configuration *config,
221 unsigned id = config->next_interface_id;
224 config->interface[id] = function;
225 config->next_interface_id = id + 1;
231 static int config_buf(struct usb_configuration *config,
240 /* write the config descriptor */
245 c->bNumInterfaces = config->next_interface_id;
246 c->bConfigurationValue = config->bConfigurationValue;
247 c->iConfiguration = config->iConfiguration;
248 c->bmAttributes = USB_CONFIG_ATT_ONE | config->bmAttributes;
249 c->bMaxPower = config->bMaxPower ? : (CONFIG_USB_GADGET_VBUS_DRAW / 2);
252 if (config->descriptors) {
254 config->descriptors);
262 list_for_each_entry(f, &config->functions, list) {
303 /* This is a lookup by config *INDEX* */
371 DBG(cdev, "reset config\n");
373 list_for_each_entry(f, &cdev->config->functions, list) {
379 cdev->config = NULL;
391 if (cdev->config)
406 INFO(cdev, "%s speed config #%d: %s\n",
418 cdev->config = c;
472 * @config: the configuration, with bConfigurationValue assigned
484 struct usb_configuration *config)
489 DBG(cdev, "adding config #%u '%s'/%p\n",
490 config->bConfigurationValue,
491 config->label, config);
493 if (!config->bConfigurationValue || !config->bind)
498 if (c->bConfigurationValue == config->bConfigurationValue) {
504 config->cdev = cdev;
505 list_add_tail(&config->list, &cdev->configs);
507 INIT_LIST_HEAD(&config->functions);
508 config->next_interface_id = 0;
510 status = config->bind(config);
512 list_del(&config->list);
513 config->cdev = NULL;
518 config->bConfigurationValue, config,
519 config->highspeed ? " high" : "",
520 config->fullspeed
527 struct usb_function *f = config->interface[i];
536 /* set_alt(), or next config->bind(), sets up
543 DBG(cdev, "added config '%s'/%u --> %d\n", config->label,
544 config->bConfigurationValue, status);
768 * the work is in config and function specific setup.
850 if (cdev->config)
851 *(u8 *)req->buf = cdev->config->bConfigurationValue;
863 if (!cdev->config || w_index >= MAX_CONFIG_INTERFACES)
865 f = cdev->config->interface[intf];
875 if (!cdev->config || w_index >= MAX_CONFIG_INTERFACES)
877 f = cdev->config->interface[intf];
900 * in config 0, etc.
904 if (cdev->config)
905 f = cdev->config->interface[intf];
910 list_for_each_entry(f, &cdev->config->functions, list) {
914 if (&f->list == &cdev->config->functions)
924 c = cdev->config;
954 /* REVISIT: should we have config and device level
958 if (cdev->config)
989 WARN_ON(cdev->config);
1011 DBG(cdev, "unbind config '%s'/%p\n", c->label, c);
1138 /* REVISIT: should we have config level
1142 if (cdev->config) {
1143 list_for_each_entry(f, &cdev->config->functions, list) {
1160 /* REVISIT: should we have config level
1166 if (cdev->config) {
1167 list_for_each_entry(f, &cdev->config->functions, list) {