Can't we configure the gpio_keys driver to call my custom ISR for user 
button? If not, then as discussed in this thread we need to disable GPIO 
buttons from menu config and write a module where we can request for user 
button and register it with custom handler?

Thanks
Sanket

On Thursday, 25 November 2010 00:53:42 UTC-7, Daniele Capuano wrote:
>
> I found the kernel configuration at
> "Device Drivers -> Input Device Support-> Keyboards - > GPIO Buttons"
> that seems to perfectly match the case. Now, since this is a built-in
> configuration and cannot be disabled without recompiling, i'm going to
> recompile and retry...
> Thanks a lot!
>
> Daniele
>
> 2010/11/23 Maxim Podbereznyy <[email protected] <javascript:>>:
> > You need to learn how to find necessary code in the kernel source, 
> because
> > the kernel itself is the perfect book about linux device drivers :)
> >
> > Try to use "grep" utility to search for text. For instance something 
> like:
> >
> > grep GPIO * -r | grep omap
> >
> > 2010/11/23 Daniele Capuano <[email protected] <javascript:>>
> >>
> >> Do you think that I have to disable ALL the GPIO support in kernel
> >> configuration? It seems to be quite a dramatic solution...but i can't
> >> find where is any gpio-specific driver in kernel...
> >> please help...!
> >>
> >> Daniele
> >>
> >> p.s. @Jeff Yes, that is my reference book for deleloping my
> >> driver...but gpio is not taken into account...
> >>
> >> 2010/11/22 Maxim Podbereznyy <[email protected] <javascript:>>:
> >> > I'm pretty sure that USER-button is already acquired by kernel. Just
> >> > find
> >> > the place in kernel and disable it.
> >> >
> >> > 2010/11/22 Daniele Capuano <[email protected] <javascript:>>
> >> >>
> >> >> Googling i'm finding many drivers that use omap-specific functions,
> >> >> such as omap_request_gpio() or something like that. I found
> >> >> declarations of such functions in the arch/arm/plat-omap/include/*
> >> >> directory.
> >> >> But i'm new to kernel development, and i can't figure out how to
> >> >> include files from that dir...
> >> >> Maybe calling omap functions is needed in order to request gpio 
> lines,
> >> >> is it correct?
> >> >> Sorry for the newbie questions...
> >> >>
> >> >> Daniele
> >> >>
> >> >> 2010/11/21 William C Bonner <[email protected] <javascript:>>:
> >> >> > I'm purely guessing here, but the fact that the normal kernel
> >> >> > configuration
> >> >> > sets up that button with an internal interrupt handler and then
> >> >> > enables
> >> >> > a
> >> >> > keyboard like event would seem to mean that you need to modify your
> >> >> > kernel
> >> >> > build to disable the default operation of that button.
> >> >> > Wim.
> >> >> >
> >> >> > On Sat, Nov 20, 2010 at 11:26 AM, Daniele Capuano
> >> >> > <[email protected] <javascript:>>
> >> >> > wrote:
> >> >> >>
> >> >> >> Hello to all,
> >> >> >> I'm writing a device driver for beagle, and I want to control the
> >> >> >> on-board user button (GPIO_7) in order to register an interrupt 
> from
> >> >> >> this button. In other words, I simply want the button to be
> >> >> >> associated
> >> >> >> with an interrupt handler I wrote.
> >> >> >> I'm trying to use the kernel GPIO API, but the gpio_request() call
> >> >> >> returns with -EBUSY. Then, while gpio_to_irq() correctly returns 
> the
> >> >> >> irq number (as I can see it in /proc/interrupts), request_irq()
> >> >> >> returns -EBUSY again.
> >> >> >> The call sequence is
> >> >> >>
> >> >> >> ...
> >> >> >> gpio_request(GPIO_7, "gpio");
> >> >> >> irq = gpio_to_irq(GPIO_7);
> >> >> >> request_irq(irq, my_handler, IRQF_SHARED, name, NULL);
> >> >> >> ...
> >> >> >>
> >> >> >> How can I free such irq in order to manage it?
> >> >> >>
> >> >> >> Thanks
> >> >> >>
> >> >> >> Daniele
> >> >> >>
> >> >> >> --
> >> >> >> You received this message because you are subscribed to the Google
> >> >> >> Groups
> >> >> >> "Beagle Board" group.
> >> >> >> To post to this group, send email to 
> >> >> >> [email protected]<javascript:>
> .
> >> >> >> To unsubscribe from this group, send email to
> >> >> >> [email protected] <javascript:>.
> >> >> >> For more options, visit this group at
> >> >> >> http://groups.google.com/group/beagleboard?hl=en.
> >> >> >>
> >> >> >
> >> >> > --
> >> >> > You received this message because you are subscribed to the Google
> >> >> > Groups
> >> >> > "Beagle Board" group.
> >> >> > To post to this group, send email to 
> >> >> > [email protected]<javascript:>
> .
> >> >> > To unsubscribe from this group, send email to
> >> >> > [email protected] <javascript:>.
> >> >> > For more options, visit this group at
> >> >> > http://groups.google.com/group/beagleboard?hl=en.
> >> >> >
> >> >>
> >> >> --
> >> >> You received this message because you are subscribed to the Google
> >> >> Groups
> >> >> "Beagle Board" group.
> >> >> To post to this group, send email to 
> >> >> [email protected]<javascript:>
> .
> >> >> To unsubscribe from this group, send email to
> >> >> [email protected] <javascript:>.
> >> >> For more options, visit this group at
> >> >> http://groups.google.com/group/beagleboard?hl=en.
> >> >>
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "Beagle Board" group.
> >> > To post to this group, send email to 
> >> > [email protected]<javascript:>
> .
> >> > To unsubscribe from this group, send email to
> >> > [email protected] <javascript:>.
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/beagleboard?hl=en.
> >> >
> >>
> >> --
> >> You received this message because you are subscribed to the Google 
> Groups
> >> "Beagle Board" group.
> >> To post to this group, send email to [email protected]<javascript:>
> .
> >> To unsubscribe from this group, send email to
> >> [email protected] <javascript:>.
> >> For more options, visit this group at
> >> http://groups.google.com/group/beagleboard?hl=en.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Beagle Board" group.
> > To post to this group, send email to [email protected]<javascript:>
> .
> > To unsubscribe from this group, send email to
> > [email protected] <javascript:>.
> > For more options, visit this group at
> > http://groups.google.com/group/beagleboard?hl=en.
> >
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" 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/groups/opt_out.

Reply via email to