* gpio interrupt is not invoked on Panda board
@ 2011-07-01 18:10 hong zhang
2011-07-01 21:17 ` Jon Hunter
0 siblings, 1 reply; 5+ messages in thread
From: hong zhang @ 2011-07-01 18:10 UTC (permalink / raw)
To: linux-omap
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).
Would you please give me hint what I miss here to get interrupt happened?
I want to use gpio_191 for IR receiver.
Thanks.
---henry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gpio interrupt is not invoked on Panda board
2011-07-01 18:10 gpio interrupt is not invoked on Panda board hong zhang
@ 2011-07-01 21:17 ` Jon Hunter
2011-07-01 23:15 ` hong zhang
0 siblings, 1 reply; 5+ messages in thread
From: Jon Hunter @ 2011-07-01 21:17 UTC (permalink / raw)
To: hong zhang; +Cc: linux-omap
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gpio interrupt is not invoked on Panda board
2011-07-01 21:17 ` Jon Hunter
@ 2011-07-01 23:15 ` hong zhang
2011-07-04 5:47 ` Varadarajan, Charulatha
0 siblings, 1 reply; 5+ messages in thread
From: hong zhang @ 2011-07-01 23:15 UTC (permalink / raw)
To: Jon Hunter; +Cc: linux-omap
--- On Fri, 7/1/11, Jon Hunter <jon-hunter@ti.com> wrote:
> From: Jon Hunter <jon-hunter@ti.com>
> Subject: Re: gpio interrupt is not invoked on Panda board
> To: "hong zhang" <henryzhang62@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.
GPIO_OE[31]=1 means input, but I do not get interrupt too.
Do I miss anything here?
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gpio interrupt is not invoked on Panda board
2011-07-01 23:15 ` hong zhang
@ 2011-07-04 5:47 ` Varadarajan, Charulatha
2011-07-04 17:20 ` hong zhang
0 siblings, 1 reply; 5+ messages in thread
From: Varadarajan, Charulatha @ 2011-07-04 5:47 UTC (permalink / raw)
To: hong zhang; +Cc: Jon Hunter, linux-omap
Hong,
On Sat, Jul 2, 2011 at 04:45, hong zhang <henryzhang62@yahoo.com> wrote:
> --- On Fri, 7/1/11, Jon Hunter <jon-hunter@ti.com> wrote:
>
>> From: Jon Hunter <jon-hunter@ti.com>
>> Subject: Re: gpio interrupt is not invoked on Panda board
>> To: "hong zhang" <henryzhang62@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 majordomo@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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gpio interrupt is not invoked on Panda board
2011-07-04 5:47 ` Varadarajan, Charulatha
@ 2011-07-04 17:20 ` hong zhang
0 siblings, 0 replies; 5+ messages in thread
From: hong zhang @ 2011-07-04 17:20 UTC (permalink / raw)
To: CharulathaVaradarajan; +Cc: Jon Hunter, linux-omap
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 <charu@ti.com> wrote:
> From: Varadarajan, Charulatha <charu@ti.com>
> Subject: Re: gpio interrupt is not invoked on Panda board
> To: "hong zhang" <henryzhang62@yahoo.com>
> Cc: "Jon Hunter" <jon-hunter@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 <henryzhang62@yahoo.com>
> wrote:
> > --- On Fri, 7/1/11, Jon Hunter <jon-hunter@ti.com>
> wrote:
> >
> >> From: Jon Hunter <jon-hunter@ti.com>
> >> Subject: Re: gpio interrupt is not invoked on
> Panda board
> >> To: "hong zhang" <henryzhang62@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 majordomo@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 majordomo@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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-04 17:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01 18:10 gpio interrupt is not invoked on Panda board hong zhang
2011-07-01 21:17 ` Jon Hunter
2011-07-01 23:15 ` hong zhang
2011-07-04 5:47 ` Varadarajan, Charulatha
2011-07-04 17:20 ` hong zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox