@@ -96,7 +96,7 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
96
96
97
97
/* Wake-up pins for hibernate */
98
98
enum gpio_signal hibernate_wake_pins [] = {
99
- GPIO_AC_PRESENT_PLACEHOLDER ,
99
+ GPIO_AC_PRESENT ,
100
100
GPIO_LID_OPEN ,
101
101
GPIO_POWER_BUTTON_L ,
102
102
};
@@ -144,6 +144,8 @@ static void board_init(void)
144
144
/* For Rev0 only. Set GPM0~6 1.8V input. */
145
145
IT83XX_GPIO_GCR30 |= BIT (4 );
146
146
147
+ gpio_enable_interrupt (GPIO_AC_PRESENT );
148
+
147
149
gpio_enable_interrupt (GPIO_USB_C0_BC12_INT_ODL );
148
150
149
151
/* Enable motion sensor interrupt */
@@ -605,42 +607,13 @@ int board_regulator_get_voltage(uint32_t index, uint32_t *voltage_mv)
605
607
return mt6360_regulator_get_voltage (id , voltage_mv );
606
608
}
607
609
608
- /* gpio */
609
-
610
- /* TODO(b/163098341): Remove these after rev0 deprecated. */
611
- enum gpio_signal GPIO_AC_PRESENT = GPIO_AC_PRESENT_PLACEHOLDER ;
612
-
613
- static void board_gpio_init (void )
614
- {
615
- if (board_get_version () == 0 )
616
- GPIO_AC_PRESENT = GPIO_EC_GPM2 ;
617
- else
618
- GPIO_AC_PRESENT = GPIO_EC_GPE5 ;
619
-
620
- /* Set wake pins to the correct one */
621
- hibernate_wake_pins [0 ] = GPIO_AC_PRESENT ;
622
-
623
- /* Manually run extpower_init() again */
624
- gpio_enable_interrupt (GPIO_AC_PRESENT );
625
- extpower_interrupt (GPIO_AC_PRESENT );
626
- }
627
- DECLARE_HOOK (HOOK_INIT , board_gpio_init , HOOK_PRIO_INIT_ADC + 1 );
628
-
629
610
/* Sensor */
630
611
static struct mutex g_base_mutex ;
631
612
static struct mutex g_lid_mutex ;
632
613
633
614
static struct bmi_drv_data_t g_bmi160_data ;
634
615
static struct stprivate_data g_lis2dwl_data ;
635
616
636
- /* Matrix to rotate accelerometer into standard reference frame */
637
- /* for rev 0 */
638
- static const mat33_fp_t base_standard_ref_rev0 = {
639
- {FLOAT_TO_FP (-1 ), 0 , 0 },
640
- {0 , FLOAT_TO_FP (1 ), 0 },
641
- {0 , 0 , FLOAT_TO_FP (-1 )},
642
- };
643
-
644
617
/* Matrix to rotate accelrator into standard reference frame */
645
618
/* TODO: update the matrix after we have assembled unit */
646
619
static const mat33_fp_t mag_standard_ref = {
@@ -660,16 +633,24 @@ static struct als_drv_data_t g_tcs3400_data = {
660
633
},
661
634
};
662
635
636
+ #ifdef BOARD_ASURADA
637
+ /* Matrix to rotate accelerometer into standard reference frame */
638
+ /* for rev 0 */
639
+ static const mat33_fp_t base_standard_ref_rev0 = {
640
+ {FLOAT_TO_FP (-1 ), 0 , 0 },
641
+ {0 , FLOAT_TO_FP (1 ), 0 },
642
+ {0 , 0 , FLOAT_TO_FP (-1 )},
643
+ };
644
+
663
645
static void update_rotation_matrix (void )
664
646
{
665
- if (board_get_version () == 0 ) {
666
- motion_sensors [BASE_ACCEL ].rot_standard_ref =
667
- & base_standard_ref_rev0 ;
668
- motion_sensors [BASE_GYRO ].rot_standard_ref =
669
- & base_standard_ref_rev0 ;
670
- }
647
+ motion_sensors [BASE_ACCEL ].rot_standard_ref =
648
+ & base_standard_ref_rev0 ;
649
+ motion_sensors [BASE_GYRO ].rot_standard_ref =
650
+ & base_standard_ref_rev0 ;
671
651
}
672
652
DECLARE_HOOK (HOOK_INIT , update_rotation_matrix , HOOK_PRIO_INIT_ADC + 1 );
653
+ #endif
673
654
674
655
static struct tcs3400_rgb_drv_data_t g_tcs3400_rgb_data = {
675
656
/*
0 commit comments