Turn off fan in gc6

This commit is contained in:
Jeremy Soller 2020-06-11 15:43:06 -06:00
parent 764e3b4c20
commit f1f46a0400
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
3 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,7 @@ void dgpu_init(void) {
}
void dgpu_event(void) {
if (power_state == POWER_STATE_S0 && gpio_get(&DGPU_PWR_EN)) {
if (power_state == POWER_STATE_S0 && gpio_get(&DGPU_PWR_EN) && !gpio_get(&GC6_FB_EN)) {
// Use I2CS if in S0 state
int8_t rlts;
int res = i2c_get(&I2C_DGPU, 0x4F, 0x00, &rlts, 1);

View File

@ -12,6 +12,7 @@ struct Gpio __code DD_ON = GPIO(E, 4);
struct Gpio __code DGPU_PWR_EN = GPIO(F, 7);
struct Gpio __code EC_EN = GPIO(B, 6); // renamed to SUSBC_EN
struct Gpio __code EC_RSMRST_N = GPIO(E, 5);
struct Gpio __code GC6_FB_EN = GPIO(J, 7);
struct Gpio __code LED_ACIN = GPIO(C, 7);
struct Gpio __code LED_BAT_CHG = GPIO(H, 5);
struct Gpio __code LED_BAT_FULL = GPIO(J, 0);

View File

@ -23,6 +23,7 @@ extern struct Gpio __code DD_ON;
extern struct Gpio __code DGPU_PWR_EN;
extern struct Gpio __code EC_EN;
extern struct Gpio __code EC_RSMRST_N;
extern struct Gpio __code GC6_FB_EN;
extern struct Gpio __code LED_ACIN;
extern struct Gpio __code LED_AIRPLANE_N;
extern struct Gpio __code LED_BAT_CHG;