linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trilok Soni <soni.trilok@gmail.com>
To: Wan ZongShun <mcuos.com@gmail.com>
Cc: linux-input@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>
Subject: Re: [PATCH] input: Add keypad support for w90p910 evb
Date: Thu, 9 Jul 2009 12:17:12 +0530	[thread overview]
Message-ID: <5d5443650907082347i40f5f39bn63e2683046155eb@mail.gmail.com> (raw)
In-Reply-To: <4A55901B.6070805@gmail.com>

Hi Wan ZongShun,

>>> +static void w90p910_keypad_scan_matrix(struct w90p910_keypad *keypad,
>>> +                                                       unsigned int status)
>>> +{
>>> +       unsigned int row, col, val;
>>> +
>>> +       row = KGET_RAW(status);
>>> +       col = KGET_COLUMN(status);
>>> +
>>> +       val = lookup_matrix_keycode(keypad, row, col);
>>> +
>>> +       input_report_key(keypad->input_dev, val, 1);
>>> +
>>> +       input_sync(keypad->input_dev);
>>> +
>>> +       input_report_key(keypad->input_dev, val, 0);
>>
>> So, we don't get interrupt on key release?
>
> In w90p910,there is no way to identify whether the key was released or not,so I have to put above code here to report the key has been released.
>

Ok.

>>> +
>>> +static void w90p910_keypad_close(struct input_dev *dev)
>>> +{
>>> +       struct w90p910_keypad *keypad = input_get_drvdata(dev);
>>> +
>>> +       /* Disable clock unit */
>>> +       clk_disable(keypad->clk);
>>
>> So this controller doesn't support putting controller FSM into IDLE
>> state by writing some bits into it or is it doing auto-sleep?
>
> What you said not be supporting in w90p910,
> When to disable this clk,I think the controller will be power down.

Ok.

>>> +
>>> +       /* set multi-function pin for w90p910 kpi. */
>>> +       mfp_set_groupi(&pdev->dev);
>>> +
>>
>> Could you please point me to implementation of this API? I believe
>> this is pin-multiplexing code.
>
> Sure, it is a muti-function pin API, which was defined in /mach-w90x900/mfp-w90p910.c.
> What's wrong?

I prefer pin-multiplexing being done from board-xxx.c files, as
pin-multiplexing differs for every board design. I will look at this
API.

>
>>
>>> +       input_dev->name = pdev->name;
>>> +       input_dev->id.bustype = BUS_HOST;
>>> +       input_dev->open = w90p910_keypad_open;
>>> +       input_dev->close = w90p910_keypad_close;
>>> +       input_dev->dev.parent = &pdev->dev;
>>> +
>>> +       keypad->input_dev = input_dev;
>>> +       input_set_drvdata(input_dev, keypad);
>>> +
>>> +       input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
>>
>> EV_REP can be done as per platform data, but not a problem to enable
>> by default if keypad controller itself is not supporting it
>
>
> This is not suitable to w90p910?
> Maybe I have a mistake to understand EV_REP, how to do for me here?.

No problem, keep EV_REP as is.

-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-07-09  6:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-08  9:17 [PATCH] input: Add keypad support for w90p910 evb Wan ZongShun
2009-07-08 10:32 ` Trilok Soni
2009-07-09  6:37   ` Wan ZongShun
2009-07-09  6:47     ` Trilok Soni [this message]
2009-07-09  9:31       ` Wan ZongShun
2009-07-09 13:09         ` Trilok Soni
2009-07-09 14:22           ` Wan ZongShun
2009-07-09 16:46         ` H Hartley Sweeten
2009-07-10  2:39           ` Wan ZongShun

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=5d5443650907082347i40f5f39bn63e2683046155eb@mail.gmail.com \
    --to=soni.trilok@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-input@vger.kernel.org \
    --cc=mcuos.com@gmail.com \
    /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 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).