Skip to content

Commit

Permalink
drivers: interrupt_controller: changes in shared irq
Browse files Browse the repository at this point in the history
Updated the shared IRQ handler function in the shared interrupt controller
drivers to include support for the 'irq_number' parameter. When a single
driver manages multiple shared IRQs, it becomes challenging to determine
which IRQ line is invoking the handler. Therefore, I've introduced an
option to share the IRQ number to address this issue.

Signed-off-by: Navinkumar Balabakthan <navinkumar.balabakthan@intel.com>
  • Loading branch information
nbalabak committed Dec 12, 2023
1 parent bd227e1 commit 4f6484d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/interrupt_controller/intc_shared_irq.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Intel Corporation.
* Copyright (c) 2015 - 2023 Intel Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -125,7 +125,7 @@ void shared_irq_isr(const struct device *dev)

for (i = 0U; i < config->client_count; i++) {
if (clients->client[i].isr_dev) {
clients->client[i].isr_func(clients->client[i].isr_dev);
clients->client[i].isr_func(clients->client[i].isr_dev, config->irq_num);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions include/zephyr/shared_irq.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* shared_irq - Shared interrupt driver */

/*
* Copyright (c) 2015 Intel corporation
* Copyright (c) 2015 - 2023 Intel corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -14,7 +14,7 @@
extern "C" {
#endif

typedef int (*isr_t)(const struct device *dev);
typedef int (*isr_t)(const struct device *dev, unsigned int irq_number);

/* driver API definition */
typedef int (*shared_irq_register_t)(const struct device *dev,
Expand Down

0 comments on commit 4f6484d

Please sign in to comment.