On Wed, May 06, 2015 at 11:48:59PM -0700, Andrea Venturi wrote:
> hello,
> 
> i have an issue about external interrupts, following this clear example: 
> http://linux-sunxi.org/External_interrupts
> 
> it works for EINT up to EINT21 in PH port, but if i try in an Olimex A20 
> SOM (on a A20 SOM EVB who have a schematic available showing no hints 
> AFAICS) an EINT in PI port (EINT22-EINT31) nothing is raised when i put the 
> pin to GND.
> 
> i slightly more thorough description is in Olimex forum 
> https://www.olimex.com/forum/index.php?topic=4400.0 but i suppose it's more 
> general issue, that's why i post here too (sorry if it's seen as a bad 
> attitude..)
> 
> BTW the A20 PIO page on linux-sunxi.org doesn't talk about these higher 
> EINT22-EINT31 so i smell something fishy here: 
> http://linux-sunxi.org/A20/PIO
> 
> any advice for further investigation?

There's more to it.

I don't think that ever supposed to work that way, most notably
because it just wouldn't work with SoCs that multiple interrupt banks
(like the A31, A23, etc.)

I think it worked by accident, because it's somewhat compatible with
the default interrupt property parsing code, but that probably need
some additional development.

What's mainly missing would be an irq_xlate function in the pinctrl
driver that would parse the interrupt property with the same format
than we have for gpios (phandle excluded, of course), which would mean
something like that in your case.

interrupt-parent = <&pio>;
interrups = <8 10 flags>; 

That function would then need to lookup in our pin array that it's
indeed an interrupt, and would return the number of the interrupt
within the interupt controller (which would be 22 in your case).

I can try to cook something during the weekend, and send you a patch
for you to test.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
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.

Attachment: signature.asc
Description: Digital signature

Reply via email to