typec_switch
struct typec_switch *orient_sw;
struct typec_switch *ori_sw;
struct typec_switch *typec_switch;
typec_switch_set(alt_port->typec_switch, alt_port->orientation);
alt_port->typec_switch = fwnode_typec_switch_get(fwnode);
if (IS_ERR(alt_port->typec_switch)) {
return dev_err_probe(dev, PTR_ERR(alt_port->typec_switch),
alt_port->typec_switch);
ctx->typec.typec_switch = typec_switch_register(dev, &sw_desc);
if (IS_ERR(ctx->typec.typec_switch)) {
return PTR_ERR(ctx->typec.typec_switch);
if (ctx->typec.typec_switch) {
typec_switch_unregister(ctx->typec.typec_switch);
ctx->typec.typec_switch = NULL;
struct typec_switch_dev *typec_switch;
struct typec_switch;
struct typec_switch *sw;
void typec_switch_put(struct typec_switch *sw)
int typec_switch_set(struct typec_switch *sw,
struct typec_switch *fwnode_typec_switch_get(struct fwnode_handle *fwnode)
struct typec_switch *sw;
ret = typec_switch_set(nb7->typec_switch, orientation);
nb7->typec_switch = fwnode_typec_switch_get(dev->fwnode);
if (IS_ERR(nb7->typec_switch))
return dev_err_probe(dev, PTR_ERR(nb7->typec_switch),
typec_switch_put(nb7->typec_switch);
typec_switch_put(nb7->typec_switch);
struct typec_switch *typec_switch;
ret = typec_switch_set(retimer->typec_switch, orientation);
retimer->typec_switch = typec_switch_get(dev);
if (IS_ERR(retimer->typec_switch))
return dev_err_probe(dev, PTR_ERR(retimer->typec_switch),
typec_switch_put(retimer->typec_switch);
typec_switch_put(retimer->typec_switch);
struct typec_switch *typec_switch;
ret = typec_switch_set(ptn->typec_switch, orientation);
ptn->typec_switch = fwnode_typec_switch_get(dev->fwnode);
if (IS_ERR(ptn->typec_switch))
return dev_err_probe(dev, PTR_ERR(ptn->typec_switch),
typec_switch_put(ptn->typec_switch);
typec_switch_put(ptn->typec_switch);
struct typec_switch *typec_switch;
struct typec_switch *codec_switch;
struct typec_switch;
struct typec_switch *fwnode_typec_switch_get(struct fwnode_handle *fwnode);
void typec_switch_put(struct typec_switch *sw);
int typec_switch_set(struct typec_switch *sw,
static inline struct typec_switch *
static inline void typec_switch_put(struct typec_switch *sw) {}
static inline int typec_switch_set(struct typec_switch *sw,
static inline struct typec_switch *typec_switch_get(struct device *dev)
struct typec_switch *typec_switch;
if (!wcd939x->typec_analog_mux || !wcd939x->typec_switch)
typec_switch_set(wcd939x->typec_switch,
wcd939x->typec_switch = fwnode_typec_switch_get(dev->fwnode);
if (IS_ERR(wcd939x->typec_switch))
return dev_err_probe(dev, PTR_ERR(wcd939x->typec_switch),
typec_switch_put(wcd939x->typec_switch);