staticint scmi_imx_misc_ctrl_notifier(struct notifier_block *nb, unsignedlong event, void *data)
{ /* * notifier_chain_register requires a valid notifier_block and * valid notifier_call. SCMI_EVENT_IMX_MISC_CONTROL is needed * to let SCMI firmware enable control events, but the hook here * is just a dummy function to avoid kernel panic as of now.
*/ return 0;
}
imx_misc_ctrl_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_IMX_MISC, &ph); if (IS_ERR(imx_misc_ctrl_ops)) return PTR_ERR(imx_misc_ctrl_ops);
num = of_property_count_u32_elems(np, "nxp,ctrl-ids"); if (num % 2) {
dev_err(&sdev->dev, "Invalid wakeup-sources\n"); return -EINVAL;
}
scmi_imx_misc_ctrl_nb.notifier_call = &scmi_imx_misc_ctrl_notifier; for (i = 0; i < num; i += 2) {
ret = of_property_read_u32_index(np, "nxp,ctrl-ids", i, &src_id); if (ret) {
dev_err(&sdev->dev, "Failed to read ctrl-id: %i\n", i); continue;
}
ret = of_property_read_u32_index(np, "nxp,ctrl-ids", i + 1, &flags); if (ret) {
dev_err(&sdev->dev, "Failed to read ctrl-id value: %d\n", i + 1); continue;
}
ret = handle->notify_ops->devm_event_notifier_register(sdev, SCMI_PROTOCOL_IMX_MISC,
SCMI_EVENT_IMX_MISC_CONTROL,
&src_id,
&scmi_imx_misc_ctrl_nb); if (ret) {
dev_err(&sdev->dev, "Failed to register scmi misc event: %d\n", src_id);
} else {
ret = imx_misc_ctrl_ops->misc_ctrl_req_notify(ph, src_id,
SCMI_EVENT_IMX_MISC_CONTROL,
flags); if (ret)
dev_err(&sdev->dev, "Failed to req notify: %d\n", src_id);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.