mfd: rts5249: Add support for RTS5250S power saving
authorRui Feng <rui_feng@realsil.com.cn>
Thu, 7 Sep 2017 08:26:39 +0000 (16:26 +0800)
committerLee Jones <lee.jones@linaro.org>
Fri, 13 Oct 2017 09:42:59 +0000 (10:42 +0100)
commit8275b77a15131673f955f738f0704e1d40a8edae
tree42e42bfdf9efd900d1c0a8ddbd4f8ba7073f67c9
parent31374972321d1639d1a8bb1213b66688132d103f
mfd: rts5249: Add support for RTS5250S power saving

Enable power saving for RTS5250S as following steps:
1.Set 0xFE58 to enable clock power management.
2.Check cfg space whether support L1SS or not.
3.If support L1SS, set 0xFF03 to free clkreq.
4.When entering idle status, enable aspm
  and set parameters for L1SS and LTR.
5.Wnen entering run status, disable aspm
  and set parameters for L1SS and LTR.
If entering L1SS mode successfully,
electric current will be below 2mA.

Signed-off-by: Rui Feng <rui_feng@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/rts5249.c
drivers/mfd/rtsx_pcr.c
drivers/mfd/rtsx_pcr.h
include/linux/mfd/rtsx_pci.h