mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
The LED state machine ends up being very board-specific, as does the specific configuration of LEDs and whether they're PWM'd or just GPIOs. dparker has some clever ideas for how to move more of the functionality to common/led_common.c (used at present only by peppy); that will be done as a follow-on to this CL. There's a unit test for the spring LED implementation. To keep that compiling, just use a symlink to the spring-specific implementation. No code changes; just moving around files. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all boards; pass unit tests Change-Id: I5973e701a29a72575db9a161dc146855ab21cca6 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/171771 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
77 lines
1.8 KiB
C
77 lines
1.8 KiB
C
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Per-test config flags */
|
|
|
|
#ifndef __CROS_EC_TEST_CONFIG_H
|
|
#define __CROS_EC_TEST_CONFIG_H
|
|
|
|
#ifdef TEST_adapter
|
|
#define CONFIG_CHIPSET_CAN_THROTTLE
|
|
#define CONFIG_EXTPOWER_FALCO
|
|
#endif
|
|
|
|
#ifdef TEST_bklight_lid
|
|
#define CONFIG_BACKLIGHT_LID
|
|
#endif
|
|
|
|
#ifdef TEST_bklight_passthru
|
|
#define CONFIG_BACKLIGHT_LID
|
|
#define CONFIG_BACKLIGHT_REQ_GPIO GPIO_PCH_BKLTEN
|
|
#endif
|
|
|
|
#ifdef TEST_kb_8042
|
|
#undef CONFIG_KEYBOARD_PROTOCOL_MKBP
|
|
#define CONFIG_KEYBOARD_PROTOCOL_8042
|
|
#endif
|
|
|
|
#ifdef TEST_led_spring
|
|
#define CONFIG_BATTERY_MOCK
|
|
#define CONFIG_BATTERY_SMART
|
|
#define CONFIG_CHARGER_INPUT_CURRENT 4032
|
|
#define CONFIG_LED_DRIVER_LP5562
|
|
#define I2C_PORT_HOST 1
|
|
#define I2C_PORT_BATTERY 1
|
|
#define I2C_PORT_CHARGER 1
|
|
#endif
|
|
|
|
#ifdef TEST_sbs_charging
|
|
#define CONFIG_BATTERY_MOCK
|
|
#define CONFIG_BATTERY_SMART
|
|
#define CONFIG_CHARGER
|
|
#define CONFIG_CHARGER_INPUT_CURRENT 4032
|
|
#define CONFIG_CHARGER_DISCHARGE_ON_AC
|
|
int board_discharge_on_ac(int enabled);
|
|
#define I2C_PORT_HOST 1
|
|
#define I2C_PORT_BATTERY 1
|
|
#define I2C_PORT_CHARGER 1
|
|
#endif
|
|
|
|
#ifdef TEST_thermal
|
|
#define CONFIG_CHIPSET_CAN_THROTTLE
|
|
#define CONFIG_FAN
|
|
#define CONFIG_FAN_RPM_MAX 5000
|
|
#define CONFIG_FAN_RPM_MIN 1000
|
|
#define CONFIG_TEMP_SENSOR
|
|
#endif
|
|
|
|
#ifdef TEST_thermal_falco
|
|
#define CONFIG_BATTERY_MOCK
|
|
#define CONFIG_BATTERY_SMART
|
|
#define CONFIG_CHARGER
|
|
#define CONFIG_CHARGER_INPUT_CURRENT 4032
|
|
#define CONFIG_CHIPSET_CAN_THROTTLE
|
|
#define CONFIG_EXTPOWER_FALCO
|
|
#define CONFIG_FAN
|
|
#define CONFIG_FAN_RPM_MAX 5000
|
|
#define CONFIG_FAN_RPM_MIN 1000
|
|
#define CONFIG_TEMP_SENSOR
|
|
#define I2C_PORT_BATTERY 1
|
|
#define I2C_PORT_CHARGER 1
|
|
#define I2C_PORT_HOST 1
|
|
#endif
|
|
|
|
#endif /* __CROS_EC_TEST_CONFIG_H */
|