Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755735Ab1DVBMd (ORCPT ); Thu, 21 Apr 2011 21:12:33 -0400 Received: from sm-d311v.smileserver.ne.jp ([203.211.202.206]:27962 "EHLO sm-d311v.smileserver.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754041Ab1DVBMc (ORCPT ); Thu, 21 Apr 2011 21:12:32 -0400 From: "Tomoya MORINAGA" To: "'Grant Likely'" , "'Lars-Peter Clausen'" Cc: , References: <4DAFE62A.105@metafoo.de> <20110421134524.GA32725@ponder.secretlab.ca> <4DB03A4B.9040807@metafoo.de> <20110421142422.GC32725@ponder.secretlab.ca> Subject: RE: Question: GPIO driver how to get irq_base Date: Fri, 22 Apr 2011 10:12:29 +0900 Message-ID: <4C95BE12C2D7458E9D2B54E7C30F712F@hacdom.okisemi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 In-Reply-To: Thread-Index: AcwAL++Wzb/0BazWToqDvM5Zkn5jZQAUXwsgAAHzuLA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3762 Lines: 101 Hi Grant, Lars-Peter Clausen, - Executing the following command, cd /sys/class/gpio/gpio244 echo "falling" > edge - I can see the following error message. IRQ handler type mismatch for IRQ 18 current handler: spi_topcliff_pch Pid: 3269, comm: bash Not tainted 2.6.38.3.upstream_check+ #23 Call Trace: [] ? __setup_irq+0x257/0x2a9 [] ? gpio_sysfs_irq+0x0/0x11 [] ? request_threaded_irq+0xa8/0xce [] ? request_any_context_irq+0x59/0x64 [] ? gpio_sysfs_irq+0x0/0x11 [] ? gpio_setup_irq.clone.4+0x1fa/0x292 [] ? gpio_edge_store+0xa3/0xd2 [] ? gpio_edge_store+0x0/0xd2 [] ? dev_attr_store+0x1b/0x23 [] ? sysfs_write_file+0xae/0xe7 [] ? sysfs_write_file+0x0/0xe7 [] ? vfs_write+0x82/0xd9 [] ? sys_write+0x3b/0x5d [] ? sysenter_do_call+0x12/0x28 > Using the above, I can see "irq_base = 18d". - According to the following "/proc/interrupts" information, I suspect pch_gpio can't use IRQ18. [morinaga@localhost ~]$ cat /proc/interrupts CPU0 CPU1 0: 30881 0 IO-APIC-edge timer 1: 2 0 IO-APIC-edge i8042 4: 2 0 IO-APIC-edge 8: 128 0 IO-APIC-edge rtc0 9: 0 0 IO-APIC-fasteoi acpi 12: 4 0 IO-APIC-edge i8042 16: 385 0 IO-APIC-fasteoi intel-eg20t-pch, ehci_hcd:usb2, ohci_hcd:usb6, ohci_hcd:usb7, ohci_hcd:usb8, hda_intel 17: 0 0 IO-APIC-fasteoi eth1 18: 0 0 IO-APIC-fasteoi spi_topcliff_pch, i2c_eg20t, pch-dma, mmc0, mmc1 19: 3599 0 IO-APIC-fasteoi ehci_hcd:usb1, ohci_hcd:usb3, ohci_hcd:usb4, ohci_hcd:usb5, pch-dma, mga@pci:0000:07:00.0 40: 10298 0 PCI-MSI-edge ahci 42: 98 0 PCI-MSI-edge eth0 NMI: 0 0 Non-maskable interrupts LOC: 76268 72502 Local timer interrupts SPU: 0 0 Spurious interrupts PMI: 0 0 Performance monitoring interrupts IWI: 0 0 IRQ work interrupts RES: 1383 1842 Rescheduling interrupts CAL: 67 108 Function call interrupts TLB: 224 292 TLB shootdowns TRM: 0 0 Thermal event interrupts THR: 0 0 Threshold APIC interrupts MCE: 0 0 Machine check exceptions MCP: 1 1 Machine check polls ERR: 0 MIS: 0 Let me know your opinion. Thanks, ----------------------------------------- Tomoya MORINAGA OKI SEMICONDUCTOR CO., LTD. > -----Original Message----- > From: Tomoya MORINAGA [mailto:tomoya-linux@dsn.okisemi.com] > Sent: Friday, April 22, 2011 9:33 AM > To: 'Grant Likely'; 'Lars-Peter Clausen' > Cc: 'linux-kernel@vger.kernel.org'; 'toshiharu-linux@dsn.okisemi.com' > Subject: RE: Question: GPIO driver how to get irq_base > > Hi Grant, Lars-Peter Clausen > > Thank you for your information. > > It seems nothing driver uses irq_alloc_descs. > Thus, let me clarify my using. > > int irq_base = irq_alloc_descs(-1, 0, 12, GFP_KERNEL) > (Intel-ET20T-PCH has GPIO~GPIO11) > > Using the above, I can see "irq_base = 18d". > Is the above TRUE ? > > Thanks, > ----------------------------------------- > Tomoya MORINAGA > OKI SEMICONDUCTOR CO., LTD. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/