mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
soc: rockchip: rockchip_pm_config: set the real pin number to ATF
If the gpio base is started from 1000, The real pin number is "gpio number - 1000". Change-Id: If9b627ce9689105d0cdb7314869d598b4132f486 Signed-off-by: shengfei Xu <xsf@rock-chips.com>
This commit is contained in:
@@ -126,6 +126,7 @@ static int __init pm_config_init(struct platform_device *pdev)
|
||||
enum of_gpio_flags flags;
|
||||
int i = 0;
|
||||
int length;
|
||||
int pin_num;
|
||||
|
||||
match_id = of_match_node(pm_match_table, pdev->dev.of_node);
|
||||
if (!match_id)
|
||||
@@ -171,9 +172,11 @@ static int __init pm_config_init(struct platform_device *pdev)
|
||||
&flags);
|
||||
if (!gpio_is_valid(gpio_temp[i]))
|
||||
break;
|
||||
/* get the real pin number */
|
||||
pin_num = gpio_temp[i] - ARCH_GPIO_BASE;
|
||||
sip_smc_set_suspend_mode(GPIO_POWER_CONFIG,
|
||||
i,
|
||||
gpio_temp[i]);
|
||||
pin_num);
|
||||
}
|
||||
}
|
||||
sip_smc_set_suspend_mode(GPIO_POWER_CONFIG, i, PM_INVALID_GPIO);
|
||||
|
||||
Reference in New Issue
Block a user