Linux 6.13
[linux.git] / drivers / net / ipa / ipa_smp2p.h
blob2a3d8eefb13bb08d5868a8d6a7fa5f773638d725
1 /* SPDX-License-Identifier: GPL-2.0 */
3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2019-2022 Linaro Ltd.
5 */
6 #ifndef _IPA_SMP2P_H_
7 #define _IPA_SMP2P_H_
9 #include <linux/types.h>
11 struct platform_device;
13 struct ipa;
15 /**
16 * ipa_smp2p_init() - Initialize the IPA SMP2P subsystem
17 * @ipa: IPA pointer
18 * @pdev: Platform device pointer
19 * @modem_init: Whether the modem is responsible for GSI initialization
21 * Return: 0 if successful, or a negative error code
23 int ipa_smp2p_init(struct ipa *ipa, struct platform_device *pdev,
24 bool modem_init);
26 /**
27 * ipa_smp2p_exit() - Inverse of ipa_smp2p_init()
28 * @ipa: IPA pointer
30 void ipa_smp2p_exit(struct ipa *ipa);
32 /**
33 * ipa_smp2p_irq_disable_setup() - Disable the "setup ready" interrupt
34 * @ipa: IPA pointer
36 * Disable the "ipa-setup-ready" interrupt from the modem.
38 void ipa_smp2p_irq_disable_setup(struct ipa *ipa);
40 /**
41 * ipa_smp2p_notify_reset() - Reset modem notification state
42 * @ipa: IPA pointer
44 * If the modem crashes it queries the IPA power state. In cleaning
45 * up after such a crash this is used to reset some state maintained
46 * for managing this notification.
48 void ipa_smp2p_notify_reset(struct ipa *ipa);
50 #endif /* _IPA_SMP2P_H_ */