summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2019-08-13 12:36:08 -0700
committerCommit Bot <commit-bot@chromium.org>2019-08-14 18:55:16 +0000
commit29b86be6ba06f1de6973a6d2f4fa3c9eba8be0f1 (patch)
tree8ceeb0ad98e98e2335dfb37e5affabd808bfe3e1 /common
parenta18332870ba0f77eb686366d616201da6ff90527 (diff)
downloadchrome-ec-29b86be6ba06f1de6973a6d2f4fa3c9eba8be0f1.tar.gz
charge_manager: Mark functions overridable
Functions such as board_fill_source_power_info are overridable. This patch annotates them properly using override macros, and removes their declarations from board.h. These functions are declared in both charge_manager.h and {kukui,krane,kodama}/board.h. The latter causes comm-dev.c to fail to be compiled in chrome-base/diagnostics. BUG=none BRANCH=none TEST=buildall Change-Id: I27d6dfe2fa9299550ac5205c34095a4fe02dabdb Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1752597 Tested-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/charge_manager.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/charge_manager.c b/common/charge_manager.c
index c5380bbb35..4c56a21afc 100644
--- a/common/charge_manager.c
+++ b/common/charge_manager.c
@@ -44,7 +44,7 @@
* - Last, pick one from the rest suppliers. Also note that some boards assume
* wireless suppliers as low priority.
*/
-__attribute__((weak)) const int supplier_priority[] = {
+__overridable const int supplier_priority[] = {
#if CONFIG_DEDICATED_CHARGE_PORT_COUNT > 0
[CHARGE_SUPPLIER_DEDICATED] = 0,
#endif
@@ -1385,19 +1385,19 @@ DECLARE_CONSOLE_COMMAND(chgsup, charge_supplier_info,
NULL, "print chg supplier info");
#endif
-__attribute__((weak))
+__overridable
int board_charge_port_is_sink(int port)
{
return 1;
}
-__attribute__((weak))
+__overridable
int board_charge_port_is_connected(int port)
{
return 1;
}
-__attribute__((weak))
+__overridable
void board_fill_source_power_info(int port,
struct ec_response_usb_pd_power_info *r)
{