Skip to content

Commit

Permalink
Fix low battery shutdown tool 2
Browse files Browse the repository at this point in the history
(forgot the driver changes)
  • Loading branch information
CTCaer committed Jul 1, 2018
1 parent 9672650 commit 7b97015
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ipl/max77620.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@
#define MAX77620_CNFGGLBL1_LBDAC_EN (1 << 7)
#define MAX77620_CNFGGLBL1_MPPLD (1 << 6)
#define MAX77620_CNFGGLBL1_LBHYST ((1 << 5) | (1 << 4))
#define MAX77620_CNFGGLBL1_LBHYST_N (1 << 4)
#define MAX77620_CNFGGLBL1_LBDAC 0x0E
#define MAX77620_CNFGGLBL1_LBDAC_N (1 << 1)
#define MAX77620_CNFGGLBL1_LBRSTEN (1 << 0)

/* CNFG BBC registers */
Expand Down
5 changes: 5 additions & 0 deletions ipl/max7762x.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,8 @@ void max77620_config_default()
}
i2c_send_byte(I2C_5, 0x3C, MAX77620_REG_SD_CFG2, 4);
}

void max77620_low_battery_monitor_config()
{
i2c_send_byte(I2C_5, 0x3C, MAX77620_REG_CNFGGLBL1, MAX77620_CNFGGLBL1_LBDAC_EN | MAX77620_CNFGGLBL1_LBHYST_N | MAX77620_CNFGGLBL1_LBDAC_N);
}
1 change: 1 addition & 0 deletions ipl/max7762x.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ int max77620_regulator_config_fps(u32 id);
int max77620_regulator_set_voltage(u32 id, u32 mv);
int max77620_regulator_enable(u32 id, int enable);
void max77620_config_default();
void max77620_low_battery_monitor_config();

#endif

0 comments on commit 7b97015

Please # to comment.