Browse Source

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 <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Change-Id: I1485baa2e8f381cb0eede1a7b93ed10e49934971
pull/1943/head
Peng Fan 3 years ago
parent
commit
b3c8fd5d77
  1. 25
      drivers/scmi-msg/entry.c

25
drivers/scmi-msg/entry.c

@ -11,6 +11,31 @@
#include "common.h" #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) void scmi_status_response(struct scmi_msg *msg, int32_t status)
{ {
assert(msg->out && msg->out_size >= sizeof(int32_t)); assert(msg->out && msg->out_size >= sizeof(int32_t));

Loading…
Cancel
Save