2011-05-10 09:36:35     gpio-keys: missing /dev/input

Document created by Aaronwu Employee on Aug 26, 2013
Version 1Show Document
  • View in full screen mode

2011-05-10 09:36:35     gpio-keys: missing /dev/input

Sebastian Heinrich (GERMANY)

Message: 100540   

 

Hello

 

I have a problem using the gpio-keys driver on the cm-bf537e board.

 

I followed the steps on:

 

https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:gpio-keys.

 

After that there is a device node in /dev called event0. test_event event0 is operates as it should.

 

But no device in /dev/input/.

 

After I searched the problem in this forum I have taken care that 

 

CONFIG_INPUT_EVDEV=y

 

and hotplugging is enabled (mdev is working. Does somebody could tell me the steps to enable hotplugging that I can be sure i've done it right? ).

 

Do I forgot something ?

 

Theoretically I could use the dev/event0 device, right ? But why is it not in dev/input/ ??

 

 

 

Does somebody have an idea ?

 

 

 

Thanks for help.

 

 

 

Sebastian

 

TranslateQuoteReplyEditDelete

 

 

2011-05-10 09:39:03     Re: gpio-keys: missing /dev/input

Sebastian Heinrich (GERMANY)

Message: 100541   

 

Ok I forgot something. I'm sorry for that.

 

 

 

Next question is:

 

Why does event_test always give 1, 0, 0, 0, 1, 0, 0, 0, as events, even though at the pin is a constant high-voltage ?

TranslateQuoteReplyEditDelete

 

 

2011-05-10 11:24:03     Re: gpio-keys: missing /dev/input

Mike Frysinger (UNITED STATES)

Message: 100546   

 

gpio keys merely passes up interrupts that come in from the hardware as events to userspace

QuoteReplyEditDelete

 

 

2011-05-11 07:41:11     Re: gpio-keys: missing /dev/input

Sebastian Heinrich (GERMANY)

Message: 100574   

 

Yes, but in my case i start event_test. At startup the Pin has 0V. Then I set the Pin Voltage to constant 3,3V But event_test gives out : 1, 0, 0, 0, 1, and so on...

 

Is that correct ?

 

It gives out Btn2 = 1, reset = 0, btn2 = 0, reset = 0, btn2 = 1 ...

 

But the Pin is at constant 3,3V.

 

Where does the reset comes from ? I didn't assign any other of the multiplexed functions to that pin.

 

In this case i am only able to get an interrupt if the voltage is switching from oV to high-voltage, right ?

 

If I want to get an interrupt if the voltage is going to low voltage again, thats not possible with this setup ?

 

I have assigned the button in the board config file like:

 

BTN_2, GPIO_PF9, 1, "gpio-keys: BTN2",EV_KEY,0,0

 

What does the 1 at active_low position mean ?

 

Does it mean that an interrupt is generated if the voltage is falling from high to low voltage ?

 

and what does the 0 at wake_up position mean ?

 

What about my question of the input folder in dev ?

 

 

 

Many questions I know. :-) Is there a document that explains how this stuff works in detail ?

 

I didn't found anything but maybe I overseen it.

 

 

 

Thanks for your help.

 

 

 

Sebastian

TranslateQuoteReplyEditDelete

 

 

2011-05-11 11:06:12     Re: gpio-keys: missing /dev/input

Mike Frysinger (UNITED STATES)

Message: 100584   

 

the gpio-keys driver is documented in the wiki:

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:gpio-keys

 

if you need more info, the next step is to refer to the source code

 

your device node is in the wrong place probably because your vendor is using an outdated mdev.conf file.  you can refer to the ADI one in the uclinux-dist/vendors/ tree.

Attachments

    Outcomes