diff options
Diffstat (limited to 'board/honeybuns/usb_pd_policy.c')
-rw-r--r-- | board/honeybuns/usb_pd_policy.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/board/honeybuns/usb_pd_policy.c b/board/honeybuns/usb_pd_policy.c index b1a0990852..ca0ead8dbb 100644 --- a/board/honeybuns/usb_pd_policy.c +++ b/board/honeybuns/usb_pd_policy.c @@ -58,32 +58,6 @@ int pd_is_valid_input_voltage(int mv) return 1; } -int pd_check_requested_voltage(uint32_t rdo) -{ - int max_ma = rdo & 0x3FF; - int op_ma = (rdo >> 10) & 0x3FF; - int idx = rdo >> 28; - uint32_t pdo; - uint32_t pdo_ma; - - if (!idx || idx > pd_src_pdo_cnt) - return EC_ERROR_INVAL; /* Invalid index */ - - /* check current ... */ - pdo = pd_src_pdo[idx - 1]; - pdo_ma = (pdo & 0x3ff); - if (op_ma > pdo_ma) - return EC_ERROR_INVAL; /* too much op current */ - if (max_ma > pdo_ma) - return EC_ERROR_INVAL; /* too much max current */ - - CPRINTF("Requested %d V %d mA (for %d/%d mA)\n", - ((pdo >> 10) & 0x3ff) * 50, (pdo & 0x3ff) * 10, - ((rdo >> 10) & 0x3ff) * 10, (rdo & 0x3ff) * 10); - - return EC_SUCCESS; -} - void pd_transition_voltage(int idx) { /* PDO index are starting from 1 */ |