how to get interrupt pin from the device tree?

Moderator: nferre

lonerwolf
Posts: 1
Joined: Thu Feb 05, 2015 9:19 am

how to get interrupt pin from the device tree?

Thu Feb 05, 2015 9:25 am

Code: Select all

spi1: spi@f8008000 {
				cs-gpios = <&pioC 25 0>, <0>, <0>, <&pioD 16 0>;
				status = "okay";
			
				device@0{
					compatible="spidev";
					reg=<0>;
					spi-max-frequency=<5000000>;
                                        interrupts = <6 IRQ_TYPE_LEVEL_HIGH 0>;//here
				};
			};
i want usr the PD31 pin to a ext interrupt, how to write here?
in spi.c,spi->irq = irq_of_parse_and_map(nc, 0); this func get the interrupt,how can i do?
blue_z
Location: USA
Posts: 1943
Joined: Thu Apr 19, 2007 10:15 pm

Re: how to get interrupt pin from the device tree?

Fri Feb 06, 2015 10:17 pm

lonerwolf wrote:

Code: Select all

					compatible="spidev";
What kernel version are you using, and from what repository?
This isn't the proper string for most versions.
lonerwolf wrote:i want usr the PD31 pin to a ext interrupt, how to write here?
What are you really trying to do?
The spidev driver, unless modified, will not use such DT configuration info.
lonerwolf wrote:in spi.c,spi->irq = irq_of_parse_and_map(nc, 0); this func get the interrupt,how can i do?
You probably shouldn't be looking at spi.c.
Read about the spi drivers organization in the kernel's Documentation directory.

Regards

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 1 guest