All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Christopher Friedt <chrisfriedt@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: keypad input method question
Date: Mon, 28 Sep 2009 10:02:40 -0700	[thread overview]
Message-ID: <20090928170240.GE21455@core.coreip.homeip.net> (raw)
In-Reply-To: <3ea34a000909250601n5127dd2bt6a84aab7a93c26ed@mail.gmail.com>

Hi Christopher,

On Fri, Sep 25, 2009 at 03:01:37PM +0200, Christopher Friedt wrote:
> Hi folks,
> 
> Recently, I ported Linux to a previously unsupported device (it uses
> pxa270 processer, so most of the work was already done), and I had a
> couple of issues that I hope you could help me with.
> 
> 1) I wrote a new 'multi-function' driver for the STMPE2401 gpio
> expander, which also has a keypad controller, 3 pwm channels, and a
> rotator input, and I would appreciate it if a couple of people could
> review it for me so that it could be submitted upstream. So far, only
> the keypad function is implemented because my device doesn't use the
> others. However, I've already coded in most of the structure for the
> other device functions but they just return -ENOSYS on probe. I'm sure
> that someone with sufficient experience could probably look at my
> driver and give me a few tips on how to improve it before submission.
> Which leads me to my next question...

Just post in on the mailing list (and mark that it is for initial
review).

> 
> 2) currently the input is a bit complicated - there are a couple of
> different modifier keys, and I'm not really sure where to start to
> have userspace handle the scancode-keycode mapping. Right now it's
> done in kernel mode in a small callback function. Can somebody point
> me in the right direction? It would be nice if the keypad worked at
> the console and also in X or other graphical environments. Currently
> I'm trying to get it to work in Android, which just uses the typical
> event interface for key-remapping.
> 
> I suppose one way to do it would be to have the kernel dynamically
> switch based on if the event device is open... still it's a bit
> confusing. Any tips?
>

I would not recommend doing it, nothing stops userspace from accessing
the device through both inetrfaces (evdev and legacy one) at the same
time.

It would be curious to see what kind of keypad you have.

-- 
Dmitry

  reply	other threads:[~2009-09-28 17:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25 13:01 keypad input method question Christopher Friedt
2009-09-28 17:02 ` Dmitry Torokhov [this message]
2009-09-28 19:42   ` Christopher Friedt
2009-09-29  9:30     ` Kristoffer Ericson
2009-09-29 18:43       ` Christopher Friedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090928170240.GE21455@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=chrisfriedt@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.