soc: rockchip: pm_config: support sleep-pin-config
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com> Change-Id: I93f52766bfa1ce0cf97d826dc1cad5af0134a4c1
This commit is contained in:
parent
1e135f352e
commit
68a0cca2c3
|
|
@ -176,6 +176,7 @@ static int pm_config_probe(struct platform_device *pdev)
|
|||
u32 sleep_debug_en = 0;
|
||||
u32 apios_suspend = 0;
|
||||
u32 io_ret_config = 0;
|
||||
u32 sleep_pin_config[2] = {0};
|
||||
#ifndef MODULE
|
||||
u32 virtual_poweroff_en = 0;
|
||||
#endif
|
||||
|
|
@ -259,6 +260,16 @@ static int pm_config_probe(struct platform_device *pdev)
|
|||
ret);
|
||||
}
|
||||
|
||||
if (!of_property_read_u32_array(node,
|
||||
"rockchip,sleep-pin-config",
|
||||
sleep_pin_config, 2)) {
|
||||
ret = sip_smc_set_suspend_mode(SLEEP_PIN_CONFIG, sleep_pin_config[0], sleep_pin_config[1]);
|
||||
if (ret)
|
||||
dev_warn(&pdev->dev,
|
||||
"sleep-pin-config failed (%d), check parameters or update trust\n",
|
||||
ret);
|
||||
}
|
||||
|
||||
#ifndef MODULE
|
||||
if (!of_property_read_u32_array(node,
|
||||
"rockchip,virtual-poweroff",
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@
|
|||
#define SUSPEND_WFI_TIME_MS 0x08
|
||||
#define LINUX_PM_STATE 0x09
|
||||
#define SUSPEND_IO_RET_CONFIG 0x0a
|
||||
#define SLEEP_PIN_CONFIG 0x0b
|
||||
|
||||
/* SIP_REMOTECTL_CFG call types */
|
||||
#define REMOTECTL_SET_IRQ 0xf0
|
||||
|
|
|
|||
Loading…
Reference in New Issue