summaryrefslogtreecommitdiff
path: root/zephyr/shim/src/pwm_led.c
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2022-03-24 13:04:49 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-03-29 18:07:29 +0000
commit49bd176f91e764b530193dfa89390c3c6bed62c6 (patch)
tree19b74368ba55bb47849faf241bfcb3faa4921cb1 /zephyr/shim/src/pwm_led.c
parente105fe224b19c9210092672f477b09b90c6d9f64 (diff)
downloadchrome-ec-49bd176f91e764b530193dfa89390c3c6bed62c6.tar.gz
zephyr: shim: convert HOOK_INIT to SYS_INIT
Convert all HOOK_INIT calls to the equivalent SYS_INIT. BUG=b:226434387 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ie046e07cf78a4f4b3704401a605d2fb15069479e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3553849 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Diffstat (limited to 'zephyr/shim/src/pwm_led.c')
-rw-r--r--zephyr/shim/src/pwm_led.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/zephyr/shim/src/pwm_led.c b/zephyr/shim/src/pwm_led.c
index cfa7005f04..ad11456ab5 100644
--- a/zephyr/shim/src/pwm_led.c
+++ b/zephyr/shim/src/pwm_led.c
@@ -208,12 +208,15 @@ static void led_set_charge_port_tick(void)
}
DECLARE_HOOK(HOOK_TICK, led_set_charge_port_tick, HOOK_PRIO_DEFAULT);
-static void board_led_init(void)
+static int board_led_init(const struct device *unused)
{
+ ARG_UNUSED(unused);
/* Illuminate motherboard and daughter board LEDs equally to start. */
pwm_led_set_duty(&_pwm_led_dt_sidesel, 50);
+
+ return 0;
}
-DECLARE_HOOK(HOOK_INIT, board_led_init, HOOK_PRIO_DEFAULT);
+SYS_INIT(board_led_init, APPLICATION, HOOK_PRIO_DEFAULT);
#endif /* DT_INST_NODE_HAS_PROP(0, sidesel) */