26 Nov 2009 05:10
Re: [PATCH v2] [loongson] yeeloong2f: add platform specific support
Dmitry Torokhov <dmitry.torokhov <at> gmail.com>
2009-11-26 04:10:47 GMT
2009-11-26 04:10:47 GMT
Hi Wu,
Overall impression - several drivers crammed into one module, I wonder
if it could be split somewhat. Some input-related concerns below.
On Sat, Nov 21, 2009 at 08:08:40PM +0800, Wu Zhangjin wrote:
> +
> +/* hotkey input subdriver */
> +
> +static struct input_dev *yeeloong_hotkey_dev;
> +static int event, status;
> +
> +struct key_entry {
> + char type; /* See KE_* below */
> + int event; /* event from SCI */
> + u16 keycode; /* KEY_* or SW_* */
> +};
> +
> +enum { KE_KEY, KE_SW, KE_END };
I am going to post the sparse keymap library shortly, this driver could
use it too...
> +
> +static struct key_entry yeeloong_keymap[] = {
> + {KE_SW, EVENT_LID, SW_LID},
> + /* SW_VIDEOOUT_INSERT? not included in hald-addon-input! */
> + {KE_KEY, EVENT_CRT_DETECT, KEY_PROG1},
> + /* Seems battery subdriver should report it */
> + {KE_KEY, EVENT_OVERTEMP, KEY_PROG2},
(Continue reading)
RSS Feed