[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <31a619c6-f3dc-4a31-93c8-1a24a92d88ed@wolfvision.net>
Date: Thu, 4 Jan 2024 18:15:17 +0100
From: Javier Carrasco <javier.carrasco@...fvision.net>
To: Roger Quadros <rogerq@...nel.org>, Jai Luthra <j-luthra@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org, vigneshr@...com,
d-gole@...com, nm@...com
Subject: Re: [PATCH v2 0/4] usb: typec: tipd: add patch update support for
tps6598x
On 04.01.24 18:08, Roger Quadros wrote:
>
>
> On 04/01/2024 18:36, Javier Carrasco wrote:
>> Hi Roger,
>>
>> that fix only removes the reset function and does nothing instead, but
>> the reset call is identical for both devices (hence why there was a
>> single function for both devices). As I mentioned in my reply to Jai
>
> This is incorrect.
>
> Look at the original code, the GAID command is issued only if it is a
> tps25750 device.
>
> Below is your part of the code that replaces it with reset() ops.
>
>> @@ -1340,8 +1360,8 @@ static int tps6598x_probe(struct i2c_client *client)
>> tps6598x_write64(tps, TPS_REG_INT_MASK1, 0);
>> err_reset_controller:
>> /* Reset PD controller to remove any applied patch */
>> - if (is_tps25750)
>> - tps6598x_exec_cmd_tmo(tps, "GAID", 0, NULL, 0, NULL, 2000, 0);
>> + tps->data->reset(tps);
>> +
>> return ret;
>> }
>
> which means the GAID command will be executed for both tps25750 and tps6598x
> as you have a single reset function for both.
> This is a problem for boards using the tps6598x.
>
I have to admit that the GAID for the tps6598x should have been added
separately, and not right away with the function pointers. I added extra
functionality that was not expected. On the other hand, the GAID command
is supported by the tps6598x as well (Technical Reference Manual, page
113). Hence why I was surprised that using the same command for the
tps6598x is a problem.
Powered by blists - more mailing lists