From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-sh@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>,
lethal@linux-sh.org, hjk@linutronix.de, gregkh@suse.de
Subject: [PATCH 01/03] uio: Add enable_irq() callback
Date: Tue, 20 May 2008 10:51:40 +0000 [thread overview]
Message-ID: <20080520105140.1474.59715.sendpatchset@rx1.opensource.se> (raw)
In-Reply-To: <20080520105132.1474.73941.sendpatchset@rx1.opensource.se>
Add enable_irq() callback to struct uio_info. This callback is needed by
the uio_platform driver so interrupts can be enabled before blocking.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/uio/uio.c | 6 ++++++
include/linux/uio_driver.h | 1 +
2 files changed, 7 insertions(+)
--- 0001/drivers/uio/uio.c
+++ work/drivers/uio/uio.c 2008-05-19 14:52:08.000000000 +0900
@@ -365,6 +365,9 @@ static unsigned int uio_poll(struct file
if (idev->info->irq = UIO_IRQ_NONE)
return -EIO;
+ if (idev->info->enable_irq)
+ idev->info->enable_irq(idev->info);
+
poll_wait(filep, &idev->wait, wait);
if (listener->event_count != atomic_read(&idev->event))
return POLLIN | POLLRDNORM;
@@ -391,6 +394,9 @@ static ssize_t uio_read(struct file *fil
do {
set_current_state(TASK_INTERRUPTIBLE);
+ if (idev->info->enable_irq)
+ idev->info->enable_irq(idev->info);
+
event_count = atomic_read(&idev->event);
if (event_count != listener->event_count) {
if (copy_to_user(buf, &event_count, count))
--- 0001/include/linux/uio_driver.h
+++ work/include/linux/uio_driver.h 2008-05-19 14:52:08.000000000 +0900
@@ -64,6 +64,7 @@ struct uio_info {
void *priv;
irqreturn_t (*handler)(int irq, struct uio_info *dev_info);
int (*mmap)(struct uio_info *info, struct vm_area_struct *vma);
+ void (*enable_irq)(struct uio_info *info);
int (*open)(struct uio_info *info, struct inode *inode);
int (*release)(struct uio_info *info, struct inode *inode);
};
next prev parent reply other threads:[~2008-05-20 10:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 10:51 [PATCH 00/03][RFC] Reusable UIO Platform Driver Magnus Damm
2008-05-20 10:51 ` Magnus Damm [this message]
2008-05-21 11:58 ` [PATCH 01/03] uio: Add enable_irq() callback Magnus Damm
2008-05-22 20:18 ` Hans J. Koch
2008-05-23 1:24 ` Magnus Damm
2008-05-23 8:43 ` Hans J. Koch
2008-05-20 10:51 ` [PATCH 02/03] uio: Add uio_platform driver Magnus Damm
2008-05-20 10:51 ` [PATCH 03/03] sh: Export sh7343/sh7722/sh7723 VPU/VEU blocks Magnus Damm
2008-05-20 21:07 ` [PATCH 00/03][RFC] Reusable UIO Platform Driver Hans J. Koch
2008-05-21 3:31 ` Magnus Damm
2008-05-21 6:49 ` Uwe Kleine-König
2008-05-21 7:49 ` Paul Mundt
2008-05-21 8:05 ` Uwe Kleine-König
2008-05-21 8:22 ` Magnus Damm
2008-05-21 8:50 ` Uwe Kleine-König
2008-05-21 8:09 ` Magnus Damm
2008-05-21 9:25 ` Uwe Kleine-König
2008-05-21 10:50 ` Magnus Damm
2008-05-21 11:04 ` Uwe Kleine-König
2008-05-21 11:56 ` Magnus Damm
2008-05-21 12:09 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080520105140.1474.59715.sendpatchset@rx1.opensource.se \
--to=magnus.damm@gmail.com \
--cc=gregkh@suse.de \
--cc=hjk@linutronix.de \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).