[RFC] WIP: add usb keyboard driver

Sascha Hauer s.hauer at pengutronix.de
Thu Sep 10 00:38:15 PDT 2015


Excellent! This makes the framebuffer console support complete :)

I have not much to say, the driver looks ok to me. I'll test it once I
find time. Some smally comments inline.

On Wed, Sep 09, 2015 at 07:36:52PM +0300, Peter Mamonov wrote:
> diff --git a/drivers/input/usb_kbd.c b/drivers/input/usb_kbd.c

Please add some copyright header and don't forget to put references in
it where you got the code from.

> +	if (pressed == 1) {
> +		if (scancode == NUM_LOCK) {
> +			data->flags ^= USB_KBD_NUMLOCK;
> +			return 1;
> +		}
> +
> +		if (scancode == CAPS_LOCK) {
> +			data->flags ^= USB_KBD_CAPSLOCK;
> +			return 1;
> +		}
> +		if (scancode == SCROLL_LOCK) {
> +			data->flags ^= USB_KBD_SCROLLLOCK;
> +			return 1;
> +		}
> +	}
> +
> +	/* Report keycode if any */
> +	if (keycode) {
> +		pr_debug("%s: key pressed: '%c'\n", __FUNCTION__, keycode);

Please use __func__ rather than __FUNCTION__

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list