From: Wan ZongShun <mcuos.com@gmail.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Trilok Soni <soni.trilok@gmail.com>,
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: Fri, 10 Jul 2009 10:39:36 +0800 [thread overview]
Message-ID: <4A56A9E8.2000703@gmail.com> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE190901A68B96@mi8nycmail19.Mi8.com>
Dear Hartley,
Thanks for your good ideas, before resubmitting the updated patch,I have to need your help.
H Hartley Sweeten:
> On Thursday, July 09, 2009 2:31 AM, Wan ZongShun wrote:
>> Dear sirs,
>>
>> According to Trilok's suggestion, I fixed up my driver and
>> resubmitted it.
>>
>> patch text:
>>
>> Add w90p910 keypad driver for w90p910 evalution board
>> based on w90p910,there is a 4X4 keypad on my board.
>>
>> Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
>>
>> ---
> +
> +#define keypad_readl(off) __raw_readl(keypad->mmio_base + (off))
> +#define keypad_writel(off, v) __raw_writel((v), keypad->mmio_base + (off))
> +
Do you mean that using the following function instead of that above macro?
static inline unsigned long keypad_readl(unsigned int off, struct w90p910_keypad *keypad)
{
return __raw_readl(keypad->mmio_base + (off));
}
> You might want to make these two macro's inline functions instead.
>
> Depending on having the local variable 'keypad' is prone to breakage.
> See Documentation/CodingStyle, Chapter 12.
>
> + 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;
>
> If you add the following the keymap can be changed from userspace:
>
> input_dev->keycode = keypad->matrix_keycodes;
> input_dev->keycodesize = sizeof(keypad->matrix_keycodes[0]);
> input_dev->keycodemax = ARRAY_SIZE(keypad->matrix_keycodes);
It is a good idea.
> Regards,
> Hartley
>
prev parent reply other threads:[~2009-07-10 2:39 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
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 [this message]
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=4A56A9E8.2000703@gmail.com \
--to=mcuos.com@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hartleys@visionengravers.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-input@vger.kernel.org \
--cc=soni.trilok@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).