diff options
Diffstat (limited to 'driver/tcpm/ps8xxx.c')
-rw-r--r-- | driver/tcpm/ps8xxx.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c index 51b6c4c412..37bfb30cc0 100644 --- a/driver/tcpm/ps8xxx.c +++ b/driver/tcpm/ps8xxx.c @@ -367,6 +367,21 @@ uint16_t board_get_ps8xxx_product_id(int port) return 0; } +bool check_ps8755_chip(int port) +{ + int val; + int p0_addr; + int status; + bool is_ps8755 = false; + + p0_addr = PS8751_P3_TO_P0_FLAGS(tcpc_config[port].i2c_info.addr_flags); + status = tcpc_addr_read(port, p0_addr, PS8755_P0_REG_SM, &val); + if (status == EC_SUCCESS && val == PS8755_P0_REG_SM_VALUE) + is_ps8755 = true; + + return is_ps8755; +} + void ps8xxx_tcpc_update_hpd_status(const struct usb_mux *me, int hpd_lvl, int hpd_irq) { |