-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'irq/for-gpio' of git://git.kernel.org/pub/scm/linux/ker…
…nel/git/tip/tip into devel
- Loading branch information
Showing
9 changed files
with
533 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef _LINUX_IRQ_SIM_H | ||
#define _LINUX_IRQ_SIM_H | ||
/* | ||
* Copyright (C) 2017 Bartosz Golaszewski <brgl@bgdev.pl> | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
*/ | ||
|
||
#include <linux/irq_work.h> | ||
#include <linux/device.h> | ||
|
||
/* | ||
* Provides a framework for allocating simulated interrupts which can be | ||
* requested like normal irqs and enqueued from process context. | ||
*/ | ||
|
||
struct irq_sim_work_ctx { | ||
struct irq_work work; | ||
int irq; | ||
}; | ||
|
||
struct irq_sim_irq_ctx { | ||
int irqnum; | ||
bool enabled; | ||
}; | ||
|
||
struct irq_sim { | ||
struct irq_sim_work_ctx work_ctx; | ||
int irq_base; | ||
unsigned int irq_count; | ||
struct irq_sim_irq_ctx *irqs; | ||
}; | ||
|
||
int irq_sim_init(struct irq_sim *sim, unsigned int num_irqs); | ||
int devm_irq_sim_init(struct device *dev, struct irq_sim *sim, | ||
unsigned int num_irqs); | ||
void irq_sim_fini(struct irq_sim *sim); | ||
void irq_sim_fire(struct irq_sim *sim, unsigned int offset); | ||
int irq_sim_irqnum(struct irq_sim *sim, unsigned int offset); | ||
|
||
#endif /* _LINUX_IRQ_SIM_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.