xref: /openbmc/linux/drivers/net/wwan/iosm/iosm_ipc_irq.h (revision 762f99f4f3cb41a775b5157dd761217beba65873)
1*7f41ce08SM Chetan Kumar /* SPDX-License-Identifier: GPL-2.0-only
2*7f41ce08SM Chetan Kumar  *
3*7f41ce08SM Chetan Kumar  * Copyright (C) 2020-21 Intel Corporation.
4*7f41ce08SM Chetan Kumar  */
5*7f41ce08SM Chetan Kumar 
6*7f41ce08SM Chetan Kumar #ifndef IOSM_IPC_IRQ_H
7*7f41ce08SM Chetan Kumar #define IOSM_IPC_IRQ_H
8*7f41ce08SM Chetan Kumar 
9*7f41ce08SM Chetan Kumar struct iosm_pcie;
10*7f41ce08SM Chetan Kumar 
11*7f41ce08SM Chetan Kumar /**
12*7f41ce08SM Chetan Kumar  * ipc_doorbell_fire - fire doorbell to CP
13*7f41ce08SM Chetan Kumar  * @ipc_pcie:	Pointer to iosm_pcie
14*7f41ce08SM Chetan Kumar  * @irq_n:	Doorbell type
15*7f41ce08SM Chetan Kumar  * @data:	ipc state
16*7f41ce08SM Chetan Kumar  */
17*7f41ce08SM Chetan Kumar void ipc_doorbell_fire(struct iosm_pcie *ipc_pcie, int irq_n, u32 data);
18*7f41ce08SM Chetan Kumar 
19*7f41ce08SM Chetan Kumar /**
20*7f41ce08SM Chetan Kumar  * ipc_release_irq - Release the IRQ handler.
21*7f41ce08SM Chetan Kumar  * @ipc_pcie:	Pointer to iosm_pcie struct
22*7f41ce08SM Chetan Kumar  */
23*7f41ce08SM Chetan Kumar void ipc_release_irq(struct iosm_pcie *ipc_pcie);
24*7f41ce08SM Chetan Kumar 
25*7f41ce08SM Chetan Kumar /**
26*7f41ce08SM Chetan Kumar  * ipc_acquire_irq - acquire IRQ & register IRQ handler.
27*7f41ce08SM Chetan Kumar  * @ipc_pcie:	Pointer to iosm_pcie struct
28*7f41ce08SM Chetan Kumar  *
29*7f41ce08SM Chetan Kumar  * Return: 0 on success and failure value on error
30*7f41ce08SM Chetan Kumar  */
31*7f41ce08SM Chetan Kumar int ipc_acquire_irq(struct iosm_pcie *ipc_pcie);
32*7f41ce08SM Chetan Kumar 
33*7f41ce08SM Chetan Kumar #endif
34