summaryrefslogtreecommitdiff
path: root/driver/led
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2015-07-27 12:39:35 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-29 21:18:25 +0000
commit1b45f6ed717c8c1a62cbe0698bc2217b69ce1483 (patch)
treed986841aada034e9514c53a4bf849e135e4e652a /driver/led
parent511766b6388099ed6894f7209430de145397afc4 (diff)
downloadchrome-ec-1b45f6ed717c8c1a62cbe0698bc2217b69ce1483.tar.gz
Driver: Add macros to conditionally compile the console commands
Added macros to conditionally compile the console commands to save the memory. These macros can be enabled/disabled in the board specific files. BUG=none TEST=make buildall -j BRANCH=none Change-Id: I108a072c333762cd24ea973612202c9cc4d40914 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/288950 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'driver/led')
-rw-r--r--driver/led/ds2413.c3
-rw-r--r--driver/led/lp5562.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/driver/led/ds2413.c b/driver/led/ds2413.c
index 9babd75992..8364688e28 100644
--- a/driver/led/ds2413.c
+++ b/driver/led/ds2413.c
@@ -148,7 +148,7 @@ DECLARE_HOOK(HOOK_SECOND, onewire_led_tick, HOOK_PRIO_DEFAULT);
/*****************************************************************************/
/* Console commands */
-
+#define CONFIG_CMD_POWERLED
static int command_powerled(int argc, char **argv)
{
int i;
@@ -164,3 +164,4 @@ DECLARE_CONSOLE_COMMAND(powerled, command_powerled,
"<off | red | yellow | green>",
"Set power LED color",
NULL);
+#endif
diff --git a/driver/led/lp5562.c b/driver/led/lp5562.c
index 1f5bc8b9d5..880dd05d46 100644
--- a/driver/led/lp5562.c
+++ b/driver/led/lp5562.c
@@ -123,7 +123,7 @@ int lp5562_set_pc(int engine, int val)
/*****************************************************************************/
/* Console commands */
-
+#ifdef CONFIG_CMD_POWERLED
static int command_lp5562(int argc, char **argv)
{
if (argc == 4) {
@@ -159,3 +159,4 @@ DECLARE_CONSOLE_COMMAND(lp5562, command_lp5562,
"on | off | <red> <green> <blue>",
"Set the color of the LED",
NULL);
+#endif