Re: i2c: i801: Don't restore config registers on runtime PM

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

 



On 04/25/18 12:53, Jean Delvare wrote:
Restoring configuration registers is only needed when we hand control
to the firmware. This is never the case with runtime power
management. The device will autosuspend whenever not used, so avoid
useless register writes by defining suspend/resume only, and not
runtime_suspend/runtime_resume.

Signed-off-by: Jean Delvare <jdelvare@xxxxxxx>
Cc: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>
Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx>
---
I am told this could be further optimized, but I'm not completely
sure how, and also not sure it's worth the extra code, so let's keep
it simple for now. Optimizations can be added later.

Jarkko, you specifically mentioned runtime power management in commit
2ee73c484dc4 where you made use of UNIVERSAL_DEV_PM_OPS. Did you have
anything specific in mind? I can't think of anything the i2c-i801
driver should do for runtime power management.

Motivation for commit 2ee73c484dc4 was to simplify a7401ca5596e ("i2c: i801: Add runtime PM support with autosuspend"). Reason for UNIVERSAL_DEV_PM_OPS was my assumption that runtime PM probably should restore the SMBHSTCFG same way as when going to system suspend and thus using the same callbacks. Which appears to be wrong shown by this patch.

Reviewed-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>



[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