Re: [PATCH v2 1/4] usb: typec: tipd: add init and reset functions to tipd_data

From: Javier Carrasco
Date: Thu Jan 04 2024 - 11:41:51 EST


On 04.01.24 17:14, Roger Quadros wrote:
>> @@ -1393,7 +1412,7 @@ static int __maybe_unused tps6598x_resume(struct device *dev)
>> if (ret < 0)
>> return ret;
>>
>> - if (device_is_compatible(tps->dev, "ti,tps25750") && ret == TPS_MODE_PTCH) {
>> + if (ret == TPS_MODE_PTCH) {
>
> Won't this function will be invoked for all variants?
> If so, why are we calling a tsp25750 specific function here?
>
>> ret = tps25750_init(tps);
>> if (ret)
>> return ret;

Hi Roger,

good catch. The device-specific init function should be called instead,
as it is already done in the probe function:

ret = tps->data->init(tps);
if (ret)
return ret;

I will send the fix asap.

Thanks a lot for your feedback and best regards,
Javier Carrasco