From 34747dbadded27fa5c76b0d3e1e607a81908c718 Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Thu, 15 Nov 2018 10:10:57 -0700 Subject: ocotpus: move VBUS_ADC config to base All boards but yorp have added the ADC hardware support back for VBUS ADC measurements. Move code to common baseboard BRANCH=none BUG=none TEST=ADC measurements still works on phaser and fleex Change-Id: I36a7ba92df21de4c1188613c6a12da83fdba6eb6 Signed-off-by: Jett Rink Reviewed-on: https://chromium-review.googlesource.com/1337456 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Karthikeyan Ramasubramanian Reviewed-by: Diana Z --- board/meep/board.c | 11 ----------- board/meep/board.h | 6 +----- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'board/meep') diff --git a/board/meep/board.c b/board/meep/board.c index 82f5eefca9..24f1ac4d55 100644 --- a/board/meep/board.c +++ b/board/meep/board.c @@ -86,17 +86,6 @@ const struct adc_t adc_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -enum adc_channel board_get_vbus_adc(int port) -{ - if (port == USB_PD_PORT_ANX7447) - return ADC_VBUS_C0; - if (port == USB_PD_PORT_PS8751) - return ADC_VBUS_C1; - - ccprints("Invaild VBUS adc channel!"); - return ADC_VBUS_C0; -} - const struct temp_sensor_t temp_sensors[] = { [TEMP_SENSOR_BATTERY] = {.name = "Battery", .type = TEMP_SENSOR_TYPE_BATTERY, diff --git a/board/meep/board.h b/board/meep/board.h index d40abe4146..c68dce6f53 100644 --- a/board/meep/board.h +++ b/board/meep/board.h @@ -33,10 +33,6 @@ #define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL) #define CONFIG_DYNAMIC_MOTION_SENSOR_COUNT -/* USB PD */ -#undef CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT -#define CONFIG_USB_PD_VBUS_MEASURE_ADC_EACH_PORT - #define CONFIG_LID_ANGLE #define CONFIG_LID_ANGLE_UPDATE #define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL @@ -71,8 +67,8 @@ enum adc_channel { ADC_TEMP_SENSOR_AMB, /* ADC0 */ ADC_TEMP_SENSOR_CHARGER, /* ADC1 */ - ADC_VBUS_C1, /* ADC4 */ ADC_VBUS_C0, /* ADC9 */ + ADC_VBUS_C1, /* ADC4 */ ADC_CH_COUNT }; -- cgit v1.2.1