Searched refs:rdo (Results 1 – 2 of 2) sorted by relevance
404 static inline unsigned int rdo_index(u32 rdo) in rdo_index() argument406 return (rdo >> RDO_OBJ_POS_SHIFT) & RDO_OBJ_POS_MASK; in rdo_index()409 static inline unsigned int rdo_op_current(u32 rdo) in rdo_op_current() argument411 return ((rdo >> RDO_FIXED_OP_CURR_SHIFT) & RDO_CURR_MASK) * 10; in rdo_op_current()414 static inline unsigned int rdo_max_current(u32 rdo) in rdo_max_current() argument416 return ((rdo >> RDO_FIXED_MAX_CURR_SHIFT) & in rdo_max_current()420 static inline unsigned int rdo_op_power(u32 rdo) in rdo_op_power() argument422 return ((rdo >> RDO_BATT_OP_PWR_SHIFT) & RDO_PWR_MASK) * 250; in rdo_op_power()425 static inline unsigned int rdo_max_power(u32 rdo) in rdo_max_power() argument427 return ((rdo >> RDO_BATT_MAX_PWR_SHIFT) & RDO_PWR_MASK) * 250; in rdo_max_power()
2052 u32 pdo, rdo = port->sink_request; in tcpm_pd_check_request() local2056 index = rdo_index(rdo); in tcpm_pd_check_request()2065 max = rdo_max_current(rdo); in tcpm_pd_check_request()2066 op = rdo_op_current(rdo); in tcpm_pd_check_request()2071 if (max > pdo_max && !(rdo & RDO_CAP_MISMATCH)) in tcpm_pd_check_request()2085 max = rdo_max_power(rdo); in tcpm_pd_check_request()2086 op = rdo_op_power(rdo); in tcpm_pd_check_request()2091 if (max > pdo_max && !(rdo & RDO_CAP_MISMATCH)) in tcpm_pd_check_request()2302 static int tcpm_pd_build_request(struct tcpm_port *port, u32 *rdo) in tcpm_pd_build_request() argument2363 *rdo = RDO_BATT(src_pdo_index + 1, mw, max_mw, flags); in tcpm_pd_build_request()[all …]