firmware/abb: Wrote twl3025_power_off_now to restart the phone if the power button is pressed
I am not sure how other developers do this. There are probably better ways to make testing faster but I kind of like it this way. I just call the twl3025_power_off_now function when the power key is pressed. Change-Id: I1e55910acd8584c74e5e190b3334a8cf6987f5f3
This commit is contained in:
parent
b95a897655
commit
bedfdc9b62
|
@ -229,6 +229,15 @@ void twl3025_power_off(void)
|
|||
twl3025_reg_write(VRPCDEV, 0x01);
|
||||
}
|
||||
|
||||
void twl3025_power_off_now(void)
|
||||
{
|
||||
/* The phone will restart if the power butten has not been released.
|
||||
* This can be useful for development. */
|
||||
unsigned long flags;
|
||||
local_firq_save(flags);
|
||||
twl3025_reg_write(VRPCDEV, 0x01);
|
||||
}
|
||||
|
||||
void twl3025_clk13m(int enable)
|
||||
{
|
||||
if (enable) {
|
||||
|
|
|
@ -147,6 +147,7 @@ uint16_t twl3025_reg_read(uint8_t reg);
|
|||
int twl3025_get_pwon(void);
|
||||
|
||||
void twl3025_power_off(void);
|
||||
void twl3025_power_off_now(void);
|
||||
|
||||
void twl3025_clk13m(int enable);
|
||||
|
||||
|
|
Loading…
Reference in New Issue