28 #include <linux/slab.h>
31 #include <linux/module.h>
63 pr_debug(
"pmi: got message of type %d\n", type);
90 if (data->
msg.type & PMI_ACK) {
105 { .type =
"ibm,pmi", .name =
"ibm,pmi" },
106 { .type =
"ibm,pmi" },
118 pr_debug(
"pmi: notifying handler %p\n", handler);
119 if (handler->type == data->
msg.type)
120 handler->handle_pmi_message(data->
msg);
147 goto error_cleanup_data;
150 INIT_LIST_HEAD(&data->
handler);
164 goto error_cleanup_iomap;
171 goto error_cleanup_iomap;
190 struct pmi_handler *handler, *
tmp;
200 spin_unlock(&data->handler_spinlock);
209 .
probe = pmi_of_probe,
210 .remove = pmi_of_remove,
214 .of_match_table = pmi_match,
218 static int __init pmi_module_init(
void)
224 static void __exit pmi_module_exit(
void)
241 pr_debug(
"pmi_send_message: msg is %08x\n", *(
u32*)&msg);
252 pr_debug(
"pmi_send_message: wait for completion\n");
283 pr_debug(
"pmi: unregistering handler %p\n", handler);