Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09097866 authored by Sameer Thalappil's avatar Sameer Thalappil Committed by Kyle Yan
Browse files

icnss: Add API to return the CE IRQ number



API retrieves the IRQ number for the CE ID passed.

Change-Id: I87cca1215134e6d406f60d54f6d0430978eeae9c
Signed-off-by: default avatarSameer Thalappil <sameert@codeaurora.org>
parent d16c4eb6
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -1309,6 +1309,9 @@ int icnss_get_ce_id(int irq)
{
	int i;

	if (!penv || !penv->pdev)
		return -ENODEV;

	for (i = 0; i < ICNSS_MAX_IRQ_REGISTRATIONS; i++) {
		if (penv->ce_irqs[i] == irq)
			return i;
@@ -1318,6 +1321,22 @@ int icnss_get_ce_id(int irq)
}
EXPORT_SYMBOL(icnss_get_ce_id);

int icnss_get_irq(int ce_id)
{
	int irq;

	if (!penv || !penv->pdev)
		return -ENODEV;

	if (ce_id >= ICNSS_MAX_IRQ_REGISTRATIONS)
		return -EINVAL;

	irq = penv->ce_irqs[ce_id];

	return irq;
}
EXPORT_SYMBOL(icnss_get_irq);

static struct clk *icnss_clock_init(struct device *dev, const char *cname)
{
	struct clk *c;
+1 −0
Original line number Diff line number Diff line
@@ -97,5 +97,6 @@ extern int icnss_ce_request_irq(unsigned int ce_id,
	unsigned long flags, const char *name, void *ctx);
extern int icnss_get_ce_id(int irq);
extern int icnss_set_fw_debug_mode(bool enablefwlog);
extern int icnss_get_irq(int ce_id);

#endif /* _ICNSS_WLAN_H_ */