Home
last modified time | relevance | path

Searched refs:gadget (Results 1 – 25 of 412) sorted by relevance

12345678910>>...17

/openbmc/linux/drivers/usb/gadget/udc/
H A Dcore.c55 struct usb_gadget *gadget; member
485 int usb_gadget_frame_number(struct usb_gadget *gadget) in usb_gadget_frame_number() argument
489 ret = gadget->ops->get_frame(gadget); in usb_gadget_frame_number()
491 trace_usb_gadget_frame_number(gadget, ret); in usb_gadget_frame_number()
510 int usb_gadget_wakeup(struct usb_gadget *gadget) in usb_gadget_wakeup() argument
514 if (!gadget->ops->wakeup) { in usb_gadget_wakeup()
519 ret = gadget->ops->wakeup(gadget); in usb_gadget_wakeup()
522 trace_usb_gadget_wakeup(gadget, ret); in usb_gadget_wakeup()
537 int usb_gadget_set_remote_wakeup(struct usb_gadget *gadget, int set) in usb_gadget_set_remote_wakeup() argument
541 if (!gadget->ops->set_remote_wakeup) { in usb_gadget_set_remote_wakeup()
[all …]
/openbmc/u-boot/include/linux/usb/
H A Dgadget.h517 static inline void set_gadget_data(struct usb_gadget *gadget, void *data) in set_gadget_data() argument
519 gadget->dev.driver_data = data; in set_gadget_data()
522 static inline void *get_gadget_data(struct usb_gadget *gadget) in get_gadget_data() argument
524 return gadget->dev.driver_data; in get_gadget_data()
533 #define gadget_for_each_ep(tmp, gadget) \ argument
534 list_for_each_entry(tmp, &(gadget)->ep_list, ep_list)
576 static inline int usb_gadget_frame_number(struct usb_gadget *gadget) in usb_gadget_frame_number() argument
578 return gadget->ops->get_frame(gadget); in usb_gadget_frame_number()
594 static inline int usb_gadget_wakeup(struct usb_gadget *gadget) in usb_gadget_wakeup() argument
596 if (!gadget->ops->wakeup) in usb_gadget_wakeup()
[all …]
/openbmc/u-boot/drivers/usb/gadget/
H A Depautoconf.c47 struct usb_gadget *gadget, in ep_matches() argument
85 if (gadget_is_pxa(gadget) in ep_matches()
122 if (!gadget->is_dualspeed && max > 64) in ep_matches()
130 if (!gadget->is_dualspeed && max > 1023) in ep_matches()
136 if (!gadget->is_dualspeed) in ep_matches()
174 find_ep(struct usb_gadget *gadget, const char *name) in find_ep() argument
178 list_for_each_entry(ep, &gadget->ep_list, ep_list) { in find_ep()
216 struct usb_gadget *gadget, in usb_ep_autoconfig() argument
228 if (gadget_is_net2280(gadget) && type == USB_ENDPOINT_XFER_INT) { in usb_ep_autoconfig()
230 ep = find_ep(gadget, "ep-e"); in usb_ep_autoconfig()
[all …]
H A Dgadget_chips.h167 static inline int usb_gadget_controller_number(struct usb_gadget *gadget) in usb_gadget_controller_number() argument
169 if (gadget_is_net2280(gadget)) in usb_gadget_controller_number()
171 else if (gadget_is_dummy(gadget)) in usb_gadget_controller_number()
173 else if (gadget_is_pxa(gadget)) in usb_gadget_controller_number()
175 else if (gadget_is_sh(gadget)) in usb_gadget_controller_number()
177 else if (gadget_is_sa1100(gadget)) in usb_gadget_controller_number()
179 else if (gadget_is_goku(gadget)) in usb_gadget_controller_number()
181 else if (gadget_is_mq11xx(gadget)) in usb_gadget_controller_number()
183 else if (gadget_is_omap(gadget)) in usb_gadget_controller_number()
185 else if (gadget_is_n9604(gadget)) in usb_gadget_controller_number()
[all …]
H A Dcomposite.c92 status = usb_gadget_disconnect(cdev->gadget); in usb_function_deactivate()
119 status = usb_gadget_connect(cdev->gadget); in usb_function_activate()
216 struct usb_gadget *gadget = cdev->gadget; in config_desc() local
221 if (gadget_is_dualspeed(gadget)) { in config_desc()
222 if (gadget->speed == USB_SPEED_HIGH) in config_desc()
248 struct usb_gadget *gadget = cdev->gadget; in count_configs() local
253 if (gadget_is_dualspeed(gadget)) { in count_configs()
254 if (gadget->speed == USB_SPEED_HIGH) in count_configs()
285 qual->bMaxPacketSize0 = cdev->gadget->ep0->maxpacket; in device_qual()
308 struct usb_gadget *gadget = cdev->gadget; in set_config() local
[all …]
H A Dg_dnl.c94 struct usb_gadget *gadget = cdev->gadget; in g_dnl_unbind() local
97 "controller '%s'\n", __func__, gadget->name); in g_dnl_unbind()
98 usb_gadget_disconnect(gadget); in g_dnl_unbind()
196 struct usb_gadget *gadget = cdev->gadget; in g_dnl_get_bcd_device_number() local
199 gcnum = usb_gadget_controller_number(gadget); in g_dnl_get_bcd_device_number()
221 struct usb_gadget *gadget = cdev->gadget; in g_dnl_bind() local
225 debug("%s: gadget: 0x%p cdev: 0x%p\n", __func__, gadget, cdev); in g_dnl_bind()
261 __func__, gadget->name); in g_dnl_bind()
266 "controller '%s'\n", __func__, gadget->name); in g_dnl_bind()
267 usb_gadget_connect(gadget); in g_dnl_bind()
H A Dether.c100 struct usb_gadget *gadget; member
196 #define qlen(gadget) \ argument
197 (DEFAULT_QLEN*((gadget->speed == USB_SPEED_HIGH) ? qmult : 1))
210 #define qlen(gadget) DEFAULT_QLEN argument
930 struct usb_gadget *gadget = dev->gadget; in set_ether_config() local
935 dev->status = ep_desc(gadget, &hs_status_desc, in set_ether_config()
948 dev->in = ep_desc(gadget, &hs_source_desc, &fs_source_desc); in set_ether_config()
951 dev->out = ep_desc(gadget, &hs_sink_desc, &fs_sink_desc); in set_ether_config()
981 result = alloc_requests(dev, qlen(gadget), gfp_flags); in set_ether_config()
1048 struct usb_gadget *gadget = dev->gadget; in eth_set_config() local
[all …]
/openbmc/linux/include/linux/usb/
H A Dgadget.h313 int (*func_wakeup)(struct usb_gadget *gadget, int intf_id);
327 void (*udc_set_ssp_rate)(struct usb_gadget *gadget,
329 void (*udc_async_callbacks)(struct usb_gadget *gadget, bool enable);
333 int (*check_config)(struct usb_gadget *gadget);
460 static inline void set_gadget_data(struct usb_gadget *gadget, void *data) in set_gadget_data() argument
461 { dev_set_drvdata(&gadget->dev, data); } in set_gadget_data()
462 static inline void *get_gadget_data(struct usb_gadget *gadget) in get_gadget_data() argument
463 { return dev_get_drvdata(&gadget->dev); } in get_gadget_data()
468 static inline struct usb_gadget *usb_get_gadget(struct usb_gadget *gadget) in usb_get_gadget() argument
470 get_device(&gadget->dev); in usb_get_gadget()
[all …]
/openbmc/linux/Documentation/ABI/testing/
H A Dconfigfs-usb-gadget1 What: /config/usb-gadget
8 What: /config/usb-gadget/gadget
13 The attributes of a gadget:
16 UDC bind a gadget to UDC/unbind a gadget;
18 to bind a gadget, empty string "" to unbind.
34 What: /config/usb-gadget/gadget/configs
38 This group contains a USB gadget's configurations
40 What: /config/usb-gadget/gadget/configs/config
51 What: /config/usb-gadget/gadget/configs/config/strings
58 What: /config/usb-gadget/gadget/configs/config/strings/language
[all …]
H A Dconfigfs-usb-gadget-uvc1 What: /config/usb-gadget/gadget/functions/uvc.name
13 What: /config/usb-gadget/gadget/functions/uvc.name/control
27 What: /config/usb-gadget/gadget/functions/uvc.name/control/class
32 What: /config/usb-gadget/gadget/functions/uvc.name/control/class/ss
37 What: /config/usb-gadget/gadget/functions/uvc.name/control/class/fs
42 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal
47 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output
52 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output/default
69 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera
74 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera/default
[all …]
/openbmc/u-boot/drivers/usb/gadget/udc/
H A Dudc-core.c38 struct usb_gadget *gadget; member
49 int usb_gadget_map_request(struct usb_gadget *gadget, in usb_gadget_map_request() argument
62 void usb_gadget_unmap_request(struct usb_gadget *gadget, in usb_gadget_unmap_request() argument
91 void usb_gadget_set_state(struct usb_gadget *gadget, in usb_gadget_set_state() argument
94 gadget->state = state; in usb_gadget_set_state()
109 void usb_gadget_udc_reset(struct usb_gadget *gadget, in usb_gadget_udc_reset() argument
112 driver->reset(gadget); in usb_gadget_udc_reset()
113 usb_gadget_set_state(gadget, USB_STATE_DEFAULT); in usb_gadget_udc_reset()
132 return udc->gadget->ops->udc_start(udc->gadget, udc->driver); in usb_gadget_udc_start()
149 udc->gadget->ops->udc_stop(udc->gadget); in usb_gadget_udc_stop()
[all …]
/openbmc/linux/drivers/usb/gadget/
H A Depautoconf.c64 struct usb_gadget *gadget, in usb_ep_autoconfig_ss() argument
71 if (gadget->ops->match_ep) { in usb_ep_autoconfig_ss()
72 ep = gadget->ops->match_ep(gadget, desc, ep_comp); in usb_ep_autoconfig_ss()
78 list_for_each_entry (ep, &gadget->ep_list, ep_list) { in usb_ep_autoconfig_ss()
79 if (usb_gadget_ep_match_desc(gadget, ep, desc, ep_comp)) in usb_ep_autoconfig_ss()
100 if (++gadget->in_epnum > 15) in usb_ep_autoconfig_ss()
102 desc->bEndpointAddress = USB_DIR_IN | gadget->in_epnum; in usb_ep_autoconfig_ss()
104 if (++gadget->out_epnum > 15) in usb_ep_autoconfig_ss()
106 desc->bEndpointAddress |= gadget->out_epnum; in usb_ep_autoconfig_ss()
150 struct usb_gadget *gadget, in usb_ep_autoconfig() argument
[all …]
H A Dcomposite.c407 status = usb_gadget_deactivate(cdev->gadget); in usb_function_deactivate()
442 status = usb_gadget_activate(cdev->gadget); in usb_function_activate()
505 struct usb_gadget *gadget = func->config->cdev->gadget; in usb_func_wakeup() local
508 if (!gadget->ops->func_wakeup) in usb_func_wakeup()
525 return gadget->ops->func_wakeup(gadget, id); in usb_func_wakeup()
616 struct usb_gadget *gadget = cdev->gadget; in config_desc() local
622 if (gadget->speed >= USB_SPEED_SUPER) in config_desc()
623 speed = gadget->speed; in config_desc()
624 else if (gadget_is_dualspeed(gadget)) { in config_desc()
626 if (gadget->speed == USB_SPEED_HIGH) in config_desc()
[all …]
/openbmc/linux/drivers/usb/gadget/udc/bdc/
H A Dbdc_udc.c86 bdc->gadget.ep0->maxpacket = EP0_MAX_PKT_SIZE; in bdc_uspc_connected()
87 bdc->gadget.speed = USB_SPEED_SUPER; in bdc_uspc_connected()
98 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected()
99 bdc->gadget.speed = USB_SPEED_HIGH; in bdc_uspc_connected()
104 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected()
105 bdc->gadget.speed = USB_SPEED_FULL; in bdc_uspc_connected()
110 bdc->gadget.ep0->maxpacket = 8; in bdc_uspc_connected()
111 bdc->gadget.speed = USB_SPEED_LOW; in bdc_uspc_connected()
125 usb_gadget_set_state(&bdc->gadget, USB_STATE_DEFAULT); in bdc_uspc_connected()
145 bdc->gadget_driver->disconnect(&bdc->gadget); in bdc_uspc_disconnected()
[all …]
/openbmc/linux/drivers/usb/gadget/legacy/
H A Ddbgp.c27 struct usb_gadget *gadget; member
124 dev_dbg(&dbgp.gadget->dev, in dbgp_complete()
162 dev_dbg(&dbgp.gadget->dev, in dbgp_enable_ep_req()
204 dev_dbg(&dbgp.gadget->dev, "enable ep: failure (%d:%d)\n", stp, err); in dbgp_enable_ep()
209 static void dbgp_disconnect(struct usb_gadget *gadget) in dbgp_disconnect() argument
218 static void dbgp_unbind(struct usb_gadget *gadget) in dbgp_unbind() argument
226 usb_ep_free_request(gadget->ep0, dbgp.req); in dbgp_unbind()
235 static int dbgp_configure_endpoints(struct usb_gadget *gadget) in dbgp_configure_endpoints() argument
239 usb_ep_autoconfig_reset(gadget); in dbgp_configure_endpoints()
241 dbgp.i_ep = usb_ep_autoconfig(gadget, &i_desc); in dbgp_configure_endpoints()
[all …]
H A Draw_gadget.c174 struct usb_gadget *gadget; member
215 usb_ep_dequeue(dev->gadget->ep0, dev->req); in dev_free()
216 usb_ep_free_request(dev->gadget->ep0, dev->req); in dev_free()
279 static int gadget_bind(struct usb_gadget *gadget, in gadget_bind() argument
288 if (strcmp(gadget->name, dev->udc_name) != 0) in gadget_bind()
291 set_gadget_data(gadget, dev); in gadget_bind()
292 req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL); in gadget_bind()
294 dev_err(&gadget->dev, "usb_ep_alloc_request failed\n"); in gadget_bind()
295 set_gadget_data(gadget, NULL); in gadget_bind()
303 dev->gadget = gadget; in gadget_bind()
[all …]
H A Dether.c214 if (gadget_is_otg(c->cdev->gadget)) { in rndis_do_config()
256 if (gadget_is_otg(c->cdev->gadget)) { in eth_do_config()
271 } else if (can_support_ecm(c->cdev->gadget)) { in eth_do_config()
306 struct usb_gadget *gadget = cdev->gadget; in eth_bind() local
327 } else if (can_support_ecm(gadget)) { in eth_bind()
367 gether_set_gadget(net, cdev->gadget); in eth_bind()
374 else if (can_support_ecm(gadget)) in eth_bind()
402 if (gadget_is_otg(gadget) && !otg_desc[0]) { in eth_bind()
405 usb_desc = usb_otg_descriptor_alloc(gadget); in eth_bind()
410 usb_otg_descriptor_init(gadget, usb_desc); in eth_bind()
[all …]
H A Dcdc2.c93 if (gadget_is_otg(c->cdev->gadget)) { in cdc_do_config()
140 struct usb_gadget *gadget = cdev->gadget; in cdc_bind() local
144 if (!can_support_ecm(cdev->gadget)) { in cdc_bind()
145 dev_err(&gadget->dev, "controller '%s' not usable\n", in cdc_bind()
146 gadget->name); in cdc_bind()
178 if (gadget_is_otg(gadget) && !otg_desc[0]) { in cdc_bind()
181 usb_desc = usb_otg_descriptor_alloc(gadget); in cdc_bind()
186 usb_otg_descriptor_init(gadget, usb_desc); in cdc_bind()
197 dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n", in cdc_bind()
/openbmc/linux/drivers/usb/gadget/udc/aspeed-vhub/
H A Ddev.c60 if (d->gadget.speed == USB_SPEED_HIGH) in ast_vhub_dev_enable()
104 d->gadget.speed = USB_SPEED_UNKNOWN; in ast_vhub_dev_disable()
173 st0 = d->gadget.is_selfpowered << USB_DEVICE_SELF_POWERED; in ast_vhub_dev_status()
238 if (d->gadget.speed == USB_SPEED_UNKNOWN) { in ast_vhub_std_dev_request()
239 d->gadget.speed = ep->vhub->speed; in ast_vhub_std_dev_request()
240 if (d->gadget.speed > d->driver->max_speed) in ast_vhub_std_dev_request()
241 d->gadget.speed = d->driver->max_speed; in ast_vhub_std_dev_request()
243 d->gadget.speed); in ast_vhub_std_dev_request()
276 static int ast_vhub_udc_wakeup(struct usb_gadget* gadget) in ast_vhub_udc_wakeup() argument
278 struct ast_vhub_dev *d = to_ast_dev(gadget); in ast_vhub_udc_wakeup()
[all …]
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-support/libusbgx/
H A Dlibusbgx_git.bb15 file://gadget-start \
16 file://gadget-stop \
23 PACKAGECONFIG ??= "examples gadget-schemes libconfig"
26 PACKAGECONFIG[gadget-schemes] = "--enable-gadget-schemes,--disable-gadget-schemes"
41 install -Dm 0755 ${UNPACKDIR}/gadget-start ${D}${bindir}/gadget-start
42 sed -i -e 's,/usr/bin,${bindir},g' -e 's,/etc,${sysconfdir},g' ${D}${bindir}/gadget-start
43 install -m 0755 ${UNPACKDIR}/gadget-stop ${D}${bindir}/gadget-stop
44 sed -i -e 's,/usr/bin,${bindir},g' -e 's,/etc,${sysconfdir},g' ${D}${bindir}/gadget-stop
59 ALTERNATIVE:${PN}-examples = "${@bb.utils.contains('PACKAGECONFIG', 'examples', 'gadget-acm-ecm sho…
60 ALTERNATIVE_LINK_NAME[gadget-acm-ecm] = "${bindir}/gadget-acm-ecm"
/openbmc/openbmc/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/
H A Dandroid-tools-conf-configfs_1.0.bb10 file://android-gadget-setup \
11 file://android-gadget-start \
12 file://android-gadget-cleanup \
20 install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir}
21 install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir}
22 install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir}
24 if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then
26 install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir}
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-devtools/android-tools/
H A Dandroid-tools-conf-configfs_1.0.bb10 file://android-gadget-setup \
11 file://android-gadget-start \
12 file://android-gadget-cleanup \
20 install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir}
21 install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir}
22 install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir}
24 if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then
26 install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir}
/openbmc/linux/drivers/usb/phy/
H A Dphy-gpio-vbus-usb.c98 if (!gpio_vbus->phy.otg->gadget) in gpio_vbus_work()
116 usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
126 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
135 usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
141 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
155 otg->gadget ? otg->gadget->name : "none"); in gpio_vbus_irq()
157 if (otg->gadget) in gpio_vbus_irq()
167 struct usb_gadget *gadget) in gpio_vbus_set_peripheral() argument
175 if (!gadget) { in gpio_vbus_set_peripheral()
177 otg->gadget->name); in gpio_vbus_set_peripheral()
[all …]
/openbmc/linux/Documentation/usb/
H A Dgadget_serial.rst27 This document and the gadget serial driver itself are
36 Versions of the gadget serial driver are available for the
38 version 2.3 or later of the gadget serial driver in a 2.6
45 gadget and usb drivers as modules.
56 The gadget serial driver is a Linux USB gadget driver, a USB device
61 The gadget serial driver talks over USB to either a CDC ACM driver
84 On the device-side Linux system, the gadget serial driver looks
87 On the host-side system, the gadget serial device looks like a
98 With the gadget serial driver and the host side ACM or generic
100 the host and the gadget side systems as if they were connected by a
[all …]
/openbmc/linux/drivers/usb/isp1760/
H A Disp1760-udc.c35 static inline struct isp1760_udc *gadget_to_udc(struct usb_gadget *gadget) in gadget_to_udc() argument
37 return container_of(gadget, struct isp1760_udc, gadget); in gadget_to_udc()
566 if (udc->gadget.state != USB_STATE_DEFAULT && in isp1760_udc_set_address()
567 udc->gadget.state != USB_STATE_ADDRESS) { in isp1760_udc_set_address()
569 udc->gadget.state); in isp1760_udc_set_address()
573 usb_gadget_set_state(&udc->gadget, addr ? USB_STATE_ADDRESS : in isp1760_udc_set_address()
684 if (udc->gadget.state != USB_STATE_ADDRESS && in isp1760_ep0_setup_standard()
685 udc->gadget.state != USB_STATE_CONFIGURED) in isp1760_ep0_setup_standard()
688 stall = udc->driver->setup(&udc->gadget, req) < 0; in isp1760_ep0_setup_standard()
692 usb_gadget_set_state(&udc->gadget, req->wValue ? in isp1760_ep0_setup_standard()
[all …]

12345678910>>...17