mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
oak: fix issues on building oak rev1-4 EC
The default target hardware is rev5. This is a maintainess change for old and deprecated HW. BRANCH=none BUG=chrome-os-partner:49114 BUG=chrome-os-partner:50720 TEST=manual for N=1,5 do make BOARD=oak clean && make BOARD=oak EXTRA_CFLAGS="-DBOARD_REV=$N" -j Signed-off-by: Rong chang <rongchang@chromium.org> Change-Id: Ibb4ebf9fab429964ace7c3e548598f0fb08e7dea Reviewed-on: https://chromium-review.googlesource.com/330065 Commit-Ready: Rong Chang <rongchang@chromium.org> Tested-by: Rong Chang <rongchang@chromium.org> Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
This commit is contained in:
@@ -548,8 +548,22 @@ void vbus_task(void)
|
||||
task_wait_event(-1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void vbus_task(void)
|
||||
{
|
||||
while (1)
|
||||
task_wait_event(-1);
|
||||
}
|
||||
#endif /* BOARD_REV < OAK_REV4 */
|
||||
|
||||
#ifndef CONFIG_ALS
|
||||
void als_task(void)
|
||||
{
|
||||
while (1)
|
||||
task_wait_event(-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TEMP_SENSOR_TMP432
|
||||
static void tmp432_set_power_deferred(void)
|
||||
{
|
||||
@@ -627,7 +641,9 @@ DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
|
||||
#ifdef HAS_TASK_MOTIONSENSE
|
||||
/* Motion sensors */
|
||||
/* Mutexes */
|
||||
#ifdef CONFIG_ACCEL_KX022
|
||||
static struct mutex g_lid_mutex;
|
||||
#endif
|
||||
#ifdef CONFIG_ACCELGYRO_BMI160
|
||||
static struct mutex g_base_mutex;
|
||||
#endif
|
||||
@@ -714,6 +730,7 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
},
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_ACCEL_KX022
|
||||
{.name = "Lid Accel",
|
||||
.active_mask = SENSOR_ACTIVE_S0,
|
||||
.chip = MOTIONSENSE_CHIP_KX022,
|
||||
@@ -747,6 +764,7 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
},
|
||||
},
|
||||
},
|
||||
#endif
|
||||
};
|
||||
const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#define CONFIG_BATTERY_PRESENT_GPIO GPIO_BAT_PRESENT_L
|
||||
#define CONFIG_BATTERY_SMART
|
||||
#define CONFIG_CHARGE_MANAGER
|
||||
#define CONFIG_CHARGE_RAMP_HW
|
||||
#define CONFIG_CHARGER
|
||||
|
||||
#define CONFIG_CHARGER_INPUT_CURRENT 512
|
||||
@@ -44,6 +43,7 @@
|
||||
#define CONFIG_CHARGER_SENSE_RESISTOR 10
|
||||
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10
|
||||
#else
|
||||
#define CONFIG_CHARGE_RAMP_HW
|
||||
#define CONFIG_CHARGER_ISL9237
|
||||
#define CONFIG_CHARGER_MAX_INPUT_CURRENT 2250
|
||||
#define CONFIG_CHARGER_NARROW_VDC
|
||||
|
||||
@@ -16,25 +16,10 @@
|
||||
* 'd' in an opaque parameter passed to the routine at startup
|
||||
* 's' is the stack size in bytes; must be a multiple of 8
|
||||
*/
|
||||
#include "board_revs.h"
|
||||
|
||||
#if BOARD_REV < OAK_REV4
|
||||
#define TASK_VBUS(n, r, d, s) TASK_ALWAYS(n, r, d, s)
|
||||
#else
|
||||
#define TASK_VBUS(n, r, d, s)
|
||||
#endif
|
||||
|
||||
#if (BOARD_REV > OAK_REV4)
|
||||
#define TASK_ALS(n, r, d, s) TASK_ALWAYS(n, r, d, s)
|
||||
#define TASK_MOTIONSENSE(n, r, d, s) TASK_NOTEST(n, r, d, s)
|
||||
#else
|
||||
#define TASK_ALS(n, r, d, s)
|
||||
#define TASK_MOTIONSENSE(n, r, d, s)
|
||||
#endif
|
||||
|
||||
#define CONFIG_TASK_LIST \
|
||||
TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \
|
||||
TASK_VBUS(VBUS, vbus_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(VBUS, vbus_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(USB_CHG_P0, usb_charger_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(USB_CHG_P1, usb_charger_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(CHARGER, charger_task, NULL, LARGER_TASK_STACK_SIZE) \
|
||||
@@ -43,7 +28,7 @@
|
||||
TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \
|
||||
TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_ALS(ALS, als_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_MOTIONSENSE(MOTIONSENSE, motion_sense_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(ALS, als_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_NOTEST(MOTIONSENSE, motion_sense_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(PD_C1, pd_task, NULL, LARGER_TASK_STACK_SIZE)
|
||||
|
||||
Reference in New Issue
Block a user