Lines Matching +full:10 +full:- +full:bit
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright 2015-2017 Google, Inc
25 PD_CTRL_PR_SWAP = 10,
29 /* 14-15 Reserved */
36 /* 22-31 Reserved */
49 /* 9-14 Reserved */
51 /* 16-31 Reserved */
65 PD_EXT_FW_UPDATE_REQUEST = 10,
70 /* 15-31 Reserved */
78 #define PD_HEADER_EXT_HDR BIT(15)
83 #define PD_HEADER_PWR_ROLE BIT(8)
86 #define PD_HEADER_DATA_ROLE BIT(5)
142 #define PD_EXT_HDR_CHUNKED BIT(15)
145 #define PD_EXT_HDR_REQ_CHUNK BIT(10)
179 * struct pd_chunked_ext_message_data - PD chunked extended message data as
190 * struct pd_message - PD message as seen on wire
222 #define PDO_FIXED_DUAL_ROLE BIT(29) /* Power role swap supported */
223 #define PDO_FIXED_SUSPEND BIT(28) /* USB Suspend supported (Source) */
224 #define PDO_FIXED_HIGHER_CAP BIT(28) /* Requires more than vSafe5V (Sink) */
225 #define PDO_FIXED_EXTPOWER BIT(27) /* Externally powered */
226 #define PDO_FIXED_USB_COMM BIT(26) /* USB communications capable */
227 #define PDO_FIXED_DATA_SWAP BIT(25) /* Data role swap supported */
228 #define PDO_FIXED_UNCHUNK_EXT BIT(24) /* Unchunked Extended Message supported (Source) */
229 #define PDO_FIXED_FRS_CURR_MASK (BIT(24) | BIT(23)) /* FR_Swap Current (Sink) */
231 #define PDO_FIXED_VOLT_SHIFT 10 /* 50mV units */
232 #define PDO_FIXED_CURR_SHIFT 0 /* 10mA units */
235 #define PDO_FIXED_CURR(ma) ((((ma) / 10) & PDO_CURR_MASK) << PDO_FIXED_CURR_SHIFT)
244 #define PDO_BATT_MIN_VOLT_SHIFT 10 /* 50mV units */
256 #define PDO_VAR_MIN_VOLT_SHIFT 10 /* 50mV units */
257 #define PDO_VAR_MAX_CURR_SHIFT 0 /* 10mA units */
261 #define PDO_VAR_MAX_CURR(ma) ((((ma) / 10) & PDO_CURR_MASK) << PDO_VAR_MAX_CURR_SHIFT)
271 #define PDO_APDO_TYPE_SHIFT 28 /* Only valid value currently is 0x0 - PPS */
317 return ((pdo >> PDO_VAR_MAX_CURR_SHIFT) & PDO_CURR_MASK) * 10; in pdo_max_current()
351 #define RDO_GIVE_BACK BIT(27) /* Supports reduced operating current */
352 #define RDO_CAP_MISMATCH BIT(26) /* Not satisfied by source caps */
353 #define RDO_USB_COMM BIT(25) /* USB communications capable */
354 #define RDO_NO_SUSPEND BIT(24) /* USB Suspend not supported */
359 #define RDO_FIXED_OP_CURR_SHIFT 10
364 #define PDO_FIXED_OP_CURR(ma) ((((ma) / 10) & RDO_CURR_MASK) << RDO_FIXED_OP_CURR_SHIFT)
365 #define PDO_FIXED_MAX_CURR(ma) ((((ma) / 10) & RDO_CURR_MASK) << RDO_FIXED_MAX_CURR_SHIFT)
371 #define RDO_BATT_OP_PWR_SHIFT 10 /* 250mW units */
406 return ((rdo >> RDO_FIXED_OP_CURR_SHIFT) & RDO_CURR_MASK) * 10; in rdo_op_current()
412 RDO_CURR_MASK) * 10; in rdo_max_current()
431 #define EUDO_USB4_DRD BIT(26)
432 #define EUDO_USB3_DRD BIT(25)
450 #define EUDO_PCIE_SUPPORT BIT(16)
451 #define EUDO_DP_SUPPORT BIT(15)
452 #define EUDO_TBT_SUPPORT BIT(14)
453 #define EUDO_HOST_PRESENT BIT(13)
456 #define PD_T_NO_RESPONSE 5000 /* 4.5 - 5.5 seconds */
457 #define PD_T_DB_DETECT 10000 /* 10 - 15 seconds */
458 #define PD_T_SEND_SOURCE_CAP 150 /* 100 - 200 ms */
459 #define PD_T_SENDER_RESPONSE 60 /* 24 - 30 ms, relaxed */
463 #define PD_T_SINK_WAIT_CAP 310 /* 310 - 620 ms */
470 #define PD_T_PS_SOURCE_ON_PRS 450 /* 390 - 480ms */
482 #define PD_T_BIST_CONT_MODE 50 /* 30 - 60 ms */
483 #define PD_T_SINK_TX 16 /* 16 - 20 ms */
484 #define PD_T_CHUNK_NOT_SUPP 42 /* 40 - 50 ms */
486 #define PD_T_DRP_TRY 100 /* 75 - 150 ms */
487 #define PD_T_DRP_TRYWAIT 600 /* 400 - 800 ms */
489 #define PD_T_CC_DEBOUNCE 200 /* 100 - 200 ms */
490 #define PD_T_PD_DEBOUNCE 20 /* 10 - 20 ms */
491 #define PD_T_TRY_CC_DEBOUNCE 15 /* 10 - 20 ms */
503 * usb_power_delivery_desc - USB Power Delivery Descriptor
505 * @version: USB Power Delivery Specicication Version - optional
513 * usb_power_delivery_capabilities_desc - Description of USB Power Delivery Capabilities Message