Re: [Patch v2] i2c: imx: add runtime pm support to improve the performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 18, 2015 at 05:27:31PM +0800, Gao Pan wrote:
> In our former i2c driver, i2c clk is enabled and disabled in
> xfer function, which contributes to power saving. However,
> the clk enable process brings a busy wait delay until the core
> is stable. As a result, the performance is sacrificed.
> 
> To weigh the power consumption and i2c bus performance, runtime
> pm is the good solution for it. The clk is enabled when a i2c
> transfer starts, and disabled after a specifically defined delay.
> 
> Without the patch the test case (many eeprom reads) executes with approx:
> real 1m7.735s
> user 0m0.488s
> sys 0m20.040s
> 
> With the patch the same test case (many eeprom reads) executes with approx:
> real 0m54.241s
> user 0m0.440s
> sys 0m5.920s
> 
> From the test result, the patch get better performance.

Looks OK to me. coccicheck says something, though:

drivers/i2c/busses/i2c-imx.c:1098:7-26: pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 1099
drivers/i2c/busses/i2c-imx.c:896:10-29: pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 897

Please fix that and add "kernel@xxxxxxxxxxxxxx" to CC when resending. I know
they use the driver a lot.


> V2:
> As Uwe Kleine-König's suggestion, the version do below changes:
> - call clk_prepare_enable in probe to avoid never enabling clock
>   if CONFIG_PM is disabled
> - enable clock before request IRQ in probe
> - remove the pm staff in i2c_imx_isr

Thanks for this info. If you could put it below "---" that would be preferred by me.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux