return ret;
}
+static int s2mu106_set_rp_control(void *_data, int val)
+{
+ struct usbpd_data *data = (struct usbpd_data *) _data;
+ struct s2mu106_usbpd_data *pdic_data = data->phy_driver_data;
+
+ mutex_lock(&pdic_data->cc_mutex);
+ s2mu106_usbpd_set_rp_scr_sel(pdic_data, val);
+ mutex_unlock(&pdic_data->cc_mutex);
+
+ return 0;
+}
+
static int s2mu106_vbus_on_check(void *_data)
{
struct usbpd_data *data = (struct usbpd_data *) _data;
dev_err(&i2c->dev, "%s, abnormal attach\n", __func__);
return -1;
}
- s2mu106_usbpd_set_rp_scr_sel(pdic_data, PLUG_CTRL_RP180);
ret = s2mu106_usbpd_check_accessory(pdic_data);
if (ret < 0) {
dev_info(&i2c->dev, "%s attach accessory\n", __func__);
.pr_swap = s2mu106_pr_swap,
.vbus_on_check = s2mu106_vbus_on_check,
.set_pwr_opmode = s2mu106_set_pwr_opmode,
+ .set_rp_control = s2mu106_set_rp_control,
};
#if defined CONFIG_PM
pd_data->phy_ops.get_side_check = ops->get_side_check;
pd_data->phy_ops.pr_swap = ops->pr_swap;
pd_data->phy_ops.vbus_on_check = ops->vbus_on_check;
+ pd_data->phy_ops.set_rp_control = ops->set_rp_control;
pd_data->phy_ops.set_pwr_opmode = ops->set_pwr_opmode;
}
return ret;
usbpd_send_ctrl_msg(pd_data, &policy->tx_msg_header, USBPD_PS_RDY, USBPD_DFP, USBPD_SOURCE);
+ pd_data->phy_ops.set_rp_control(pd_data, PLUG_CTRL_RP180);
+
ret = PE_SRC_Ready;
break;
}
int (*set_cc_control)(void *, int);
void (*pr_swap)(void *, int);
int (*vbus_on_check)(void *);
+ int (*set_rp_control)(void *, int);
int (*get_side_check)(void *_data);
void (*set_pwr_opmode)(void *_data, int mode);
} usbpd_phy_ops_type;