> -----Original Message----- > From: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx> > Sent: Thursday, August 29, 2024 6:55 PM > To: Aisheng Dong <aisheng.dong@xxxxxxx>; andi.shyti@xxxxxxxxxx; > shawnguo@xxxxxxxxxx; s.hauer@xxxxxxxxxxxxxx; kernel@xxxxxxxxxxxxxx; > festevam@xxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx > Cc: linux-i2c@xxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx; > linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Carlos Song > <carlos.song@xxxxxxx> > 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@xxxxxxx: > > From: Clark Wang <xiaoning.wang@xxxxxxx> > > > > 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@xxxxxxx> > > Signed-off-by: Carlos Song <carlos.song@xxxxxxx> > > --- > > 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 >