Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * System Control and Management Interface (SCMI) Power Protocol |
| 4 | * |
Cristian Marussi | cf516fb | 2021-02-02 22:15:19 +0000 | [diff] [blame] | 5 | * Copyright (C) 2018-2020 ARM Ltd. |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 8 | #define pr_fmt(fmt) "SCMI Notifications POWER - " fmt |
| 9 | |
Cristian Marussi | db15cd2 | 2021-02-02 22:15:54 +0000 | [diff] [blame] | 10 | #include <linux/module.h> |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 11 | #include <linux/scmi_protocol.h> |
| 12 | |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 13 | #include "common.h" |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 14 | #include "notify.h" |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 15 | |
| 16 | enum scmi_power_protocol_cmd { |
| 17 | POWER_DOMAIN_ATTRIBUTES = 0x3, |
| 18 | POWER_STATE_SET = 0x4, |
| 19 | POWER_STATE_GET = 0x5, |
| 20 | POWER_STATE_NOTIFY = 0x6, |
| 21 | }; |
| 22 | |
| 23 | struct scmi_msg_resp_power_attributes { |
| 24 | __le16 num_domains; |
| 25 | __le16 reserved; |
| 26 | __le32 stats_addr_low; |
| 27 | __le32 stats_addr_high; |
| 28 | __le32 stats_size; |
| 29 | }; |
| 30 | |
| 31 | struct scmi_msg_resp_power_domain_attributes { |
| 32 | __le32 flags; |
| 33 | #define SUPPORTS_STATE_SET_NOTIFY(x) ((x) & BIT(31)) |
| 34 | #define SUPPORTS_STATE_SET_ASYNC(x) ((x) & BIT(30)) |
| 35 | #define SUPPORTS_STATE_SET_SYNC(x) ((x) & BIT(29)) |
| 36 | u8 name[SCMI_MAX_STR_SIZE]; |
| 37 | }; |
| 38 | |
| 39 | struct scmi_power_set_state { |
| 40 | __le32 flags; |
| 41 | #define STATE_SET_ASYNC BIT(0) |
| 42 | __le32 domain; |
| 43 | __le32 state; |
| 44 | }; |
| 45 | |
| 46 | struct scmi_power_state_notify { |
| 47 | __le32 domain; |
| 48 | __le32 notify_enable; |
| 49 | }; |
| 50 | |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 51 | struct scmi_power_state_notify_payld { |
| 52 | __le32 agent_id; |
| 53 | __le32 domain_id; |
| 54 | __le32 power_state; |
| 55 | }; |
| 56 | |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 57 | struct power_dom_info { |
| 58 | bool state_set_sync; |
| 59 | bool state_set_async; |
| 60 | bool state_set_notify; |
| 61 | char name[SCMI_MAX_STR_SIZE]; |
| 62 | }; |
| 63 | |
| 64 | struct scmi_power_info { |
Sudeep Holla | b55b06b | 2019-11-22 14:48:40 +0000 | [diff] [blame] | 65 | u32 version; |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 66 | int num_domains; |
| 67 | u64 stats_addr; |
| 68 | u32 stats_size; |
| 69 | struct power_dom_info *dom_info; |
| 70 | }; |
| 71 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 72 | static int scmi_power_attributes_get(const struct scmi_protocol_handle *ph, |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 73 | struct scmi_power_info *pi) |
| 74 | { |
| 75 | int ret; |
| 76 | struct scmi_xfer *t; |
| 77 | struct scmi_msg_resp_power_attributes *attr; |
| 78 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 79 | ret = ph->xops->xfer_get_init(ph, PROTOCOL_ATTRIBUTES, |
| 80 | 0, sizeof(*attr), &t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 81 | if (ret) |
| 82 | return ret; |
| 83 | |
| 84 | attr = t->rx.buf; |
| 85 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 86 | ret = ph->xops->do_xfer(ph, t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 87 | if (!ret) { |
| 88 | pi->num_domains = le16_to_cpu(attr->num_domains); |
| 89 | pi->stats_addr = le32_to_cpu(attr->stats_addr_low) | |
| 90 | (u64)le32_to_cpu(attr->stats_addr_high) << 32; |
| 91 | pi->stats_size = le32_to_cpu(attr->stats_size); |
| 92 | } |
| 93 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 94 | ph->xops->xfer_put(ph, t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 95 | return ret; |
| 96 | } |
| 97 | |
| 98 | static int |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 99 | scmi_power_domain_attributes_get(const struct scmi_protocol_handle *ph, |
| 100 | u32 domain, struct power_dom_info *dom_info) |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 101 | { |
| 102 | int ret; |
| 103 | struct scmi_xfer *t; |
| 104 | struct scmi_msg_resp_power_domain_attributes *attr; |
| 105 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 106 | ret = ph->xops->xfer_get_init(ph, POWER_DOMAIN_ATTRIBUTES, |
| 107 | sizeof(domain), sizeof(*attr), &t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 108 | if (ret) |
| 109 | return ret; |
| 110 | |
Sudeep Holla | aa90ac4 | 2019-08-07 13:46:27 +0100 | [diff] [blame] | 111 | put_unaligned_le32(domain, t->tx.buf); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 112 | attr = t->rx.buf; |
| 113 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 114 | ret = ph->xops->do_xfer(ph, t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 115 | if (!ret) { |
| 116 | u32 flags = le32_to_cpu(attr->flags); |
| 117 | |
| 118 | dom_info->state_set_notify = SUPPORTS_STATE_SET_NOTIFY(flags); |
| 119 | dom_info->state_set_async = SUPPORTS_STATE_SET_ASYNC(flags); |
| 120 | dom_info->state_set_sync = SUPPORTS_STATE_SET_SYNC(flags); |
Sudeep Holla | ca64b71 | 2018-09-07 17:03:25 +0100 | [diff] [blame] | 121 | strlcpy(dom_info->name, attr->name, SCMI_MAX_STR_SIZE); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 122 | } |
| 123 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 124 | ph->xops->xfer_put(ph, t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 125 | return ret; |
| 126 | } |
| 127 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 128 | static int scmi_power_state_set(const struct scmi_protocol_handle *ph, |
| 129 | u32 domain, u32 state) |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 130 | { |
| 131 | int ret; |
| 132 | struct scmi_xfer *t; |
| 133 | struct scmi_power_set_state *st; |
| 134 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 135 | ret = ph->xops->xfer_get_init(ph, POWER_STATE_SET, sizeof(*st), 0, &t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 136 | if (ret) |
| 137 | return ret; |
| 138 | |
| 139 | st = t->tx.buf; |
| 140 | st->flags = cpu_to_le32(0); |
| 141 | st->domain = cpu_to_le32(domain); |
| 142 | st->state = cpu_to_le32(state); |
| 143 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 144 | ret = ph->xops->do_xfer(ph, t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 145 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 146 | ph->xops->xfer_put(ph, t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 147 | return ret; |
| 148 | } |
| 149 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 150 | static int scmi_power_state_get(const struct scmi_protocol_handle *ph, |
| 151 | u32 domain, u32 *state) |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 152 | { |
| 153 | int ret; |
| 154 | struct scmi_xfer *t; |
| 155 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 156 | ret = ph->xops->xfer_get_init(ph, POWER_STATE_GET, sizeof(u32), sizeof(u32), &t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 157 | if (ret) |
| 158 | return ret; |
| 159 | |
Sudeep Holla | aa90ac4 | 2019-08-07 13:46:27 +0100 | [diff] [blame] | 160 | put_unaligned_le32(domain, t->tx.buf); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 161 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 162 | ret = ph->xops->do_xfer(ph, t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 163 | if (!ret) |
Sudeep Holla | aa90ac4 | 2019-08-07 13:46:27 +0100 | [diff] [blame] | 164 | *state = get_unaligned_le32(t->rx.buf); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 165 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 166 | ph->xops->xfer_put(ph, t); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 167 | return ret; |
| 168 | } |
| 169 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 170 | static int scmi_power_num_domains_get(const struct scmi_protocol_handle *ph) |
| 171 | { |
| 172 | struct scmi_power_info *pi = ph->get_priv(ph); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 173 | |
| 174 | return pi->num_domains; |
| 175 | } |
| 176 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 177 | static char *scmi_power_name_get(const struct scmi_protocol_handle *ph, |
| 178 | u32 domain) |
| 179 | { |
| 180 | struct scmi_power_info *pi = ph->get_priv(ph); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 181 | struct power_dom_info *dom = pi->dom_info + domain; |
| 182 | |
| 183 | return dom->name; |
| 184 | } |
| 185 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 186 | static const struct scmi_power_proto_ops power_proto_ops = { |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 187 | .num_domains_get = scmi_power_num_domains_get, |
| 188 | .name_get = scmi_power_name_get, |
| 189 | .state_set = scmi_power_state_set, |
| 190 | .state_get = scmi_power_state_get, |
| 191 | }; |
| 192 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 193 | static int scmi_power_request_notify(const struct scmi_protocol_handle *ph, |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 194 | u32 domain, bool enable) |
| 195 | { |
| 196 | int ret; |
| 197 | struct scmi_xfer *t; |
| 198 | struct scmi_power_state_notify *notify; |
| 199 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 200 | ret = ph->xops->xfer_get_init(ph, POWER_STATE_NOTIFY, |
| 201 | sizeof(*notify), 0, &t); |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 202 | if (ret) |
| 203 | return ret; |
| 204 | |
| 205 | notify = t->tx.buf; |
| 206 | notify->domain = cpu_to_le32(domain); |
| 207 | notify->notify_enable = enable ? cpu_to_le32(BIT(0)) : 0; |
| 208 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 209 | ret = ph->xops->do_xfer(ph, t); |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 210 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 211 | ph->xops->xfer_put(ph, t); |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 212 | return ret; |
| 213 | } |
| 214 | |
Cristian Marussi | bb35ff4 | 2021-02-02 22:15:52 +0000 | [diff] [blame] | 215 | static int scmi_power_set_notify_enabled(const struct scmi_protocol_handle *ph, |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 216 | u8 evt_id, u32 src_id, bool enable) |
| 217 | { |
| 218 | int ret; |
| 219 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 220 | ret = scmi_power_request_notify(ph, src_id, enable); |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 221 | if (ret) |
| 222 | pr_debug("FAIL_ENABLE - evt[%X] dom[%d] - ret:%d\n", |
| 223 | evt_id, src_id, ret); |
| 224 | |
| 225 | return ret; |
| 226 | } |
| 227 | |
Cristian Marussi | bb35ff4 | 2021-02-02 22:15:52 +0000 | [diff] [blame] | 228 | static void * |
| 229 | scmi_power_fill_custom_report(const struct scmi_protocol_handle *ph, |
| 230 | u8 evt_id, ktime_t timestamp, |
| 231 | const void *payld, size_t payld_sz, |
| 232 | void *report, u32 *src_id) |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 233 | { |
| 234 | const struct scmi_power_state_notify_payld *p = payld; |
| 235 | struct scmi_power_state_changed_report *r = report; |
| 236 | |
| 237 | if (evt_id != SCMI_EVENT_POWER_STATE_CHANGED || sizeof(*p) != payld_sz) |
| 238 | return NULL; |
| 239 | |
| 240 | r->timestamp = timestamp; |
| 241 | r->agent_id = le32_to_cpu(p->agent_id); |
| 242 | r->domain_id = le32_to_cpu(p->domain_id); |
| 243 | r->power_state = le32_to_cpu(p->power_state); |
| 244 | *src_id = r->domain_id; |
| 245 | |
| 246 | return r; |
| 247 | } |
| 248 | |
Cristian Marussi | bb35ff4 | 2021-02-02 22:15:52 +0000 | [diff] [blame] | 249 | static int scmi_power_get_num_sources(const struct scmi_protocol_handle *ph) |
Cristian Marussi | 834134a | 2021-02-02 22:15:25 +0000 | [diff] [blame] | 250 | { |
Cristian Marussi | bb35ff4 | 2021-02-02 22:15:52 +0000 | [diff] [blame] | 251 | struct scmi_power_info *pinfo = ph->get_priv(ph); |
Cristian Marussi | 834134a | 2021-02-02 22:15:25 +0000 | [diff] [blame] | 252 | |
| 253 | if (!pinfo) |
| 254 | return -EINVAL; |
| 255 | |
| 256 | return pinfo->num_domains; |
| 257 | } |
| 258 | |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 259 | static const struct scmi_event power_events[] = { |
| 260 | { |
| 261 | .id = SCMI_EVENT_POWER_STATE_CHANGED, |
| 262 | .max_payld_sz = sizeof(struct scmi_power_state_notify_payld), |
| 263 | .max_report_sz = |
| 264 | sizeof(struct scmi_power_state_changed_report), |
| 265 | }, |
| 266 | }; |
| 267 | |
| 268 | static const struct scmi_event_ops power_event_ops = { |
Cristian Marussi | 834134a | 2021-02-02 22:15:25 +0000 | [diff] [blame] | 269 | .get_num_sources = scmi_power_get_num_sources, |
Cristian Marussi | e27077b | 2020-07-01 16:53:44 +0100 | [diff] [blame] | 270 | .set_notify_enabled = scmi_power_set_notify_enabled, |
| 271 | .fill_custom_report = scmi_power_fill_custom_report, |
| 272 | }; |
| 273 | |
Cristian Marussi | 834134a | 2021-02-02 22:15:25 +0000 | [diff] [blame] | 274 | static const struct scmi_protocol_events power_protocol_events = { |
| 275 | .queue_sz = SCMI_PROTO_QUEUE_SZ, |
| 276 | .ops = &power_event_ops, |
| 277 | .evts = power_events, |
| 278 | .num_events = ARRAY_SIZE(power_events), |
| 279 | }; |
| 280 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 281 | static int scmi_power_protocol_init(const struct scmi_protocol_handle *ph) |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 282 | { |
| 283 | int domain; |
| 284 | u32 version; |
| 285 | struct scmi_power_info *pinfo; |
| 286 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 287 | ph->xops->version_get(ph, &version); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 288 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 289 | dev_dbg(ph->dev, "Power Version %d.%d\n", |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 290 | PROTOCOL_REV_MAJOR(version), PROTOCOL_REV_MINOR(version)); |
| 291 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 292 | pinfo = devm_kzalloc(ph->dev, sizeof(*pinfo), GFP_KERNEL); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 293 | if (!pinfo) |
| 294 | return -ENOMEM; |
| 295 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 296 | scmi_power_attributes_get(ph, pinfo); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 297 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 298 | pinfo->dom_info = devm_kcalloc(ph->dev, pinfo->num_domains, |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 299 | sizeof(*pinfo->dom_info), GFP_KERNEL); |
| 300 | if (!pinfo->dom_info) |
| 301 | return -ENOMEM; |
| 302 | |
| 303 | for (domain = 0; domain < pinfo->num_domains; domain++) { |
| 304 | struct power_dom_info *dom = pinfo->dom_info + domain; |
| 305 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 306 | scmi_power_domain_attributes_get(ph, domain, dom); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 307 | } |
| 308 | |
Sudeep Holla | b55b06b | 2019-11-22 14:48:40 +0000 | [diff] [blame] | 309 | pinfo->version = version; |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 310 | |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 311 | return ph->set_priv(ph, pinfo); |
Sudeep Holla | 76a6550 | 2017-06-06 11:32:24 +0100 | [diff] [blame] | 312 | } |
| 313 | |
Cristian Marussi | cf516fb | 2021-02-02 22:15:19 +0000 | [diff] [blame] | 314 | static const struct scmi_protocol scmi_power = { |
| 315 | .id = SCMI_PROTOCOL_POWER, |
Cristian Marussi | db15cd2 | 2021-02-02 22:15:54 +0000 | [diff] [blame] | 316 | .owner = THIS_MODULE, |
Cristian Marussi | ec2e9785 | 2021-02-02 22:15:33 +0000 | [diff] [blame] | 317 | .init_instance = &scmi_power_protocol_init, |
| 318 | .ops = &power_proto_ops, |
Cristian Marussi | 834134a | 2021-02-02 22:15:25 +0000 | [diff] [blame] | 319 | .events = &power_protocol_events, |
Cristian Marussi | cf516fb | 2021-02-02 22:15:19 +0000 | [diff] [blame] | 320 | }; |
| 321 | |
| 322 | DEFINE_SCMI_PROTOCOL_REGISTER_UNREGISTER(power, scmi_power) |