From 84daec8c9bd852d054207f362dfaa5990946cd9e Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Mon, 20 May 2019 14:19:00 -0700 Subject: Revert "scarlet: Hookup the vsync pin and the sync driver" This reverts commit 12291b201445c60cbdb8d98e6becb1d901163560. sync driver has been removed from the poppy branch. Conflicts: board/scarlet/board.c : remove VSYNC sensor board/scarlet/gpio.inc : Charger interrupt is hooked up. BUG=b:111220617 TEST=Compile BRANCH=poppy Change-Id: Ibaf18fb7aee9a463256398645362d0260bd3d8aa Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1621255 Reviewed-by: Enrico Granata --- board/scarlet/board.c | 15 --------------- board/scarlet/board.h | 6 ------ board/scarlet/gpio.inc | 4 ++-- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/board/scarlet/board.c b/board/scarlet/board.c index 21b2424ea1..ed14cd0a1c 100644 --- a/board/scarlet/board.c +++ b/board/scarlet/board.c @@ -16,7 +16,6 @@ #include "ec_commands.h" #include "driver/accelgyro_bmi160.h" #include "driver/charger/rt946x.h" -#include "driver/sync.h" #include "driver/tcpm/fusb302.h" #include "driver/temp_sensor/tmp432.h" #include "extpower.h" @@ -248,9 +247,6 @@ static void board_init(void) /* Enable interrupts from BMI160 sensor. */ gpio_enable_interrupt(GPIO_ACCEL_INT_L); - /* Enable interrupt for the camera vsync. */ - gpio_enable_interrupt(GPIO_SYNC_INT); - /* Set SPI2 pins to high speed */ /* pins D0/D1/D3/D4 */ STM32_GPIO_OSPEEDR(GPIO_D) |= 0x000003cf; @@ -417,17 +413,6 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, }, - [VSYNC] = { - .name = "Camera vsync", - .active_mask = SENSOR_ACTIVE_S0, - .chip = MOTIONSENSE_CHIP_GPIO, - .type = MOTIONSENSE_TYPE_SYNC, - .location = MOTIONSENSE_LOC_CAMERA, - .drv = &sync_drv, - .default_range = 0, - .min_frequency = 0, - .max_frequency = 1, - }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); #endif /* defined(HAS_TASK_MOTIONSENSE) */ diff --git a/board/scarlet/board.h b/board/scarlet/board.h index 1ebd1e7eb2..3daf20e479 100644 --- a/board/scarlet/board.h +++ b/board/scarlet/board.h @@ -90,11 +90,6 @@ #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) -/* Camera VSYNC */ -#define CONFIG_SYNC -#define CONFIG_SYNC_COMMAND -#define CONFIG_SYNC_INT_EVENT TASK_EVENT_CUSTOM(5) - /* To be able to indicate the device is in tablet mode. */ #define CONFIG_TABLET_MODE_SWITCH @@ -203,7 +198,6 @@ enum power_signal { enum sensor_id { LID_ACCEL = 0, LID_GYRO, - VSYNC, }; #include "gpio_signal.h" diff --git a/board/scarlet/gpio.inc b/board/scarlet/gpio.inc index bfede671a8..ab47b7c2f0 100644 --- a/board/scarlet/gpio.inc +++ b/board/scarlet/gpio.inc @@ -32,8 +32,6 @@ GPIO_INT(AP_OVERTEMP, PIN(E, 4), GPIO_INT_RISING | GPIO_PULL_DOWN, overtemp_interrupt) GPIO_INT(ACCEL_INT_L, PIN(D, 14), GPIO_INT_FALLING | GPIO_SEL_1P8V, bmi160_interrupt) -GPIO_INT(SYNC_INT, PIN(A, 12), GPIO_INT_RISING | GPIO_PULL_DOWN, - sync_interrupt) GPIO_INT(CHARGER_INT_L, PIN(E, 6), GPIO_INT_FALLING | GPIO_PULL_UP, rt946x_interrupt) @@ -73,6 +71,8 @@ GPIO(BAT_LED_RED, PIN(E, 13), GPIO_ODR_HIGH) GPIO(WP_L, PIN(E, 5), GPIO_INPUT) /* TODO(philipchen): Add an interrupt handler once CCD is fully developed. */ GPIO(CCD_MODE_ODL, PIN(C, 5), GPIO_INPUT | GPIO_PULL_UP) +/* TODO(b:63773130): Add an interrupt handler for battery gauge max17055 */ +GPIO(BATTERY_INT_L, PIN(A, 12), GPIO_INPUT | GPIO_PULL_UP) /* Non-INT power signal pin */ GPIO(AP_CORE_PG, PIN(D, 7), GPIO_INPUT | GPIO_PULL_UP) /* Battery ID strap pin */ -- cgit v1.2.1