From b3c8fd5d778144340d289ad4825123106aac4a96 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 11 Jun 2021 11:16:08 +0800 Subject: [PATCH] fix(drivers/scmi-msg): entry: add weak functions One platform may not implement all the protocols, to avoid build break when we not include all the protocols, add weak functions. Reviewed-by: Jacky Bai Signed-off-by: Peng Fan Change-Id: I1485baa2e8f381cb0eede1a7b93ed10e49934971 --- drivers/scmi-msg/entry.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/scmi-msg/entry.c b/drivers/scmi-msg/entry.c index 6980494c2..3537fbe12 100644 --- a/drivers/scmi-msg/entry.c +++ b/drivers/scmi-msg/entry.c @@ -11,6 +11,31 @@ #include "common.h" +#pragma weak scmi_msg_get_clock_handler +#pragma weak scmi_msg_get_rstd_handler +#pragma weak scmi_msg_get_pd_handler +#pragma weak scmi_msg_get_voltage_handler + +scmi_msg_handler_t scmi_msg_get_clock_handler(struct scmi_msg *msg __unused) +{ + return NULL; +} + +scmi_msg_handler_t scmi_msg_get_rstd_handler(struct scmi_msg *msg __unused) +{ + return NULL; +} + +scmi_msg_handler_t scmi_msg_get_pd_handler(struct scmi_msg *msg __unused) +{ + return NULL; +} + +scmi_msg_handler_t scmi_msg_get_voltage_handler(struct scmi_msg *msg __unused) +{ + return NULL; +} + void scmi_status_response(struct scmi_msg *msg, int32_t status) { assert(msg->out && msg->out_size >= sizeof(int32_t));