Lines Matching defs:handle

207  * @handle: A reference to the platform instance
217 * Each platform instance, represented by a handle, has its own instance of
222 struct scmi_handle *handle;
282 * @ph: SCMI protocol handle reference
436 dev_err(pd->ni->handle->dev, "corrupted EVT header. Flush.\n");
478 dev_err(pd->ni->handle->dev, "corrupted EVT Payload. Flush.\n");
484 dev_warn(pd->ni->handle->dev,
494 dev_err(pd->ni->handle->dev,
565 * @handle: The handle identifying the platform instance from which the
578 int scmi_notify(const struct scmi_handle *handle, u8 proto_id, u8 evt_id,
585 ni = scmi_notification_instance_data_get(handle);
594 dev_err(handle->dev, "discard badly sized message\n");
598 dev_warn(handle->dev,
661 ret = devm_add_action_or_reset(ni->handle->dev, scmi_kfifo_free,
704 pd = devm_kzalloc(ni->handle->dev, sizeof(*pd), GFP_KERNEL);
715 pd->eh = devm_kzalloc(ni->handle->dev, eh_sz, GFP_KERNEL);
720 pd->registered_events = devm_kcalloc(ni->handle->dev, num_events,
735 * @handle: The handle identifying the platform instance against which the
738 * @ph: SCMI protocol handle.
748 int scmi_register_protocol_events(const struct scmi_handle *handle, u8 proto_id,
763 ni = scmi_notification_instance_data_get(handle);
793 r_evt = devm_kzalloc(ni->handle->dev, sizeof(*r_evt),
800 r_evt->sources = devm_kcalloc(ni->handle->dev, num_sources,
807 r_evt->report = devm_kzalloc(ni->handle->dev,
815 dev_dbg(handle->dev, "registered event - %lX\n",
835 * @handle: The handle identifying the platform instance against which the
839 void scmi_deregister_protocol_events(const struct scmi_handle *handle,
845 ni = scmi_notification_instance_data_get(handle);
939 scmi_protocol_acquire(ni->handle, KEY_XTRACT_PROTO_ID(hndl->key));
1003 dev_dbg(ni->handle->dev, "registered NEW handler - key:%X\n",
1008 dev_dbg(ni->handle->dev,
1078 dev_dbg(ni->handle->dev,
1274 scmi_protocol_release(ni->handle, protocol_id);
1290 scmi_protocol_release(ni->handle, protocol_id);
1311 * @handle: The handle identifying the platform instance against which the
1342 static int scmi_notifier_register(const struct scmi_handle *handle,
1351 ni = scmi_notification_instance_data_get(handle);
1375 * @handle: The handle identifying the platform instance against which the
1389 static int scmi_notifier_unregister(const struct scmi_handle *handle,
1397 ni = scmi_notification_instance_data_get(handle);
1431 const struct scmi_handle *handle;
1443 scmi_notifier_unregister(dres->handle, dres->proto_id, dres->evt_id,
1476 ret = scmi_notifier_register(sdev->handle, proto_id,
1483 dres->handle = sdev->handle;
1539 dres.handle = sdev->handle;
1585 dev_dbg(ni->handle->dev,
1590 dev_dbg(ni->handle->dev,
1598 dev_dbg(ni->handle->dev,
1610 * notify_ops are attached to the handle so that can be accessed
1622 * @handle: The handle identifying the platform instance to initialize
1625 * core instance identified by the provided handle: once done, all of the
1646 int scmi_notification_init(struct scmi_handle *handle)
1651 gid = devres_open_group(handle->dev, NULL, GFP_KERNEL);
1655 ni = devm_kzalloc(handle->dev, sizeof(*ni), GFP_KERNEL);
1660 ni->handle = handle;
1662 ni->registered_protocols = devm_kcalloc(handle->dev, SCMI_MAX_PROTO,
1667 ni->notify_wq = alloc_workqueue(dev_name(handle->dev),
1678 scmi_notification_instance_data_set(handle, ni);
1679 handle->notify_ops = &notify_ops;
1680 /* Ensure handle is up to date */
1683 dev_info(handle->dev, "Core Enabled.\n");
1685 devres_close_group(handle->dev, ni->gid);
1690 dev_warn(handle->dev, "Initialization Failed.\n");
1691 devres_release_group(handle->dev, gid);
1697 * @handle: The handle identifying the platform instance to shutdown
1699 void scmi_notification_exit(struct scmi_handle *handle)
1703 ni = scmi_notification_instance_data_get(handle);
1706 scmi_notification_instance_data_set(handle, NULL);
1711 devres_release_group(ni->handle->dev, ni->gid);