projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a74d8a7
)
LR097: enable reboot system when shutdown with dc plug in
author
yj
<yangjie@rock-chips.com>
Sat, 26 Jan 2013 02:29:04 +0000
(10:29 +0800)
committer
yj
<yangjie@rock-chips.com>
Sat, 26 Jan 2013 02:29:04 +0000
(10:29 +0800)
arch/arm/mach-rk30/board-rk3168-LR097.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-rk30/board-rk3168-LR097.c
b/arch/arm/mach-rk30/board-rk3168-LR097.c
index 6c91ed7a73ee11a9fcdf6045c482f66099e1187b..779325cd40048ac222048a1af39ca5d962842a33 100755
(executable)
--- a/
arch/arm/mach-rk30/board-rk3168-LR097.c
+++ b/
arch/arm/mach-rk30/board-rk3168-LR097.c
@@
-2015,7
+2015,7
@@
static struct rk29_keys_button key_button[] = {
{
.desc = "vol-",
.code = KEY_VOLUMEDOWN,
- .adc_value = 1
70
,
+ .adc_value = 1
45
,
.gpio = INVALID_GPIO,
.active_low = PRESS_LEV_LOW,
},
@@
-2090,7
+2090,18
@@
static void rk30_pm_power_off(void)
#if defined(CONFIG_REGULATOR_ACT8846)
if(pmic_is_act8846())
{
- act8846_device_shutdown();
+ printk("enter dcdet:");
+ if(gpio_get_value (RK30_PIN0_PB2) == GPIO_LOW)
+ {
+ printk("with dc:enter restart system\n");
+ arm_pm_restart(0, NULL);
+ }
+ else
+ {
+ printk("without dc,shutdown system\n");
+ act8846_device_shutdown();
+ while(1);
+ }
}
#endif