[E3-hacking] Please help creating gpio-switch on ams-delta
e3-dev at roosoft.ltd.uk
Tue May 12 12:51:32 BST 2009
Janusz Krzysztofik wrote:
> I am playing with OMAP 5910 based Amstrad E3 videophone (ams-delta)
> machine. I am trying to expose GPIO 4, that hook switch hangs off, to
> I can successfully access the pin by exporting it using gpiolib sysfs.
> I can check its value, following hook switch state changes. However, I
> would like the switch to generate events.
> I have tried two methods: gpio-switch and gpio-keys. gpio-switch
> device is able to report the switch initial state correctly, gpio-keys
> device just initializes without errors. However, for both methods,
> after first switch change, the system stops responding, giving no
> error messages.
> The code of goip-switch initialization sequence together with my
> platform device definition (attached) does not look any different to
> me than those for keyboard or modem (patches available from
> http://the.earth.li/pub/e3/2.6.19/), that both also use GPIO
> interrupts and do work for me.
> Any hints?
> PS. This is my first post to linux-omap list, I don't know if you
> accept attachments. If not, next time I switch to a different mail
> user agent that allows me for inline file inclusion (or learn how to
> do it in my thunderbird).
Maybe this is a little off topic. But have you thought about using
inotify to monitor events?
I believe it can be used for any fs including sysfs? No?
Just a thought...
E3 Development & tweaking ;)
More information about the e3-hacking