summaryrefslogtreecommitdiff
path: root/common/ec_features.c
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2017-08-24 23:10:53 +0200
committerchrome-bot <chrome-bot@chromium.org>2017-08-30 03:58:28 -0700
commit09136dea764dbe482392c29b3c8d1763149df3e6 (patch)
treeb6cff30ac999c763082c285f6bd3ef7ef0016c5d /common/ec_features.c
parentf1dfc4cbac2140f51f4a40fec790755ca7d4fafe (diff)
downloadchrome-ec-09136dea764dbe482392c29b3c8d1763149df3e6.tar.gz
ec_features / coral: Allow disabling keyboard backlight feature
Allow reporting that keyboard backlight doesn't exist even when the code is compiled in. Useful if there are multiple device models that should share firmware. BUG=b:64705535 BRANCH=none TEST=none Change-Id: I9c1fc370aedf66ef856a571f73831095d27e3d39 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/633926 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'common/ec_features.c')
-rw-r--r--common/ec_features.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/common/ec_features.c b/common/ec_features.c
index 9a630e6f17..01d666a9dc 100644
--- a/common/ec_features.c
+++ b/common/ec_features.c
@@ -6,11 +6,13 @@
/* Present Chrome EC device features to the outside world */
#include "common.h"
+#include "config.h"
#include "ec_commands.h"
+#include "board_config.h"
uint32_t get_feature_flags0(void)
{
- return 0
+ uint32_t result = 0
#ifdef CONFIG_FW_LIMITED_IMAGE
| EC_FEATURE_MASK_0(EC_FEATURE_LIMITED)
#endif
@@ -106,9 +108,17 @@ uint32_t get_feature_flags0(void)
| EC_FEATURE_MASK_0(EC_FEATURE_DEVICE_EVENT)
#endif
;
+#ifdef CONFIG_EC_FEATURE_BOARD_OVERRIDE
+ result = board_override_feature_flags0(result);
+#endif
+ return result;
}
uint32_t get_feature_flags1(void)
{
- return 0;
+ uint32_t result = 0;
+#ifdef CONFIG_EC_FEATURE_BOARD_OVERRIDE
+ result = board_override_feature_flags1(result);
+#endif
+ return result;
}