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
45 * usb_otg_state_string() - returns human readable name of OTG state.
77 [USB_SPEED_LOW] = "low-speed",
78 [USB_SPEED_FULL] = "full-speed",
79 [USB_SPEED_HIGH] = "high-speed",
81 [USB_SPEED_SUPER] = "super-speed",
82 [USB_SPEED_SUPER_PLUS] = "super-speed-plus",
87 [USB_SSP_GEN_2x1] = "super-speed-plus-gen2x1",
88 [USB_SSP_GEN_1x2] = "super-speed-plus-gen1x2",
89 [USB_SSP_GEN_2x2] = "super-speed-plus-gen2x2",
93 * usb_speed_string() - Returns human readable-name of the speed.
94 * @speed: The speed to return human-readable name for. If it's not
98 const char *usb_speed_string(enum usb_device_speed speed) in usb_speed_string() argument
100 if (speed < 0 || speed >= ARRAY_SIZE(speed_names)) in usb_speed_string()
101 speed = USB_SPEED_UNKNOWN; in usb_speed_string()
102 return speed_names[speed]; in usb_speed_string()
107 * usb_get_maximum_speed - Get maximum requested speed for a given USB
111 * The function gets the maximum speed string from property "maximum-speed",
116 const char *p = "maximum-speed"; in usb_get_maximum_speed()
132 * usb_get_maximum_ssp_rate - Get the signaling rate generation and lane count
136 * If the string from "maximum-speed" property is super-speed-plus-genXxY where
145 ret = device_property_read_string(dev, "maximum-speed", &maximum_speed); in usb_get_maximum_ssp_rate()
155 * usb_state_string - Returns human readable name for the state.
156 * @state: The state to return a human-readable name for. If it's not
189 * usb_get_dr_mode_from_string() - Get dual role mode for given string
218 * usb_get_role_switch_default_mode - Get default mode for given device
221 * The function gets string from property 'role-switch-default-mode',
229 ret = device_property_read_string(dev, "role-switch-default-mode", &str); in usb_get_role_switch_default_mode()
238 * usb_decode_interval - Decode bInterval into the time expressed in 1us unit
240 * @speed: The speed that the endpoint works as
246 enum usb_device_speed speed) in usb_decode_interval() argument
253 if (speed == USB_SPEED_HIGH) in usb_decode_interval()
254 interval = epd->bInterval; in usb_decode_interval()
257 interval = 1 << (epd->bInterval - 1); in usb_decode_interval()
261 if (speed == USB_SPEED_HIGH && usb_endpoint_dir_out(epd)) in usb_decode_interval()
262 interval = epd->bInterval; in usb_decode_interval()
265 if (speed >= USB_SPEED_HIGH) in usb_decode_interval()
266 interval = 1 << (epd->bInterval - 1); in usb_decode_interval()
268 interval = epd->bInterval; in usb_decode_interval()
272 interval *= (speed >= USB_SPEED_HIGH) ? 125 : 1000; in usb_decode_interval()
280 * of_usb_get_dr_mode_by_phy - Get dual role mode for the controller device
283 * @arg0: phandle args[0] for phy's with #phy-cells >= 1, or -1 for
284 * phys which do not have phy-cells
303 if (arg0 == -1) { in of_usb_get_dr_mode_by_phy()
309 "phys", "#phy-cells", in of_usb_get_dr_mode_by_phy()
335 * of_usb_host_tpl_support - to get if Targeted Peripheral List is supported
336 * for given targeted hosts (non-PC hosts)
343 return of_property_read_bool(np, "tpl-support"); in of_usb_host_tpl_support()
348 * of_usb_update_otg_caps - to update usb otg capabilities according to
361 return -EINVAL; in of_usb_update_otg_caps()
363 if (!of_property_read_u32(np, "otg-rev", &otg_rev)) { in of_usb_update_otg_caps()
370 if (otg_caps->otg_rev) in of_usb_update_otg_caps()
371 otg_caps->otg_rev = min_t(u16, otg_rev, in of_usb_update_otg_caps()
372 otg_caps->otg_rev); in of_usb_update_otg_caps()
374 otg_caps->otg_rev = otg_rev; in of_usb_update_otg_caps()
377 pr_err("%pOF: unsupported otg-rev: 0x%x\n", in of_usb_update_otg_caps()
379 return -EINVAL; in of_usb_update_otg_caps()
383 * otg-rev is mandatory for otg properties, if not passed in of_usb_update_otg_caps()
385 * Non-dt platform can set it afterwards. in of_usb_update_otg_caps()
387 otg_caps->otg_rev = 0; in of_usb_update_otg_caps()
390 if (of_property_read_bool(np, "hnp-disable")) in of_usb_update_otg_caps()
391 otg_caps->hnp_support = false; in of_usb_update_otg_caps()
392 if (of_property_read_bool(np, "srp-disable")) in of_usb_update_otg_caps()
393 otg_caps->srp_support = false; in of_usb_update_otg_caps()
394 if (of_property_read_bool(np, "adp-disable") || in of_usb_update_otg_caps()
395 (otg_caps->otg_rev < 0x0200)) in of_usb_update_otg_caps()
396 otg_caps->adp_support = false; in of_usb_update_otg_caps()
403 * usb_of_get_companion_dev - Find the companion device
418 node = of_parse_phandle(dev->of_node, "companion", 0); in usb_of_get_companion_dev()
424 return pdev ? &pdev->dev : NULL; in usb_of_get_companion_dev()