Only once NR_IRQS is increased.  On an A10 it is set at 128, the request 
for 16 irqs fails in the pca953x driver.  If NR_IRQS is increased the irqs 
that get allocated are 127-142.  When you export the gpios that are created 
(240-255) they then get the edge file included in the sysfs.

On Tuesday, 3 June 2014 23:51:18 UTC+10, Benjamin Henrion wrote:
>
> On Tue, Jun 3, 2014 at 3:46 PM, theRat <[email protected] 
> <javascript:>> wrote: 
> > Hi all, 
> > 
> > I am trying to use a pca9535 i2c gpio expander with interrupts on an A10 
> > based board and struggled.  I have figured out that the problem is the 
> lack 
> > of free virtual/software interrupts as configured in 
> > arch/arm/plat-sunxi/include/plat/irqs.h.  In that file NR_IRQS is coded 
> as 
> > (96+32) which leaves nothing for virtual/software interrupts.  All of 
> the 
> > GPIO expanders that support interrupts consume one interrupt per gpio 
> pin on 
> > the expander (so 16 in my case).  NR_IRQS needs to be set 16 higher for 
> the 
> > pca953x driver to successfully grab that many interrupts. 
>
> Is there any chance to see those GPIOs exported through sysfs like 
> /sys/class/gpio? 
>
> -- 
> Benjamin Henrion <bhenrion at ffii.org> 
> FFII Brussels - +32-484-566109 - +32-2-4148403 
> "In July 2005, after several failed attempts to legalise software 
> patents in Europe, the patent establishment changed its strategy. 
> Instead of explicitly seeking to sanction the patentability of 
> software, they are now seeking to create a central European patent 
> court, which would establish and enforce patentability rules in their 
> favor, without any possibility of correction by competing courts or 
> democratically elected legislators." 
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to