[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZQsBzl2LBj0SQAqt@primary>
Date: Wed, 20 Sep 2023 10:29:34 -0400
From: Abdel Alkuor <alkuor@...il.com>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: krzysztof.kozlowski+dt@...aro.org, bryan.odonoghue@...aro.org,
gregkh@...uxfoundation.org, robh+dt@...nel.org,
linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
conor+dt@...nel.org, linux-kernel@...r.kernel.org,
abdelalkuor@...tab.com, ryanmacdonald@...tab.com
Subject: Re: [PATCH v5 02/15] USB: typec: Add cmd timeout and response delay
On Mon, Sep 18, 2023 at 01:44:48PM +0300, Heikki Krogerus wrote:
> On Sun, Sep 17, 2023 at 11:26:26AM -0400, Abdel Alkuor wrote:
> > Some commands in tps25750 take longer than 1 second
> > to complete, and some responses need some delay before
> > the result becomes available.
> >
> > Signed-off-by: Abdel Alkuor <alkuor@...il.com>
> > ---
> > drivers/usb/typec/tipd/core.c | 18 ++++++++++++------
> > 1 file changed, 12 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> > index 37b56ce75f39..a8aee4e1aeba 100644
> > --- a/drivers/usb/typec/tipd/core.c
> > +++ b/drivers/usb/typec/tipd/core.c
> > @@ -284,7 +284,8 @@ static void tps6598x_disconnect(struct tps6598x *tps, u32 status)
> >
> > static int tps6598x_exec_cmd(struct tps6598x *tps, const char *cmd,
> > size_t in_len, u8 *in_data,
> > - size_t out_len, u8 *out_data)
> > + size_t out_len, u8 *out_data,
> > + u32 cmd_timeout_ms, u32 res_delay_ms)
>
> It looks like 1s/0s is still the "default", so you could have just
> made this old function a wrapper:
>
> static int tps6598x_exec_cmd(struct tps6598x *tps, const char *cmd,
> size_t in_len, u8 *in_data,
> size_t out_len, u8 *out_data)
> {
> return tps6598x_exec_cmd_tmo(tps, cmd, in_len, in_data, out_len, out_data, 1000, 0);
> }
Sounds good. I will change it in v6.
>
> thanks,
>
> --
> heikki
Thanks,
Abdel
Powered by blists - more mailing lists