mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
soc: rockchip: pm_config: support sleep-io-ret-config
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com> Change-Id: I5a26367fe2396832f7655331e292b53ebcf9a15d
This commit is contained in:
committed by
Tao Huang
parent
a46a7e6ca0
commit
7f64e7c02c
@@ -165,12 +165,14 @@ static int pm_config_probe(struct platform_device *pdev)
|
||||
int gpio_temp[10];
|
||||
u32 sleep_debug_en = 0;
|
||||
u32 apios_suspend = 0;
|
||||
u32 io_ret_config = 0;
|
||||
#if defined(CONFIG_NO_GKI)
|
||||
u32 virtual_poweroff_en = 0;
|
||||
#endif
|
||||
enum of_gpio_flags flags;
|
||||
int i = 0;
|
||||
int length;
|
||||
int ret;
|
||||
|
||||
match_id = of_match_node(pm_match_table, pdev->dev.of_node);
|
||||
if (!match_id)
|
||||
@@ -237,6 +239,16 @@ static int pm_config_probe(struct platform_device *pdev)
|
||||
apios_suspend,
|
||||
0);
|
||||
|
||||
if (!of_property_read_u32_array(node,
|
||||
"rockchip,sleep-io-ret-config",
|
||||
&io_ret_config, 1)) {
|
||||
ret = sip_smc_set_suspend_mode(SUSPEND_IO_RET_CONFIG, io_ret_config, 0);
|
||||
if (ret)
|
||||
dev_warn(&pdev->dev,
|
||||
"sleep-io-ret-config failed (%d), check parameters or update trust\n",
|
||||
ret);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NO_GKI)
|
||||
if (!of_property_read_u32_array(node,
|
||||
"rockchip,virtual-poweroff",
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
#define VIRTUAL_POWEROFF 0x07
|
||||
#define SUSPEND_WFI_TIME_MS 0x08
|
||||
#define LINUX_PM_STATE 0x09
|
||||
#define SUSPEND_IO_RET_CONFIG 0x0a
|
||||
|
||||
/* SIP_REMOTECTL_CFG call types */
|
||||
#define REMOTECTL_SET_IRQ 0xf0
|
||||
|
||||
Reference in New Issue
Block a user