Re: [PATCH v9 8/8] Loongson: YeeLoong: add input/hotkey driver

From: Wu Zhangjin
Date: Thu Dec 10 2009 - 21:48:36 EST


On Tue, 2009-12-08 at 22:15 +0800, Wu Zhangjin wrote:
> From: Wu Zhangjin <wuzhangjin@xxxxxxxxx>
>
> This patch adds Hotkey Driver, which will do related actions for The
> hotkey event(/sys/class/input) and report the corresponding input keys
> to the user-space applications.
>
> [NOTE:
>
> This patch is based on the sparse keymap library in:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input next
>
> of Dmitry Torokhov. that sparse keymap support is also queued for
> 2.6.33. Before the above branch is pulled by linus, this patch is not
> appliable.]
>
[...]
> +
> +/* yeeloong_wifi_handler may be implemented in the wifi driver */
> +sci_handler yeeloong_wifi_handler;
> +EXPORT_SYMBOL(yeeloong_wifi_handler);
> +

Because we have reported the KEY_WLAN to user-space and If we provide
the standard rfkill interfaces too, there is no need to handle the Fn+F5
event in kernel space, will remove the above three lines the following
related source code.

> +static void do_event_action(int event)
> +{
> + sci_handler handler;
> + int reg, status;
> + struct key_entry *ke;
> +
> + reg = 0;
> + handler = NULL;
> +
> + switch (event) {
[...]
> + case EVENT_WLAN:
> + /* We use 2 to indicate it as a switch */
> + status = 2;
> + handler = yeeloong_wifi_handler;
> + break;

Will remove it and send the this patch as v10 later.

Best Regards,
Wu Zhangjin

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/