qcacld-3.0: Add PLD API to check DRV connection
Add PLD API in order to check if DRV (Direct Resource Vote) subsystem is connected or not. Change-Id: I3b600b0760e27c7111320088034c555aee4ff773 CRs-fixed: 2452039
Tento commit je obsažen v:
@@ -625,6 +625,7 @@ int pld_get_user_msi_assignment(struct device *dev, char *user_name,
|
||||
int pld_get_msi_irq(struct device *dev, unsigned int vector);
|
||||
void pld_get_msi_address(struct device *dev, uint32_t *msi_addr_low,
|
||||
uint32_t *msi_addr_high);
|
||||
int pld_is_drv_connected(struct device *dev);
|
||||
unsigned int pld_socinfo_get_serial_number(struct device *dev);
|
||||
int pld_is_qmi_disable(struct device *dev);
|
||||
int pld_is_fw_down(struct device *dev);
|
||||
|
@@ -1551,6 +1551,36 @@ void pld_get_msi_address(struct device *dev, uint32_t *msi_addr_low,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_is_drv_connected() - Check if DRV subsystem is connected
|
||||
* @dev: device structure
|
||||
*
|
||||
* Return: 1 DRV is connected
|
||||
* 0 DRV is not connected
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_is_drv_connected(struct device *dev)
|
||||
{
|
||||
enum pld_bus_type type = pld_get_bus_type(dev);
|
||||
int ret = 0;
|
||||
|
||||
switch (type) {
|
||||
case PLD_BUS_TYPE_PCIE:
|
||||
ret = pld_pcie_is_drv_connected(dev);
|
||||
break;
|
||||
case PLD_BUS_TYPE_SNOC:
|
||||
case PLD_BUS_TYPE_SDIO:
|
||||
case PLD_BUS_TYPE_USB:
|
||||
break;
|
||||
default:
|
||||
pr_err("Invalid device type %d\n", type);
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_socinfo_get_serial_number() - Get SOC serial number
|
||||
* @dev: device
|
||||
|
@@ -316,6 +316,11 @@ static inline void pld_pcie_get_msi_address(struct device *dev,
|
||||
return;
|
||||
}
|
||||
|
||||
static inline int pld_pcie_is_drv_connected(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool pld_pcie_platform_driver_support(void)
|
||||
{
|
||||
return false;
|
||||
@@ -474,6 +479,11 @@ static inline void pld_pcie_get_msi_address(struct device *dev,
|
||||
cnss_get_msi_address(dev, msi_addr_low, msi_addr_high);
|
||||
}
|
||||
|
||||
static inline int pld_pcie_is_drv_connected(struct device *dev)
|
||||
{
|
||||
return cnss_pci_is_drv_connected(dev);
|
||||
}
|
||||
|
||||
static inline bool pld_pcie_platform_driver_support(void)
|
||||
{
|
||||
return true;
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele