summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-07-23 08:05:04 -0700
committerChromeBot <chrome-bot@google.com>2013-07-23 08:14:09 -0700
commit015279e82bea054340c2e9f8502c08b3ac6e7051 (patch)
tree9ac6d95c36563e03056f99fdf523d84a6095c2d4 /board
parentacdaa1a7c0ee2b00b2a43260b3c965153ff2f0c5 (diff)
downloadchrome-ec-015279e82bea054340c2e9f8502c08b3ac6e7051.tar.gz
lm4: make configure_kblight_gpios() board dependent
The configure_kblight_gpios() funciton was specific to the link board. Therefore, move the function to be defined within the board-specific file. BUG=chrome-os-partner:20372 BRANCH=None TEST=Built. Tested similar change on bolt. Original-Change-Id: Ib5847130450024c50d6526d2c1a64d67ab501637 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/62209 (cherry picked from commit 7d6e01d6177739956ae93ca131041764c6b37904) Change-Id: I05e1ec3cadbb3244505638b3be2dd3c718ceeb40 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63016
Diffstat (limited to 'board')
-rw-r--r--board/link/board.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/link/board.c b/board/link/board.c
index f93fe22313..5c5bfb942e 100644
--- a/board/link/board.c
+++ b/board/link/board.c
@@ -19,6 +19,7 @@
#include "lm4_adc.h"
#include "peci.h"
#include "power_button.h"
+#include "pwm.h"
#include "registers.h"
#include "switch.h"
#include "temp_sensor.h"
@@ -229,3 +230,12 @@ void board_process_wake_events(uint32_t active_wake_events)
else
gpio_set_level(GPIO_PCH_WAKE_L, 1);
}
+
+/**
+ * Configure the GPIOs for the pwm module.
+ */
+void configure_kblight_gpios(void)
+{
+ /* PK6 alternate function 1 = channel 1 PWM */
+ gpio_set_alternate_function(LM4_GPIO_K, 0x40, 1);
+}