linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Roland Dreier" <rdreier@cisco.com>,
	"Anton Vorontsov" <avorontsov@ru.mvista.com>,
	"Grant Likely" <grant.likely@secretlab.ca>
Cc: linuxppc-dev <Linuxppc-dev@ozlabs.org>
Subject: Re: demuxing irqs
Date: Sun, 14 Sep 2008 23:06:23 -0400	[thread overview]
Message-ID: <9e4733910809142006x350e96abs6af304d8807ccd67@mail.gmail.com> (raw)
In-Reply-To: <9e4733910809141625u3cd94e7jf05584031be7c1d9@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

I have demultiplexing the GPIO interrupts working well enough to make
my hardware work. But now I've discovered that these interrupts can't
do what I need.

Anton, Grant - are either of you interested in this code? It's not
finished but the main ideas are in place.

I need to switch over to using timer pins. They don't have multiplexed
interrupts.

-- 
Jon Smirl
jonsmirl@gmail.com

[-- Attachment #2: jds-gpio --]
[-- Type: application/octet-stream, Size: 16783 bytes --]

Modify gpiolib to pass irqs functions to chip drivers

From: Jon Smirl <jonsmirl@gmail.com>


---

 arch/powerpc/boot/dts/dspeak01.dts         |    6 -
 arch/powerpc/include/asm/gpio.h            |   11 -
 arch/powerpc/platforms/52xx/mpc52xx_gpio.c |  268 +++++++++++++++++++++++++++-
 drivers/input/lirc/lirc_dspeak.c           |   34 +++-
 4 files changed, 289 insertions(+), 30 deletions(-)

diff --git a/arch/powerpc/boot/dts/dspeak01.dts b/arch/powerpc/boot/dts/dspeak01.dts
index cead9e5..a089381 100644
--- a/arch/powerpc/boot/dts/dspeak01.dts
+++ b/arch/powerpc/boot/dts/dspeak01.dts
@@ -164,7 +164,7 @@
 			interrupts = <0x1 0x8 0x0 0x0 0x3 0x0>;
 			interrupt-parent = <&mpc5200_pic>;
 			gpio-controller;
-			#gpio-cells = <2>;
+			#gpio-cells = <4>;
 		};
 
 		spi@f00 {
@@ -331,8 +331,8 @@
 		ir {
 			compatible = "digispeaker,gpio-ir";
 
-			gpios = <&gpio_wkup 0 0>;
-		}
+			gpios = <&gpio_wkup 0 0 1 0>;
+		};
 
 		/* This is only an example device to show the usage of gpios. It maps all available
 		 * gpios to the "gpio-provider" device.
diff --git a/arch/powerpc/include/asm/gpio.h b/arch/powerpc/include/asm/gpio.h
index ea04632..2283d19 100644
--- a/arch/powerpc/include/asm/gpio.h
+++ b/arch/powerpc/include/asm/gpio.h
@@ -38,17 +38,14 @@ static inline int gpio_cansleep(unsigned int gpio)
 	return __gpio_cansleep(gpio);
 }
 
-/*
- * Not implemented, yet.
- */
-static inline int gpio_to_irq(unsigned int gpio)
+static inline unsigned int gpio_to_irq(unsigned int gpio)
 {
-	return -ENOSYS;
+	return gpio;
 }
 
-static inline int irq_to_gpio(unsigned int irq)
+static inline unsigned int irq_to_gpio(unsigned int irq)
 {
-	return -EINVAL;
+	return irq;
 }
 
 #endif /* CONFIG_GPIOLIB */
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
index 8a455eb..2556c12 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
@@ -22,18 +22,29 @@
 #include <linux/of_gpio.h>
 #include <linux/io.h>
 #include <linux/of_platform.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <asm/gpio.h>
 #include <asm/mpc52xx.h>
 #include <sysdev/fsl_soc.h>
 
-static DEFINE_SPINLOCK(gpio_lock);
+#include "mpc52xx_pic.h"
+
+#define IRQ_GPIO(x)  (MPC52xx_IRQ_HIGHTESTHWIRQ + x)
+#define IRQ_GPIO_WKUP(x)  (IRQ_GPIO(32) + x)
 
 struct mpc52xx_gpiochip {
 	struct of_mm_gpio_chip mmchip;
 	unsigned int shadow_dvo;
 	unsigned int shadow_gpioe;
 	unsigned int shadow_ddr;
+	unsigned int shadow_ode;
+	unsigned int shadow_inten;
+	unsigned int shadow_iinten;
+	unsigned int shadow_itype;
+	spinlock_t lock;
+	struct irq_host	*irqhost;
 };
 
 /*
@@ -84,13 +95,16 @@ __mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 static void
 mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 {
+	struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
+	struct mpc52xx_gpiochip *chip = container_of(mm_gc,
+			struct mpc52xx_gpiochip, mmchip);
 	unsigned long flags;
 
-	spin_lock_irqsave(&gpio_lock, flags);
+	spin_lock_irqsave(&chip->lock, flags);
 
 	__mpc52xx_wkup_gpio_set(gc, gpio, val);
 
-	spin_unlock_irqrestore(&gpio_lock, flags);
+	spin_unlock_irqrestore(&chip->lock, flags);
 
 	pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
 }
@@ -103,7 +117,7 @@ static int mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
 	struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs;
 	unsigned long flags;
 
-	spin_lock_irqsave(&gpio_lock, flags);
+	spin_lock_irqsave(&chip->lock, flags);
 
 	/* set the direction */
 	chip->shadow_ddr &= ~(1 << (7 - gpio));
@@ -113,7 +127,7 @@ static int mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
 	chip->shadow_gpioe |= 1 << (7 - gpio);
 	out_8(&regs->wkup_gpioe, chip->shadow_gpioe);
 
-	spin_unlock_irqrestore(&gpio_lock, flags);
+	spin_unlock_irqrestore(&chip->lock, flags);
 
 	return 0;
 }
@@ -127,7 +141,7 @@ mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
 			struct mpc52xx_gpiochip, mmchip);
 	unsigned long flags;
 
-	spin_lock_irqsave(&gpio_lock, flags);
+	spin_lock_irqsave(&chip->lock, flags);
 
 	__mpc52xx_wkup_gpio_set(gc, gpio, val);
 
@@ -139,33 +153,230 @@ mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
 	chip->shadow_gpioe |= 1 << (7 - gpio);
 	out_8(&regs->wkup_gpioe, chip->shadow_gpioe);
 
-	spin_unlock_irqrestore(&gpio_lock, flags);
+	spin_unlock_irqrestore(&chip->lock, flags);
 
 	pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
 
 	return 0;
 }
 
+static int
+mpc52xx_wkup_gpiochip_xlate(struct of_gpio_chip *of_gc, struct device_node *np, const void *gpio_spec)
+{
+	struct of_mm_gpio_chip *mm_gc = container_of(of_gc, struct of_mm_gpio_chip, of_gc);
+	struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs;
+	struct mpc52xx_gpiochip *chip = container_of(mm_gc,
+			struct mpc52xx_gpiochip, mmchip);
+	const u32 *spec = gpio_spec;
+	u32 gpio = *spec;
+	u32 drain = *(spec + 1);
+	u32 interrupt = *(spec + 2);
+	u32 type = *(spec + 3);
+
+	if (gpio > of_gc->gc.ngpio)
+		return -EINVAL;
+
+	printk("mpc52xx_wkup_gpiochip_xlate %d %d %d %d\n", gpio, drain, interrupt, type);
+
+	out_8(&regs->wkup_maste, 0);
+
+	chip->shadow_ode |= 1 << (7 - gpio);
+	out_8(&regs->wkup_ode, chip->shadow_ode);
+
+	if (interrupt & 2) {
+		chip->shadow_inten |= 1 << (7 - gpio);
+		out_8(&regs->wkup_inten, chip->shadow_inten);
+	}
+	if (interrupt & 1) {
+		chip->shadow_iinten |= 1 << (7 - gpio);
+		out_8(&regs->wkup_iinten, chip->shadow_iinten);
+	}
+
+	chip->shadow_itype |= type << (15 - (gpio * 2));
+	out_be16(&regs->wkup_itype, chip->shadow_itype);
+
+	printk("mpc52xx_wkup_gpiochip_xlate status %x\n", in_8(&regs->wkup_istat));
+	out_8(&regs->wkup_istat, 0xFF);
+
+	printk("mpc52xx_wkup_gpiochip_xlate bits is %x\n", (chip->shadow_iinten | chip->shadow_inten));
+	out_8(&regs->wkup_maste, (chip->shadow_iinten | chip->shadow_inten) != 0);
+	printk("mpc52xx_wkup_gpiochip_xlate enable is %x\n", in_8(&regs->wkup_maste));
+
+	return gpio;
+}
+
+unsigned int gpio_wkup_irq_to_hw(unsigned int virq)
+{
+	return virq - IRQ_GPIO_WKUP(0);
+}
+
+static void gpio_wkup_unmask_irq(unsigned int virq)
+{
+	struct irq_desc *desc = get_irq_desc(virq);
+	struct mpc52xx_gpiochip *chip = get_irq_chip_data(virq);
+	unsigned int irq = gpio_wkup_irq_to_hw(virq);
+	unsigned long flags;
+
+	printk("gpio_wkup_unmask_irq");
+
+	spin_lock_irqsave(&chip->lock, flags);
+	/* ack level-triggered interrupts here */
+	spin_unlock_irqrestore(&chip->lock, flags);
+}
+
+static void gpio_wkup_mask_irq(unsigned int virq)
+{
+	struct irq_desc *desc = get_irq_desc(virq);
+	struct mpc52xx_gpiochip *chip = get_irq_chip_data(virq);
+	unsigned int irq = gpio_wkup_irq_to_hw(virq);
+	unsigned long flags;
+
+	printk("gpio_wkup_mask_irq");
+
+	spin_lock_irqsave(&chip->lock, flags);
+	spin_unlock_irqrestore(&chip->lock, flags);
+}
+
+static void gpio_wkup_ack_irq(unsigned int virq)
+{
+	struct irq_desc *desc = get_irq_desc(virq);
+	struct mpc52xx_gpiochip *chip = get_irq_chip_data(virq);
+	unsigned int irq = gpio_wkup_irq_to_hw(virq);
+	unsigned long flags;
+
+	printk("gpio_wkup_ack_irq");
+
+	spin_lock_irqsave(&chip->lock, flags);
+	spin_unlock_irqrestore(&chip->lock, flags);
+}
+
+static void gpio_wkup_mask_ack_irq(unsigned int virq)
+{
+	struct irq_desc *desc = get_irq_desc(virq);
+	struct mpc52xx_gpiochip *chip = get_irq_chip_data(virq);
+	unsigned int irq = gpio_wkup_irq_to_hw(virq);
+	unsigned long flags;
+
+	printk("gpio_wkup_mask_ack_irq");
+
+	spin_lock_irqsave(&chip->lock, flags);
+	spin_unlock_irqrestore(&chip->lock, flags);
+}
+
+static int gpio_wkup_set_irq_type(unsigned int virq, unsigned int flow_type)
+{
+	struct irq_desc *desc = get_irq_desc(virq);
+	struct mpc52xx_gpiochip *chip = get_irq_chip_data(virq);
+	unsigned int irq = gpio_wkup_irq_to_hw(virq);
+	unsigned long flags;
+	int trigger, polarity;
+
+	printk("gpio_wkup_set_irq_type");
+
+	switch (flow_type & IRQ_TYPE_SENSE_MASK) {
+	case IRQ_TYPE_NONE:
+		gpio_wkup_mask_irq(virq);
+		return 0;
+
+	case IRQ_TYPE_EDGE_RISING:
+		trigger = 1; polarity = 1;
+		break;
+	case IRQ_TYPE_EDGE_FALLING:
+		trigger = 1; polarity = 0;
+		break;
+	case IRQ_TYPE_LEVEL_HIGH:
+		trigger = 0; polarity = 1;
+		break;
+	case IRQ_TYPE_LEVEL_LOW:
+		trigger = 0; polarity = 0;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+
+	spin_lock_irqsave(&chip->lock, flags);
+
+	desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
+	desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
+	if (!trigger)
+		desc->status |= IRQ_LEVEL;
+
+	spin_unlock_irqrestore(&chip->lock, flags);
+
+	return 0;
+}
+
+static struct irq_chip gpio_wkup_irq_chip = {
+	.typename	= " GPIO_WKUP  ",
+	.unmask		= gpio_wkup_unmask_irq,
+	.mask		= gpio_wkup_mask_irq,
+ 	.mask_ack	= gpio_wkup_mask_ack_irq,
+	.ack		= gpio_wkup_ack_irq,
+	.set_type	= gpio_wkup_set_irq_type,
+};
+
+
+static void
+gpio_wkup_demux(unsigned int irq, struct irq_desc *desc)
+{
+	struct mpc52xx_gpiochip *chip = desc->handler_data;
+	struct mpc52xx_gpio_wkup __iomem *regs = chip->mmchip.regs;
+	int gpio = irq - IRQ_GPIO_WKUP(0);
+	static int count;
+
+	desc->chip->mask_ack(irq);
+	out_8(&regs->wkup_istat, 0xFF);
+	printk("gpio_wkup_irq %d %02x\n", count++, in_8(&regs->wkup_ival) & 0x80);
+	desc->chip->unmask(irq);
+}
+
+static int
+gpio_wkup_map(struct irq_host *h, unsigned int virq,
+			     irq_hw_number_t hw)
+{
+	struct mpc52xx_gpiochip *chip = h->host_data;
+
+	printk("gpio_wkup_map virq %d hw %ld\n", virq, hw);
+
+	set_irq_chip_data(virq, chip);
+	set_irq_chip_and_handler(virq, &gpio_wkup_irq_chip, handle_level_irq);
+	set_irq_type(virq, IRQ_TYPE_NONE);
+
+	return 0;
+}
+
+static struct
+irq_host_ops gpio_wkup_ops = {
+	.map = gpio_wkup_map,
+};
+
 static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev,
 					const struct of_device_id *match)
 {
 	struct mpc52xx_gpiochip *chip;
 	struct mpc52xx_gpio_wkup __iomem *regs;
 	struct of_gpio_chip *ofchip;
+	unsigned int irq, i;
 	int ret;
 
+	printk("mpc52xx_wkup_gpiochip_probe\n");
+
 	chip = kzalloc(sizeof(*chip), GFP_KERNEL);
 	if (!chip)
 		return -ENOMEM;
 
 	ofchip = &chip->mmchip.of_gc;
 
-	ofchip->gpio_cells          = 2;
+	ofchip->gpio_cells          = 4;
 	ofchip->gc.ngpio            = 8;
 	ofchip->gc.direction_input  = mpc52xx_wkup_gpio_dir_in;
 	ofchip->gc.direction_output = mpc52xx_wkup_gpio_dir_out;
 	ofchip->gc.get              = mpc52xx_wkup_gpio_get;
 	ofchip->gc.set              = mpc52xx_wkup_gpio_set;
+	ofchip->gc.base             = IRQ_GPIO_WKUP(0);
+	ofchip->xlate               = mpc52xx_wkup_gpiochip_xlate;
+
 
 	ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip);
 	if (ret)
@@ -175,6 +386,30 @@ static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev,
 	chip->shadow_gpioe = in_8(&regs->wkup_gpioe);
 	chip->shadow_ddr = in_8(&regs->wkup_ddr);
 	chip->shadow_dvo = in_8(&regs->wkup_dvo);
+	chip->shadow_ode = in_8(&regs->wkup_ode);
+	chip->shadow_inten = in_8(&regs->wkup_inten);
+	chip->shadow_iinten = in_8(&regs->wkup_iinten);
+	chip->shadow_itype = in_be16(&regs->wkup_itype);
+	spin_lock_init(&chip->lock);
+
+	irq = irq_of_parse_and_map(ofdev->node, 0);
+	if (irq == NO_IRQ)
+		return 0;
+	printk("mpc52xx_wkup_gpiochip_probe cascade irq %d\n", irq);
+	printk("mpc52xx_wkup_gpiochip_probe node %p\n", ofdev->node);
+
+	chip->irqhost = irq_alloc_host(ofdev->node, IRQ_HOST_MAP_LINEAR, 8, &gpio_wkup_ops, -1);
+	if (!chip->irqhost) {
+		printk(KERN_ERR "GPIO WKUP: failed to allocate irq host!\n");
+		return 0;
+	}
+	set_irq_chained_handler(irq, gpio_wkup_demux);
+	set_irq_data(irq, chip);
+
+	for (i = 0; i < 8; i++) {
+		irq = irq_create_mapping(chip->irqhost, IRQ_GPIO_WKUP(i));
+		printk("mpc52xx_wkup_gpiochip_probe %d %d\n", irq, IRQ_GPIO_WKUP(i));
+	}
 
 	return 0;
 }
@@ -244,13 +479,16 @@ __mpc52xx_simple_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 static void
 mpc52xx_simple_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 {
+	struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
+	struct mpc52xx_gpiochip *chip = container_of(mm_gc,
+			struct mpc52xx_gpiochip, mmchip);
 	unsigned long flags;
 
-	spin_lock_irqsave(&gpio_lock, flags);
+	spin_lock_irqsave(&chip->lock, flags);
 
 	__mpc52xx_simple_gpio_set(gc, gpio, val);
 
-	spin_unlock_irqrestore(&gpio_lock, flags);
+	spin_unlock_irqrestore(&chip->lock, flags);
 
 	pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
 }
@@ -263,7 +501,7 @@ static int mpc52xx_simple_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
 	struct mpc52xx_gpio __iomem *regs = mm_gc->regs;
 	unsigned long flags;
 
-	spin_lock_irqsave(&gpio_lock, flags);
+	spin_lock_irqsave(&chip->lock, flags);
 
 	/* set the direction */
 	chip->shadow_ddr &= ~(1 << (31 - gpio));
@@ -273,7 +511,7 @@ static int mpc52xx_simple_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
 	chip->shadow_gpioe |= 1 << (31 - gpio);
 	out_be32(&regs->simple_gpioe, chip->shadow_gpioe);
 
-	spin_unlock_irqrestore(&gpio_lock, flags);
+	spin_unlock_irqrestore(&chip->lock, flags);
 
 	return 0;
 }
@@ -287,7 +525,7 @@ mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
 	struct mpc52xx_gpio __iomem *regs = mm_gc->regs;
 	unsigned long flags;
 
-	spin_lock_irqsave(&gpio_lock, flags);
+	spin_lock_irqsave(&chip->lock, flags);
 
 	/* First set initial value */
 	__mpc52xx_simple_gpio_set(gc, gpio, val);
@@ -300,7 +538,7 @@ mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
 	chip->shadow_gpioe |= 1 << (31 - gpio);
 	out_be32(&regs->simple_gpioe, chip->shadow_gpioe);
 
-	spin_unlock_irqrestore(&gpio_lock, flags);
+	spin_unlock_irqrestore(&chip->lock, flags);
 
 	pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
 
@@ -323,6 +561,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev,
 
 	ofchip->gpio_cells          = 2;
 	ofchip->gc.ngpio            = 32;
+	ofchip->gc.base             = IRQ_GPIO(0);
 	ofchip->gc.direction_input  = mpc52xx_simple_gpio_dir_in;
 	ofchip->gc.direction_output = mpc52xx_simple_gpio_dir_out;
 	ofchip->gc.get              = mpc52xx_simple_gpio_get;
@@ -333,6 +572,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev,
 		return ret;
 
 	regs = chip->mmchip.regs;
+	spin_lock_init(&chip->lock);
 	chip->shadow_gpioe = in_be32(&regs->simple_gpioe);
 	chip->shadow_ddr = in_be32(&regs->simple_ddr);
 	chip->shadow_dvo = in_be32(&regs->simple_dvo);
diff --git a/drivers/input/lirc/lirc_dspeak.c b/drivers/input/lirc/lirc_dspeak.c
index d093b37..39ef6f8 100644
--- a/drivers/input/lirc/lirc_dspeak.c
+++ b/drivers/input/lirc/lirc_dspeak.c
@@ -5,6 +5,8 @@
  * Copyright (C) 2008 Secret Lab Technologies Ltd.
  */
 
+#define DEBUG
+
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
@@ -13,11 +15,26 @@
 #include <linux/of_platform.h>
 #include <linux/of_gpio.h>
 
+
 struct dspeak_ir {
 	int gpio;
 	spinlock_t lock;
 };
 
+/*
+ * Interrupt handlers
+ */
+static irqreturn_t dpeak_ir_irq(int irq, void *_ir)
+{
+	struct dspeak_ir *dspeak_ir = _ir;
+
+	printk("dpeak_ir_irq\n");
+
+	return IRQ_HANDLED;
+}
+
+
+
 /* ---------------------------------------------------------------------
  * OF platform bus binding code:
  * - Probe/remove operations
@@ -26,10 +43,11 @@ struct dspeak_ir {
 static int __devinit dspeak_ir_of_probe(struct of_device *op,
 				      const struct of_device_id *match)
 {
-	struct device_node *np = op->node, *child;
+	struct device_node *np = op->node;
 	struct dspeak_ir *dspeak_ir;
+	int rc;
 
-	dev_dbg(&op->dev, "probing dspeaker ir device\n");
+	dev_dbg(&op->dev, "dspeak_ir_of_probe\n");
 
 	/* Allocate and initialize the driver private data */
 	dspeak_ir = kzalloc(sizeof *dspeak_ir, GFP_KERNEL);
@@ -37,9 +55,13 @@ static int __devinit dspeak_ir_of_probe(struct of_device *op,
 		return -ENOMEM;
 	}
 
-	for_each_child_of_node(np, child) {
-		dspeak_ir->gpio = of_get_gpio(child, 0);
-	}
+	dspeak_ir->gpio = of_get_gpio(np, 0);
+	gpio_direction_input(dspeak_ir->gpio);
+	printk("dspeak_ir_of_probe irq = %d\n", gpio_to_irq(dspeak_ir->gpio));
+
+	rc = request_irq(gpio_to_irq(dspeak_ir->gpio), &dpeak_ir_irq, IRQF_SHARED,
+			 "digispeaker-ir", dspeak_ir);
+	printk("dspeak_ir_of_probe request = %d\n", rc);
 
 	spin_lock_init(&dspeak_ir->lock);
 
@@ -78,10 +100,10 @@ static struct of_platform_driver dspeak_ir_driver = {
 
 /* ---------------------------------------------------------------------
  * Module setup and teardown; simply register the of_platform driver
- * for the PSC in I2S mode.
  */
 static int __init dspeak_ir_init(void)
 {
+	printk("dspeak_ir_init\n");
 	return of_register_platform_driver(&dspeak_ir_driver);
 }
 module_init(dspeak_ir_init);

  reply	other threads:[~2008-09-15  3:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-13 19:06 demuxing irqs Jon Smirl
2008-09-13 22:41 ` Roland Dreier
2008-09-13 22:54   ` Jon Smirl
2008-09-13 23:04     ` Roland Dreier
2008-09-13 23:23       ` Jon Smirl
2008-09-14 14:06         ` Jon Smirl
2008-09-14 23:25           ` Jon Smirl
2008-09-15  3:06             ` Jon Smirl [this message]
2008-09-16 12:17               ` Anton Vorontsov
2008-09-16 12:37                 ` Jon Smirl
2008-09-16 13:12                   ` Anton Vorontsov
2008-09-16 13:36                     ` Jon Smirl
2008-09-16 14:14                       ` Anton Vorontsov
2008-09-16 14:24                         ` Jon Smirl
2008-09-16 17:49                           ` Scott Wood
2008-09-16 18:32                             ` Jon Smirl
2008-09-16 21:42                               ` Anton Vorontsov
2008-09-16 22:08                                 ` Jon Smirl
2008-09-16 23:24                                   ` Scott Wood
2008-09-16 23:47                                     ` Jon Smirl
2008-09-17 12:56                                   ` Anton Vorontsov
2008-09-17 14:09                                     ` Jon Smirl
2008-09-17 17:54                                       ` Stephen Neuendorffer
2008-09-16 14:29                         ` Jon Smirl

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=9e4733910809142006x350e96abs6af304d8807ccd67@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=avorontsov@ru.mvista.com \
    --cc=grant.likely@secretlab.ca \
    --cc=rdreier@cisco.com \
    /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).