summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2019-05-28 09:01:51 -0600
committerCommit Bot <commit-bot@chromium.org>2019-06-03 17:09:04 +0000
commit14d045636d4a6902490b7f9795f19738e90fefe7 (patch)
treee08a3c446698e980128b84e7a33a47236b2eed09 /driver
parent873a0cc2978da4879431e84c7a3425b984b83cd1 (diff)
downloadchrome-ec-14d045636d4a6902490b7f9795f19738e90fefe7.tar.gz
driver: driver/led/oz554 weak reference cleanup
oz554_board_init was prototyped as weak and this made all instances, that included that prototype, weak as well. In order to not lose information from the prototype, default and override functions, I changed to use the override weak marker symbols. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I06fc1324ee05806da8816ca382e77e18196fde68 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1631582 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/led/oz554.c5
-rw-r--r--driver/led/oz554.h7
2 files changed, 11 insertions, 1 deletions
diff --git a/driver/led/oz554.c b/driver/led/oz554.c
index aa50028420..7ceb6bdfa9 100644
--- a/driver/led/oz554.c
+++ b/driver/led/oz554.c
@@ -137,3 +137,8 @@ static void init_oz554(void)
gpio_enable_interrupt(GPIO_PANEL_BACKLIGHT_EN);
}
DECLARE_HOOK(HOOK_INIT, init_oz554, HOOK_PRIO_DEFAULT);
+
+
+__overridable void oz554_board_init(void)
+{
+}
diff --git a/driver/led/oz554.h b/driver/led/oz554.h
index 009728ba73..d1d9d9656e 100644
--- a/driver/led/oz554.h
+++ b/driver/led/oz554.h
@@ -9,8 +9,13 @@
#define __CROS_EC_OZ554_H
#include "gpio.h"
+#include "common.h"
-void oz554_board_init(void) __attribute__((weak));
+/*
+ * Overridable board initialization. Should be overridden by a board
+ * specific function if the default is not appropriate
+ */
+__override_proto void oz554_board_init(void);
/**
* Update oz554 configuration array (oz554_conf).