Lines Matching +full:maximum +full:- +full:speed

1 // SPDX-License-Identifier: GPL-2.0
7 * compiled-in as well. Otherwise, if either of the two stacks is
30 * usb_ep_type_string() - Returns human readable-name of the endpoint type.
31 * @ep_type: The endpoint type to return human-readable name for. If it's not
71 [USB_SPEED_LOW] = "low-speed",
72 [USB_SPEED_FULL] = "full-speed",
73 [USB_SPEED_HIGH] = "high-speed",
75 [USB_SPEED_SUPER] = "super-speed",
76 [USB_SPEED_SUPER_PLUS] = "super-speed-plus",
81 [USB_SSP_GEN_2x1] = "super-speed-plus-gen2x1",
82 [USB_SSP_GEN_1x2] = "super-speed-plus-gen1x2",
83 [USB_SSP_GEN_2x2] = "super-speed-plus-gen2x2",
87 * usb_speed_string() - Returns human readable-name of the speed.
88 * @speed: The speed to return human-readable name for. If it's not
92 const char *usb_speed_string(enum usb_device_speed speed) in usb_speed_string() argument
94 if (speed < 0 || speed >= ARRAY_SIZE(speed_names)) in usb_speed_string()
95 speed = USB_SPEED_UNKNOWN; in usb_speed_string()
96 return speed_names[speed]; in usb_speed_string()
101 * usb_get_maximum_speed - Get maximum requested speed for a given USB
105 * The function gets the maximum speed string from property "maximum-speed",
113 ret = device_property_read_string(dev, "maximum-speed", &maximum_speed); in usb_get_maximum_speed()
127 * usb_get_maximum_ssp_rate - Get the signaling rate generation and lane count
131 * If the string from "maximum-speed" property is super-speed-plus-genXxY where
140 ret = device_property_read_string(dev, "maximum-speed", &maximum_speed); in usb_get_maximum_ssp_rate()
150 * usb_state_string - Returns human readable name for the state.
151 * @state: The state to return a human-readable name for. If it's not
205 * usb_get_role_switch_default_mode - Get default mode for given device
208 * The function gets string from property 'role-switch-default-mode',
216 ret = device_property_read_string(dev, "role-switch-default-mode", &str); in usb_get_role_switch_default_mode()
225 * usb_decode_interval - Decode bInterval into the time expressed in 1us unit
227 * @speed: The speed that the endpoint works as
233 enum usb_device_speed speed) in usb_decode_interval() argument
240 if (speed == USB_SPEED_HIGH) in usb_decode_interval()
241 interval = epd->bInterval; in usb_decode_interval()
244 interval = 1 << (epd->bInterval - 1); in usb_decode_interval()
248 if (speed == USB_SPEED_HIGH && usb_endpoint_dir_out(epd)) in usb_decode_interval()
249 interval = epd->bInterval; in usb_decode_interval()
252 if (speed >= USB_SPEED_HIGH) in usb_decode_interval()
253 interval = 1 << (epd->bInterval - 1); in usb_decode_interval()
255 interval = epd->bInterval; in usb_decode_interval()
259 interval *= (speed >= USB_SPEED_HIGH) ? 125 : 1000; in usb_decode_interval()
267 * of_usb_get_dr_mode_by_phy - Get dual role mode for the controller device
270 * @arg0: phandle args[0] for phy's with #phy-cells >= 1, or -1 for
271 * phys which do not have phy-cells
291 if (arg0 == -1) { in of_usb_get_dr_mode_by_phy()
297 "phys", "#phy-cells", in of_usb_get_dr_mode_by_phy()
323 * of_usb_host_tpl_support - to get if Targeted Peripheral List is supported
324 * for given targeted hosts (non-PC hosts)
331 return of_property_read_bool(np, "tpl-support"); in of_usb_host_tpl_support()
336 * of_usb_update_otg_caps - to update usb otg capabilities according to
349 return -EINVAL; in of_usb_update_otg_caps()
351 if (!of_property_read_u32(np, "otg-rev", &otg_rev)) { in of_usb_update_otg_caps()
358 if (otg_caps->otg_rev) in of_usb_update_otg_caps()
359 otg_caps->otg_rev = min_t(u16, otg_rev, in of_usb_update_otg_caps()
360 otg_caps->otg_rev); in of_usb_update_otg_caps()
362 otg_caps->otg_rev = otg_rev; in of_usb_update_otg_caps()
365 pr_err("%pOF: unsupported otg-rev: 0x%x\n", in of_usb_update_otg_caps()
367 return -EINVAL; in of_usb_update_otg_caps()
371 * otg-rev is mandatory for otg properties, if not passed in of_usb_update_otg_caps()
373 * Non-dt platform can set it afterwards. in of_usb_update_otg_caps()
375 otg_caps->otg_rev = 0; in of_usb_update_otg_caps()
378 if (of_property_read_bool(np, "hnp-disable")) in of_usb_update_otg_caps()
379 otg_caps->hnp_support = false; in of_usb_update_otg_caps()
380 if (of_property_read_bool(np, "srp-disable")) in of_usb_update_otg_caps()
381 otg_caps->srp_support = false; in of_usb_update_otg_caps()
382 if (of_property_read_bool(np, "adp-disable") || in of_usb_update_otg_caps()
383 (otg_caps->otg_rev < 0x0200)) in of_usb_update_otg_caps()
384 otg_caps->adp_support = false; in of_usb_update_otg_caps()
391 * usb_of_get_companion_dev - Find the companion device
406 node = of_parse_phandle(dev->of_node, "companion", 0); in usb_of_get_companion_dev()
412 return pdev ? &pdev->dev : NULL; in usb_of_get_companion_dev()