Re: [RFC/PATCH 6/6] cbus: retu: implement irq_domain support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Nov 23, 2011 at 04:00:48PM +0200, Felipe Balbi wrote:
> Then, when moving to devicetree, we can list
> IRQs as 1, 2, 3. It's the only way to have a
> sane devicetree actually.
> 
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> ---
>  drivers/cbus/retu.c |   42 +++++++++++++++++++++++++++---------------
>  1 files changed, 27 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/cbus/retu.c b/drivers/cbus/retu.c
> index 25fa405..f25e0a3 100644
> --- a/drivers/cbus/retu.c
> +++ b/drivers/cbus/retu.c
> @@ -25,7 +25,7 @@
>  
>  #include <linux/module.h>
>  #include <linux/init.h>
> -
> +#include <linux/irqdomain.h>
>  #include <linux/slab.h>
>  #include <linux/kernel.h>
>  #include <linux/errno.h>
> @@ -46,6 +46,7 @@ struct retu {
>  	struct mutex		mutex;
>  	struct device		*dev;
>  
> +	struct irq_domain	irq_domain;
>  	struct irq_chip		irq_chip;
>  
>  	int			irq_base;
> @@ -199,11 +200,9 @@ static irqreturn_t retu_irq_handler(int irq, void *_retu)
>  
>  	while (idr) {
>  		unsigned long	pending = __ffs(idr);
> -		unsigned int	irq;
>  
>  		idr &= ~BIT(pending);
> -		irq = pending + retu->irq_base;
> -		handle_nested_irq(irq);
> +		handle_nested_irq(pending);

This is particular, I'm not sure if it's correct. Not sure if we should
use hw IRQ number of linux IRQ number. A boot test should be enough to
verify though.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux