RE: [PATCH] input: Add keypad support for w90p910 evb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
>
> ---
+
+#define keypad_readl(off)	__raw_readl(keypad->mmio_base + (off))
+#define keypad_writel(off, v)	__raw_writel((v), 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);

Regards,
Hartley
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux