[EXT] Re: [PATCH 5/5] i2c: imx-lpi2c: increase PM timeout to avoid operate clk frequently

Carlos Song carlos.song at nxp.com
Fri Aug 30 01:53:16 PDT 2024



> -----Original Message-----
> From: Alexander Stein <alexander.stein at ew.tq-group.com>
> Sent: Thursday, August 29, 2024 6:55 PM
> To: Aisheng Dong <aisheng.dong at nxp.com>; andi.shyti at kernel.org;
> shawnguo at kernel.org; s.hauer at pengutronix.de; kernel at pengutronix.de;
> festevam at gmail.com; linux-arm-kernel at lists.infradead.org
> Cc: linux-i2c at vger.kernel.org; imx at lists.linux.dev;
> linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Carlos Song
> <carlos.song at nxp.com>
> Subject: [EXT] Re: [PATCH 5/5] i2c: imx-lpi2c: increase PM timeout to avoid
> operate clk frequently
>
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
>
>
> Hi,
>
> Am Donnerstag, 29. August 2024, 11:37:22 CEST schrieb carlos.song at nxp.com:
> > From: Clark Wang <xiaoning.wang at nxp.com>
> >
> > Switching the clock frequently will affect the data transmission
> > efficiency, and prolong the timeout to reduce autosuspend times for
> > lpi2c.
>
> Efficiency as in throughput or total time per transfer? Do you have any numbers?
>

Hi, Thank your for your quick ack!

Apologies for the unclear explanation. The efficiency I'm referring to isn't just for I2C. For platforms with SC firmware
like the 8X series, every i2c transfer to enable or disable the clock notifies the SC firmware to perform a clock operation.
So if the autosuspend time is short, i2c may enable and disable clock frequently, it will occupy resources of the SC firmware.

Therefore, we add this patch to minimize the excessive sc firmware resource waste caused by frequent I2C clock enable/disable operations.


> Best regards,
> Alexander
>
> > Signed-off-by: Clark Wang <xiaoning.wang at nxp.com>
> > Signed-off-by: Carlos Song <carlos.song at nxp.com>
> > ---
> >  drivers/i2c/busses/i2c-imx-lpi2c.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c
> > b/drivers/i2c/busses/i2c-imx-lpi2c.c
> > index 210d505db76d..cc5e5d96aacd 100644
> > --- a/drivers/i2c/busses/i2c-imx-lpi2c.c
> > +++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
> > @@ -129,7 +129,7 @@
> >  #define I2C_CLK_RATIO        2
> >  #define CHUNK_DATA   256
> >
> > -#define I2C_PM_TIMEOUT               10 /* ms */
> > +#define I2C_PM_TIMEOUT               1000 /* ms */
> >  #define I2C_DMA_THRESHOLD    8 /* bytes */
> >
> >  enum lpi2c_imx_mode {
> >
>
>
> --
> TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
> Amtsgericht München, HRB 105018
> Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> http://www.tq-g/
> roup.com%2F&data=05%7C02%7Ccarlos.song%40nxp.com%7C85ca11fd9cff416
> ea43108dcc8191786%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C
> 638605257330352810%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdat
> a=AV343gx9HRiXKLNQk5kBKj%2FfJM0p%2FSLKG%2FQFuQg64I0%3D&reserved
> =0
>




More information about the linux-arm-kernel mailing list