![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 0003 /* Copyright (c) 2018, The Linux Foundation. All rights reserved. 0004 * Copyright (C) 2018-2020 Linaro Ltd. 0005 */ 0006 #ifndef _IPA_QMI_H_ 0007 #define _IPA_QMI_H_ 0008 0009 #include <linux/types.h> 0010 #include <linux/soc/qcom/qmi.h> 0011 0012 struct ipa; 0013 0014 /** 0015 * struct ipa_qmi - QMI state associated with an IPA 0016 * @client_handle: Used to send an QMI requests to the modem 0017 * @server_handle: Used to handle QMI requests from the modem 0018 * @modem_sq: QMAP socket address for the modem QMI server 0019 * @init_driver_work: Work structure used for INIT_DRIVER message handling 0020 * @initial_boot: True if first boot has not yet completed 0021 * @uc_ready: True once DRIVER_INIT_COMPLETE request received 0022 * @modem_ready: True when INIT_DRIVER response received 0023 * @indication_requested: True when INDICATION_REGISTER request received 0024 * @indication_sent: True when INIT_COMPLETE indication sent 0025 */ 0026 struct ipa_qmi { 0027 struct qmi_handle client_handle; 0028 struct qmi_handle server_handle; 0029 0030 /* Information used for the client handle */ 0031 struct sockaddr_qrtr modem_sq; 0032 struct work_struct init_driver_work; 0033 0034 /* Flags used in negotiating readiness */ 0035 bool initial_boot; 0036 bool uc_ready; 0037 bool modem_ready; 0038 bool indication_requested; 0039 bool indication_sent; 0040 }; 0041 0042 /** 0043 * ipa_qmi_setup() - Set up for QMI message exchange 0044 * @ipa: IPA pointer 0045 * 0046 * This is called at the end of ipa_setup(), to prepare for the exchange 0047 * of QMI messages that perform a "handshake" between the AP and modem. 0048 * When the modem QMI server announces its presence, an AP request message 0049 * supplies operating parameters to be used to the modem, and the modem 0050 * acknowledges receipt of those parameters. The modem will not touch the 0051 * IPA hardware until this handshake is complete. 0052 * 0053 * If the modem crashes (or shuts down) a new handshake begins when the 0054 * modem's QMI server is started again. 0055 */ 0056 int ipa_qmi_setup(struct ipa *ipa); 0057 0058 /** 0059 * ipa_qmi_teardown() - Tear down IPA QMI handles 0060 * @ipa: IPA pointer 0061 */ 0062 void ipa_qmi_teardown(struct ipa *ipa); 0063 0064 #endif /* !_IPA_QMI_H_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |