System76 common board directory (#53)
* Move configuration for battery into board.mk * lemp9: remove tcpm code * Move touchpad to its own module * Add kbled_reset to all platforms, move items to run on CPU reset to a function * Add defines for battery and charger address * Add I2C_0 export to it5570e * Move common system76 board functions into src/board/system76/common
This commit is contained in:
21
src/board/system76/lemp9/board.c
Normal file
21
src/board/system76/lemp9/board.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <board/board.h>
|
||||
#include <board/gctrl.h>
|
||||
#include <board/gpio.h>
|
||||
#include <board/power.h>
|
||||
|
||||
extern uint8_t main_cycle;
|
||||
|
||||
void board_init(void) {
|
||||
RSTS = 0x44;
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
if (main_cycle == 0) {
|
||||
if (power_state == POWER_STATE_S0 || power_state == POWER_STATE_S3 || power_state == POWER_STATE_DS3) {
|
||||
// System is on
|
||||
} else if (gpio_get(&ACIN_N)) {
|
||||
// Power off VDD3 if system should be off
|
||||
gpio_set(&XLP_OUT, 0);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user