mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Peter Mamonov <pmamonov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC] WIP: add usb keyboard driver
Date: Thu, 10 Sep 2015 09:38:15 +0200	[thread overview]
Message-ID: <20150910073815.GQ18700@pengutronix.de> (raw)
In-Reply-To: <1441816612-5471-1-git-send-email-pmamonov@gmail.com>

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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-09-10  7:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 16:36 Peter Mamonov
2015-09-10  7:38 ` Sascha Hauer [this message]
2015-09-10 15:51   ` Peter Mamonov
2015-09-10 17:21     ` Sascha Hauer
2015-09-11 14:56       ` Peter Mamonov

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=20150910073815.GQ18700@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=pmamonov@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