In our use case, it was not desirable to leave this default based on wiring, and it makes more sense to me to allow the configuration to come from the fwnode property. Hence the port type setting in probe(). > > > static const struct typec_operations hd3ss3220_ops = { > > - .dr_set = hd3ss3220_dr_set > > + .dr_set = hd3ss3220_dr_set, > > + .port_type_set = hd3ss3220_port_type_set, > > }; > > So here I think you should implement the pr_set callback instead. I can do that, but based on the MODE_SELECT register description, it seems to me that this setting is fundamentally changing the operation mode of the chip, i.e. the state machine that is being run for initial connection. So there would have to be a way of "resetting" it to be a dual-role port again, which the "pr_set" callback doesn't seem to have? This register can be written to set the HD3SS3220 mode operation. The ADDR pin must be set to I2C mode. If the default is maintained, HD3SS3220 shall operate according to the PORT pin levels and modes. The MODE_SELECT can only be changed when in the unattached state. 00 - DRP mode (start from unattached.SNK) (default) 01 - UFP mode (unattached.SNK) 10 - DFP mode (unattached.SRC) 11 - DRP mode (start from unattached.SNK) > > Let me kwno wh > > > static void hd3ss3220_set_role(struct hd3ss3220 *hd3ss3220) > > @@ -273,6 +333,10 @@ static int hd3ss3220_probe(struct i2c_client > *client) > > if (ret != 0 && ret != -EINVAL && ret != -ENXIO) > > goto err_put_role; > > > > + ret = hd3ss3220_set_port_type(hd3ss3220, typec_cap.type); > > + if (ret < 0) > > + goto err_put_role; > > + > > hd3ss3220->port = typec_register_port(&client->dev, &typec_cap); > > if (IS_ERR(hd3ss3220->port)) { > > ret = PTR_ERR(hd3ss3220->port); > > > > thanks, > > -- > heikki Thanks! Oliver