linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Using gpio_keys with regmapped gpio?
@ 2015-03-31 19:57 Thor Thayer
       [not found] ` <551AFC2F.3060300-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Thor Thayer @ 2015-03-31 19:57 UTC (permalink / raw)
  To: Mark Brown, dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

Hi,

I have a SPI gpio expander chip that is using the regmap framework. 
There are some pushbuttons that I'd like to use the gpio_keys framework 
for but only the first button press creates an input event.

It seems like my problem occurs because I'm only getting events on a 
button press.  The input_get_disposition() function toggles a local copy 
of the button state [__change_bit(code, dev->key);] in the input.c file. 
I think this function also needs to be called when the button is 
released to toggle the dev->key state and re-arm for the next button press.

I tried enabling autorepeat but that causes an infinite loop in the 
input_repeat_key() function.

In both cases, it seems like the button press condition must be cleared 
when the button is released. This seems like it should be common for all 
GPIOs so I'm probably missing something.

Which brings up my next question. Can the gpio_keys framework be used 
with a regmapped gpio? I haven't been able to find any examples of 
gpio_keys with an external gpio expander and maybe this isn't valid usage.

Thanks,

Thor


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-03  7:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 19:57 Using gpio_keys with regmapped gpio? Thor Thayer
     [not found] ` <551AFC2F.3060300-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2015-03-31 20:04   ` Mark Brown
2015-03-31 20:17   ` Dmitry Torokhov
2015-03-31 21:06     ` Thor Thayer
     [not found]       ` <551B0C43.5000101-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2015-04-01 15:59         ` Dmitry Torokhov
     [not found]           ` <CAKdAkRTwPwSThinV-t6UN3LMY8-XXYJ1dB+11U9SZ=zZT4Kt7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-01 16:00             ` Dmitry Torokhov
2015-04-03  7:13   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).