/** * pm_req_suspend() - PM call to request for another PU or subsystem to * be suspended gracefully. * @target Node id of the targeted PU or subsystem * @ack Flag to specify whether acknowledge is requested * @latency Requested wakeup latency (not supported) * @state Requested state (not supported) * * @return Returns status, either success or error+reason */ enum pm_ret_status pm_req_suspend(enum pm_node_id target, enum pm_request_ack ack, unsigned int latency, unsigned int state) { uint32_t payload[PAYLOAD_ARG_CNT]; /* Send request to the PMU */ PM_PACK_PAYLOAD5(payload, PM_REQ_SUSPEND, target, ack, latency, state); if (ack == REQ_ACK_BLOCKING) return pm_ipi_send_sync(primary_proc, payload, NULL); else return pm_ipi_send(primary_proc, payload); }
/** * pm_req_node() - PM call to request a node with specific capabilities * @nid Node id of the slave * @capabilities Requested capabilities of the slave * @qos Quality of service (not supported) * @ack Flag to specify whether acknowledge is requested * * @return Returns status, either success or error+reason */ enum pm_ret_status pm_req_node(enum pm_node_id nid, unsigned int capabilities, unsigned int qos, enum pm_request_ack ack) { uint32_t payload[PAYLOAD_ARG_CNT]; PM_PACK_PAYLOAD5(payload, PM_REQ_NODE, nid, capabilities, qos, ack); if (ack == REQ_ACK_BLOCKING) return pm_ipi_send_sync(primary_proc, payload, NULL); else return pm_ipi_send(primary_proc, payload); }
/** * pm_set_requirement() - PM call to set requirement for PM slaves * @nid Node id of the slave * @capabilities Requested capabilities of the slave * @qos Quality of service (not supported) * @ack Flag to specify whether acknowledge is requested * * This API function is to be used for slaves a PU already has requested * * @return Returns status, either success or error+reason */ enum pm_ret_status pm_set_requirement(const enum pm_node_id nid, const uint32_t capabilities, const uint32_t qos, const enum pm_request_ack ack) { uint32_t payload[PAYLOAD_ARG_CNT]; PM_PACK_PAYLOAD5(payload, PM_SET_REQUIREMENT, nid, capabilities, qos, ack); if (REQ_ACK_BLOCKING == ack) return pm_ipi_send_sync(primary_proc, payload, NULL); else return pm_ipi_send(primary_proc, payload); }