mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Provide PLD API for getting IRQ number
Provide PLD API of getting IRQ number for a given CE ID. Change-Id: Icd293993e84ab4daa98430db231b8b73e082cd29 CRs-Fixed: 1047259
This commit is contained in:
parent
9135361da5
commit
f2ee05f167
4 changed files with 42 additions and 0 deletions
|
|
@ -376,6 +376,7 @@ void pld_enable_irq(struct device *dev, unsigned int ce_id);
|
|||
void pld_disable_irq(struct device *dev, unsigned int ce_id);
|
||||
int pld_get_soc_info(struct device *dev, struct pld_soc_info *info);
|
||||
int pld_get_ce_id(struct device *dev, int irq);
|
||||
int pld_get_irq(struct device *dev, int ce_id);
|
||||
void pld_lock_pm_sem(struct device *dev);
|
||||
void pld_release_pm_sem(struct device *dev);
|
||||
int pld_power_on(struct device *dev);
|
||||
|
|
|
|||
|
|
@ -1271,6 +1271,30 @@ int pld_get_ce_id(struct device *dev, int irq)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_get_irq() - Get IRQ number for given CE ID
|
||||
* @dev: device
|
||||
* @ce_id: CE ID
|
||||
*
|
||||
* Return: IRQ number
|
||||
*/
|
||||
int pld_get_irq(struct device *dev, int ce_id)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
switch (pld_get_bus_type(dev)) {
|
||||
case PLD_BUS_TYPE_SNOC:
|
||||
ret = pld_snoc_get_irq(ce_id);
|
||||
break;
|
||||
case PLD_BUS_TYPE_PCIE:
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_lock_pm_sem() - Lock PM semaphore
|
||||
* @dev: device
|
||||
|
|
|
|||
|
|
@ -381,4 +381,16 @@ int pld_snoc_power_off(struct device *dev)
|
|||
{
|
||||
return icnss_power_off(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_get_irq() - Get IRQ number for given CE ID
|
||||
* @ce_id: CE ID
|
||||
*
|
||||
* Return: IRQ number
|
||||
*/
|
||||
int pld_snoc_get_irq(int ce_id)
|
||||
{
|
||||
return icnss_get_irq(ce_id);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ static inline int pld_snoc_power_off(struct device *dev)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int pld_snoc_get_irq(int ce_id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int pld_snoc_register_driver(void);
|
||||
void pld_snoc_unregister_driver(void);
|
||||
|
|
@ -99,6 +103,7 @@ void pld_snoc_disable_irq(unsigned int ce_id);
|
|||
int pld_snoc_get_ce_id(int irq);
|
||||
int pld_snoc_power_on(struct device *dev);
|
||||
int pld_snoc_power_off(struct device *dev);
|
||||
int pld_snoc_get_irq(int ce_id);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue