1
0
Fork 0
forked from nuttx/nuttx-update

pci_ivshmem.c: ivshmem_support_irq API support

ivshmem based driver can use this api to judge weather current
ivshmem device support irq or not, and use polling mode or irq
mode to process the event.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
This commit is contained in:
wangyongrong 2024-04-29 17:19:33 +08:00 committed by Xiang Xiao
parent 99b6c77c79
commit ad2e6fb2ba
2 changed files with 23 additions and 0 deletions

View file

@ -413,6 +413,19 @@ int ivshmem_control_irq(FAR struct ivshmem_device_s *dev, bool on)
return OK;
}
/****************************************************************************
* Name: ivshmem_support_irq
*
* Description:
* Judge if support ivshmem interrupt
*
****************************************************************************/
bool ivshmem_support_irq(FAR struct ivshmem_device_s *dev)
{
return dev->vmid != IVSHMEM_INVALID_VMID;
}
/****************************************************************************
* Name: ivshmem_kick_peer
*

View file

@ -116,6 +116,16 @@ int ivshmem_detach_irq(FAR struct ivshmem_device_s *dev);
int ivshmem_control_irq(FAR struct ivshmem_device_s *dev, bool on);
/****************************************************************************
* Name: ivshmem_support_irq
*
* Description:
* judge if support ivshmem interrupt
*
****************************************************************************/
bool ivshmem_support_irq(FAR struct ivshmem_device_s *dev);
/****************************************************************************
* Name: ivshmem_kick_peer
*