summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2019-08-26 10:13:09 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-30 09:26:29 +0000
commit03e1aecae1cdc4f92e80957fbf8555740956cb1c (patch)
tree4884049363a0b873d24e09213afd3c3aad1bdfe9
parent6f55ca108752f87e264f465914bc8aa5a7f0e861 (diff)
downloadchrome-ec-03e1aecae1cdc4f92e80957fbf8555740956cb1c.tar.gz
garg: remove AR camera support
Garg doesn't support AR camera, remove unused code. BUG=b:134854577 BRANCH=octopus TEST=make buildall -j Change-Id: I593cc5ef856e5708449e28ad84ced8fa21b1ffa3 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1771098 Reviewed-by: Marco Chen <marcochen@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Nigel Sale <nsale@google.com>
-rw-r--r--board/garg/board.c37
-rw-r--r--board/garg/gpio.inc2
2 files changed, 1 insertions, 38 deletions
diff --git a/board/garg/board.c b/board/garg/board.c
index 5ff0a72be6..9aa7db97f0 100644
--- a/board/garg/board.c
+++ b/board/garg/board.c
@@ -17,7 +17,6 @@
#include "driver/accelgyro_bmi160.h"
#include "driver/charger/bd9995x.h"
#include "driver/ppc/nx20p348x.h"
-#include "driver/sync.h"
#include "driver/tcpm/anx7447.h"
#include "driver/tcpm/ps8xxx.h"
#include "driver/tcpm/tcpci.h"
@@ -131,13 +130,6 @@ const mat33_fp_t base_standard_ref = {
{ 0, 0, FLOAT_TO_FP(1)}
};
-/* TODO: Tune the rot_standard_ref values after got mockup or system */
-const mat33_fp_t base_ar_cam_ref = {
- { 0, FLOAT_TO_FP(-0.96126), FLOAT_TO_FP(0.27564)},
- { FLOAT_TO_FP(1), 0, 0},
- { 0, FLOAT_TO_FP(0.27564), FLOAT_TO_FP(0.96126)}
-};
-
/* sensor private data */
static struct kionix_accel_data g_kx022_data;
static struct bmi160_drv_data_t g_bmi160_data;
@@ -212,17 +204,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,
- },
};
unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
@@ -236,12 +217,6 @@ static int board_is_convertible(void)
return sku_id == 37 || sku_id == 255;
}
-static int board_with_ar_cam(void)
-{
- /* SKU ID of Garg with AR Cam: TBD */
- return 255;
-}
-
static void board_update_sensor_config_from_sku(void)
{
if (board_is_convertible()) {
@@ -255,18 +230,6 @@ static void board_update_sensor_config_from_sku(void)
gpio_set_flags(GPIO_BASE_SIXAXIS_INT_L,
GPIO_INPUT | GPIO_PULL_DOWN);
}
-
- /* TODO: Garg has AR camera? Remove it if not support */
- if (board_with_ar_cam()) {
- /* Enable interrupt from camera */
- gpio_enable_interrupt(GPIO_WFCAM_VSYNC);
-
- motion_sensors[BASE_ACCEL].rot_standard_ref = &base_ar_cam_ref;
- motion_sensors[BASE_GYRO].rot_standard_ref = &base_ar_cam_ref;
- } else {
- /* Camera isn't stuffed, don't allow line to float */
- gpio_set_flags(GPIO_WFCAM_VSYNC, GPIO_INPUT | GPIO_PULL_DOWN);
- }
}
/* Read CBI from i2c eeprom and initialize variables for board variants */
diff --git a/board/garg/gpio.inc b/board/garg/gpio.inc
index 65008b9497..c3e96c865e 100644
--- a/board/garg/gpio.inc
+++ b/board/garg/gpio.inc
@@ -38,7 +38,6 @@ GPIO_INT(EC_VOLUP_BTN_ODL, PIN(7, 5), GPIO_INT_BOTH, button_interrupt)
GPIO_INT(EC_VOLDN_BTN_ODL, PIN(4, 0), GPIO_INT_BOTH, button_interrupt)
GPIO_INT(BASE_SIXAXIS_INT_L, PIN(5, 6), GPIO_INT_FALLING | GPIO_SEL_1P8V, bmi160_interrupt)
-GPIO_INT(WFCAM_VSYNC, PIN(0, 3), GPIO_INT_RISING , sync_interrupt)
GPIO(LID_ACCEL_INT_L, PIN(5, 0), GPIO_INPUT | GPIO_SEL_1P8V)
@@ -153,6 +152,7 @@ GPIO(EC_GPIO97, PIN(9, 7), GPIO_INPUT | GPIO_PULL_UP) /* TP Only */
GPIO(EC_I2S_SFRM, PIN(A, 5), GPIO_INPUT | GPIO_SEL_1P8V)
GPIO(EC_I2S_SCLK, PIN(A, 7), GPIO_INPUT | GPIO_SEL_1P8V)
GPIO(EC_I2S_TX_PCH_RX, PIN(B, 0), GPIO_INPUT | GPIO_SEL_1P8V)
+GPIO(WFCAM_VSYNC, PIN(0, 3), GPIO_INPUT)
/* Keyboard pins */
ALTERNATE(PIN_MASK(3, 0x03), 0, MODULE_KEYBOARD_SCAN, GPIO_INPUT) /* KSI_00-01 */