Charulatha, Jon, I want to write a client GPIO driver to handle IR device connecting to GPIO191 or GPIO154.
Based on http://omappedia.org/wiki/GPIO, arch/arm/plat-omap/gpio.c is a OMAP core gpio driver, customer can write a client gpio driver on top of it to select one GPIO pin such as GPIO191 or GPIO154 as input from IR device. Is there any existing sample codes available for reference? May I say arch/arm/match-omap2/gpio.c is a kind of client driver for plat-omap/gpio.c? ---henry --- On Mon, 7/4/11, Varadarajan, Charulatha <ch...@ti.com> wrote: > From: Varadarajan, Charulatha <ch...@ti.com> > Subject: Re: gpio interrupt is not invoked on Panda board > To: "hong zhang" <henryzhan...@yahoo.com> > Cc: "Jon Hunter" <jon-hun...@ti.com>, linux-omap@vger.kernel.org > Date: Monday, July 4, 2011, 12:47 AM > Hong, > > On Sat, Jul 2, 2011 at 04:45, hong zhang <henryzhan...@yahoo.com> > wrote: > > --- On Fri, 7/1/11, Jon Hunter <jon-hun...@ti.com> > wrote: > > > >> From: Jon Hunter <jon-hun...@ti.com> > >> Subject: Re: gpio interrupt is not invoked on > Panda board > >> To: "hong zhang" <henryzhan...@yahoo.com> > >> Cc: linux-omap@vger.kernel.org > >> Date: Friday, July 1, 2011, 4:17 PM > >> Hi Henry > >> > >> On 7/1/2011 1:10 PM, hong zhang wrote: > >> > List, > >> > > >> > I try to get gpio_191 ping interrupted on > panda but > >> never succeeded. What I do is > >> > > >> > 1. set 0x410b on dpm_emu19 register to > enable > >> interrupt and wakeup > >> > on gpio_191 > >> > 2. set bit 31 to 1 on GPIO_IRQSTATUS_SET_0 > register at > >> 0x4805d034 > >> > 3. set bit 31 to 1 on GPIO_IRQWAKEN_0 > register at > >> 0x4805d044 > >> > 4. set bit 31 to 0 on GPIO_OE register at > 0x4805d134 > >> (output) > >> > 5. set bit 31 to 1 on GPIO_SETDATAOUT > register at > >> 0x4805d194 > >> > > >> > Then I expect I should see interrupt on > >> GPIO_IRQSTATUS_0 register at 0x4805d02c. But > nothing happens > >> for both output and input (put pin on ground or > 1,8v). > >> > >> You will not get an interrupt if you are > configuring the > >> gpio as an > >> output (GPIO_OE[31] = 0). > >> > > Jon > > > > GPIO_OE[31]=0 means output. I should get interrupt for > output. > > Wrong. As Jon mentioned, no interrupt if the gpio is an > output. > > > GPIO_OE[31]=1 means input, but I do not get interrupt > too. > > You would be able see the interrupt only if the GPIO191's > state > is set/reset by the external peripheral /device which is > connected > to GPIO191. > > Refer TRM for more details. > > -V Charulatha > > > > > Do I miss anything here? > > -- > > To unsubscribe from this list: send the line > "unsubscribe linux-omap" in > > the body of a message to majord...@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- > To unsubscribe from this list: send the line "unsubscribe > linux-omap" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html