summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-03-15 20:04:40 +0000
committerVincent Palatin <vpalatin@chromium.org>2012-03-15 21:25:48 +0000
commite456584ce15701ead6af6371e050c8ab990e3d30 (patch)
tree008b12813c48aca7a72134a3f89a1c9f90df7513
parentc72f66c050b7754c36436583272965b9ca4fd850 (diff)
downloadchrome-ec-e456584ce15701ead6af6371e050c8ab990e3d30.tar.gz
Fix test build
Allow to build without the power button task. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=make qemu-tests Change-Id: Ibc757a6641f195f0d10e6a673792b996694f8cec
-rw-r--r--board/bds/board.c4
-rw-r--r--chip/lm4/build.mk3
-rw-r--r--common/main.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/board/bds/board.c b/board/bds/board.c
index 7be3ecbc17..28e23e67bb 100644
--- a/board/bds/board.c
+++ b/board/bds/board.c
@@ -13,6 +13,10 @@
#include "lm4_adc.h"
#include "adc.h"
+#ifndef CONFIG_TASK_POWERBTN
+#define power_button_interrupt NULL
+#endif
+
/* ADC channels. Must be in the exactly same order as in enum adc_channel. */
const struct adc_t adc_channels[ADC_CH_COUNT] =
{
diff --git a/chip/lm4/build.mk b/chip/lm4/build.mk
index 63d0376102..e1ef913631 100644
--- a/chip/lm4/build.mk
+++ b/chip/lm4/build.mk
@@ -9,7 +9,7 @@
CORE:=cortex-m
chip-y=i2c.o adc.o jtag.o
-chip-y+=clock.o gpio.o system.o uart.o power_button.o
+chip-y+=clock.o gpio.o system.o uart.o
chip-y+=watchdog.o eeprom.o hwtimer.o
chip-$(CONFIG_FLASH)+=flash.o
chip-$(CONFIG_LPC)+=lpc.o
@@ -17,3 +17,4 @@ chip-$(CONFIG_PECI)+=peci.o
chip-$(CONFIG_PWM)+=pwm.o
chip-$(CONFIG_TEMP_SENSOR)+=chip_temp_sensor.o
chip-$(CONFIG_TASK_KEYSCAN)+=keyboard_scan.o
+chip-$(CONFIG_TASK_POWERBTN)+=power_button.o
diff --git a/common/main.c b/common/main.c
index e8e736d155..64b044ce75 100644
--- a/common/main.c
+++ b/common/main.c
@@ -88,7 +88,9 @@ int main(void)
temp_sensor_init();
chip_temp_sensor_init();
#endif
+#ifdef CONFIG_TASK_POWERBTN
power_button_init();
+#endif
adc_init();
usb_charge_init();
#ifdef CONFIG_CHARGER