Lines Matching +full:ctrl +full:- +full:ids

1 // SPDX-License-Identifier: GPL-2.0+
20 return -EPROBE_DEFER; in scmi_imx_misc_ctrl_set()
22 return imx_misc_ctrl_ops->misc_ctrl_set(ph, id, 1, &val); in scmi_imx_misc_ctrl_set()
29 return -EPROBE_DEFER; in scmi_imx_misc_ctrl_get()
31 return imx_misc_ctrl_ops->misc_ctrl_get(ph, id, num, val); in scmi_imx_misc_ctrl_get()
49 const struct scmi_handle *handle = sdev->handle; in scmi_imx_misc_ctrl_probe()
50 struct device_node *np = sdev->dev.of_node; in scmi_imx_misc_ctrl_probe()
55 return -ENODEV; in scmi_imx_misc_ctrl_probe()
58 dev_err(&sdev->dev, "misc ctrl already initialized\n"); in scmi_imx_misc_ctrl_probe()
59 return -EEXIST; in scmi_imx_misc_ctrl_probe()
62 imx_misc_ctrl_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_IMX_MISC, &ph); in scmi_imx_misc_ctrl_probe()
66 num = of_property_count_u32_elems(np, "nxp,ctrl-ids"); in scmi_imx_misc_ctrl_probe()
68 dev_err(&sdev->dev, "Invalid wakeup-sources\n"); in scmi_imx_misc_ctrl_probe()
69 return -EINVAL; in scmi_imx_misc_ctrl_probe()
74 ret = of_property_read_u32_index(np, "nxp,ctrl-ids", i, &src_id); in scmi_imx_misc_ctrl_probe()
76 dev_err(&sdev->dev, "Failed to read ctrl-id: %i\n", i); in scmi_imx_misc_ctrl_probe()
80 ret = of_property_read_u32_index(np, "nxp,ctrl-ids", i + 1, &flags); in scmi_imx_misc_ctrl_probe()
82 dev_err(&sdev->dev, "Failed to read ctrl-id value: %d\n", i + 1); in scmi_imx_misc_ctrl_probe()
86 ret = handle->notify_ops->devm_event_notifier_register(sdev, SCMI_PROTOCOL_IMX_MISC, in scmi_imx_misc_ctrl_probe()
91 dev_err(&sdev->dev, "Failed to register scmi misc event: %d\n", src_id); in scmi_imx_misc_ctrl_probe()
93 ret = imx_misc_ctrl_ops->misc_ctrl_req_notify(ph, src_id, in scmi_imx_misc_ctrl_probe()
97 dev_err(&sdev->dev, "Failed to req notify: %d\n", src_id); in scmi_imx_misc_ctrl_probe()
105 { SCMI_PROTOCOL_IMX_MISC, "imx-misc-ctrl" },
111 .name = "scmi-imx-misc-ctrl",