[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-421-gc500247
Brought to you by:
sszy
|
From: Fabien M <fa...@us...> - 2010-06-09 14:17:47
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via c500247fda49ccdd9f3603238615ee20950d2c76 (commit)
via a7fdbce5eabf24a93ac4df62094a957f5ce4e923 (commit)
from f273c2b6c25f79d74a42721205e8074057af5193 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c500247fda49ccdd9f3603238615ee20950d2c76
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 9 16:16:53 2010 +0200
[linux] suppress both edge management in interrupt function for gpio driver
commit a7fdbce5eabf24a93ac4df62094a957f5ce4e923
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 9 14:55:23 2010 +0200
[linux] change irq macro name for gpio driver
-----------------------------------------------------------------------
Summary of changes:
target/linux/modules/gpio/core.c | 61 +++++++++++++++-----------------------
1 files changed, 24 insertions(+), 37 deletions(-)
diff --git a/target/linux/modules/gpio/core.c b/target/linux/modules/gpio/core.c
index 9da02d5..6b89228 100755
--- a/target/linux/modules/gpio/core.c
+++ b/target/linux/modules/gpio/core.c
@@ -577,21 +577,11 @@ static irqreturn_t armadeus_gpio_interrupt(int irq, void *dev_id)
gpio_get_value((gpio->port << GPIO_PORT_SHIFT) | gpio->number);
gpio->pin_state = new_state;
- if ((gpio->irq_value != (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))
- || new_state != old_state) {
- gpio->changed = 1;
- wake_up_interruptible(&gpio->change_wq);
-
- if (gpio->async_queue)
- kill_fasync(&gpio->async_queue, SIGIO, POLL_IN);
- if (gpio->irq_value ==
- (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) {
- set_irq_type(irq,
- ((gpio->
- pin_state) ? IRQF_TRIGGER_FALLING :
- IRQF_TRIGGER_RISING));
- }
- }
+ gpio->changed = 1;
+ wake_up_interruptible(&gpio->change_wq);
+
+ if (gpio->async_queue)
+ kill_fasync(&gpio->async_queue, SIGIO, POLL_IN);
return IRQ_HANDLED;
}
@@ -661,18 +651,16 @@ static int armadeus_gpio_dev_open(struct inode *inode, struct file *file)
if (ret)
goto err_irq;
switch (gpio->irq_value) {
- case (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING):
- set_irq_type(irq,
- IRQF_TRIGGER_RISING |
- IRQF_TRIGGER_FALLING);
+ case (IRQ_TYPE_EDGE_BOTH):
+ set_irq_type(irq, IRQ_TYPE_EDGE_BOTH);
break;
- case IRQF_TRIGGER_RISING:
- set_irq_type(irq, IRQF_TRIGGER_RISING);
+ case IRQ_TYPE_EDGE_RISING:
+ set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
break;
- case IRQF_TRIGGER_FALLING:
- set_irq_type(irq, IRQF_TRIGGER_FALLING);
+ case IRQ_TYPE_EDGE_FALLING:
+ set_irq_type(irq, IRQ_TYPE_EDGE_FALLING);
break;
- case IRQF_TRIGGER_NONE:
+ case IRQ_TYPE_NONE:
break;
}
}
@@ -827,8 +815,8 @@ int armadeus_gpio_dev_ioctl(struct inode *inode, struct file *filp,
set_irq_for_pin(pin_num, port_num, value);
}
irq = IRQ_GPIOA(minor); /* irq number are continuous */
- if (value != IRQF_TRIGGER_NONE) {
- if (gpio->irq_value == IRQF_TRIGGER_NONE) {
+ if (value != IRQ_TYPE_NONE) {
+ if (gpio->irq_value == IRQ_TYPE_NONE) {
ret =
request_irq(irq,
armadeus_gpio_interrupt,
@@ -840,26 +828,25 @@ int armadeus_gpio_dev_ioctl(struct inode *inode, struct file *filp,
}
gpio->irq_value = value;
switch (gpio->irq_value) {
- case (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING):
- set_irq_type(irq,
- IRQF_TRIGGER_RISING |
- IRQF_TRIGGER_FALLING);
+ case (IRQ_TYPE_EDGE_BOTH):
+ set_irq_type(irq, IRQ_TYPE_EDGE_BOTH);
break;
- case IRQF_TRIGGER_RISING:
- set_irq_type(irq, IRQF_TRIGGER_RISING);
+ case IRQ_TYPE_EDGE_RISING:
+ set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
break;
- case IRQF_TRIGGER_FALLING:
- set_irq_type(irq, IRQF_TRIGGER_FALLING);
+ case IRQ_TYPE_EDGE_FALLING:
+ set_irq_type(irq, IRQ_TYPE_EDGE_FALLING);
break;
- case IRQF_TRIGGER_NONE:
+ case IRQ_TYPE_NONE:
break;
}
} else {
- if (gpio->irq_value != IRQF_TRIGGER_NONE) {
+ if (gpio->irq_value != IRQ_TYPE_NONE) {
free_irq(irq, gpio);
}
- gpio->irq_value = IRQF_TRIGGER_NONE;
+ gpio->irq_value = IRQ_TYPE_NONE;
}
+ gpio->changed=0;
break;
case GPIORDPULLUP:
hooks/post-receive
--
armadeus
|