struct device *dev;
struct gpio_desc *port_orientation[PMIC_GLINK_MAX_PORTS];
- struct typec_switch *port_switch[PMIC_GLINK_MAX_PORTS];
struct pmic_glink_client *client;
orientation = gpiod_get_value(ucsi->port_orientation[con->num - 1]);
if (orientation >= 0) {
- typec_switch_set(ucsi->port_switch[con->num - 1],
- orientation ? TYPEC_ORIENTATION_REVERSE
- : TYPEC_ORIENTATION_NORMAL);
+ typec_set_orientation(con->port,
+ orientation ?
+ TYPEC_ORIENTATION_REVERSE :
+ TYPEC_ORIENTATION_NORMAL);
}
}
return dev_err_probe(dev, PTR_ERR(desc),
"unable to acquire orientation gpio\n");
ucsi->port_orientation[port] = desc;
-
- ucsi->port_switch[port] = fwnode_typec_switch_get(fwnode);
- if (IS_ERR(ucsi->port_switch[port]))
- return dev_err_probe(dev, PTR_ERR(ucsi->port_switch[port]),
- "failed to acquire orientation-switch\n");
}
ucsi->client = devm_pmic_glink_register_client(dev,