usb: typec: tcpc: Make it compile
Change-Id: I40140af175568aa30dc717c2bdcc82edf533cf14 Signed-off-by: Jens Reidel <adrian@travitia.xyz>
This commit is contained in:
parent
547ce8e91b
commit
e9cb800785
@ -370,7 +370,7 @@ static inline uint8_t dp_dfp_u_select_mode(struct pd_port *pd_port,
|
|||||||
struct svdm_mode *remote, *local;
|
struct svdm_mode *remote, *local;
|
||||||
int i, j;
|
int i, j;
|
||||||
int match_score, best_match_score = 0;
|
int match_score, best_match_score = 0;
|
||||||
int local_index = -1, remote_index = -1;
|
int remote_index = -1;
|
||||||
struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc;
|
struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc;
|
||||||
|
|
||||||
local = &svid_data->local_mode;
|
local = &svid_data->local_mode;
|
||||||
@ -390,7 +390,6 @@ static inline uint8_t dp_dfp_u_select_mode(struct pd_port *pd_port,
|
|||||||
&local_dp_config,
|
&local_dp_config,
|
||||||
&remote_dp_config);
|
&remote_dp_config);
|
||||||
if (match_score > best_match_score) {
|
if (match_score > best_match_score) {
|
||||||
local_index = j;
|
|
||||||
remote_index = i;
|
remote_index = i;
|
||||||
dp_data->local_config = local_dp_config;
|
dp_data->local_config = local_dp_config;
|
||||||
dp_data->remote_config = remote_dp_config;
|
dp_data->remote_config = remote_dp_config;
|
||||||
|
@ -758,10 +758,8 @@ static inline int rt1711_fault_status_vconn_ov(struct tcpc_device *tcpc)
|
|||||||
|
|
||||||
int rt1711_fault_status_clear(struct tcpc_device *tcpc, uint8_t status)
|
int rt1711_fault_status_clear(struct tcpc_device *tcpc, uint8_t status)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (status & TCPC_V10_REG_FAULT_STATUS_VCONN_OV)
|
if (status & TCPC_V10_REG_FAULT_STATUS_VCONN_OV)
|
||||||
ret = rt1711_fault_status_vconn_ov(tcpc);
|
rt1711_fault_status_vconn_ov(tcpc);
|
||||||
|
|
||||||
rt1711_i2c_write8(tcpc, TCPC_V10_REG_FAULT_STATUS, status);
|
rt1711_i2c_write8(tcpc, TCPC_V10_REG_FAULT_STATUS, status);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -190,11 +190,10 @@
|
|||||||
/* timeout = (tout+1) * 12.5ms */
|
/* timeout = (tout+1) * 12.5ms */
|
||||||
#define RT1711H_REG_I2CRST_SET(en, tout) ((en << 7) | (tout & 0x0f))
|
#define RT1711H_REG_I2CRST_SET(en, tout) ((en << 7) | (tout & 0x0f))
|
||||||
|
|
||||||
#if ENABLE_RT1711_DBG
|
|
||||||
#define RT1711_INFO(format, args...) \
|
#define RT1711_INFO(format, args...) \
|
||||||
pd_dbg_info("%s() line-%d: " format, __func__, __LINE__, ##args)
|
{ \
|
||||||
#else
|
if (ENABLE_RT1711_DBG) \
|
||||||
#define RT1711_INFO(foramt, args...)
|
pd_dbg_info("%s() line-%d: " format, __func__, __LINE__, ##args); \
|
||||||
#endif
|
}
|
||||||
|
|
||||||
#endif /* #ifndef __LINUX_RT1711H_H */
|
#endif /* #ifndef __LINUX_RT1711H_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user