As we need to use DRP config for data role, but the power role is source only,
so introduce a property sink-disable to avoid sink vbus command.
Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
bool controls_vbus;
bool drive_vbus;
+ bool sink_disable;
struct gpio_desc *ss_sel_gpio;
struct tcpc_dev tcpc;
tcpci->drive_vbus = true;
}
- if (sink) {
+ if (sink && !tcpci->sink_disable) {
ret = regmap_write(tcpci->regmap, TCPC_COMMAND,
TCPC_CMD_SINK_VBUS);
if (ret < 0)
&tcfg->operating_snk_mw))
goto snk_setting_wrong;
+ /*
+ * In case DRP only for data role, power role is source only
+ * we can use this property to disable power sink.
+ */
+ if (device_property_read_bool(tcpci->dev, "sink-disable"))
+ tcpci->sink_disable = true;
+
return 0;
snk_setting_wrong: