mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "Pete Zaitcev" <zaitcev@redhat.com>
Cc: "Jiri Kosina" <jkosina@suse.cz>,
	linux-usb-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, stuard_hayes@dell.com
Subject: Re: usb hid: reset NumLock
Date: Fri, 30 Mar 2007 14:14:20 -0400	[thread overview]
Message-ID: <d120d5000703301114r420a9604i34b6a015e6bad285@mail.gmail.com> (raw)
In-Reply-To: <20070330105924.01a16dd6.zaitcev@redhat.com>

Hi Pete,

On 3/30/07, Pete Zaitcev <zaitcev@redhat.com> wrote:
>
> I didn't like a) layering violation, and b) that they defeat filtering
> unconditionally. Why have any filtering then?
>
> Instead, I propose for USB HID driver to reset NumLock on probe. Like this:
>
> --- a/drivers/usb/input/hid-core.c
> +++ b/drivers/usb/input/hid-core.c
> @@ -458,6 +458,18 @@ static int usb_hidinput_input_event(struct input_dev *dev, unsigned int type, un
>        return 0;
>  }
>
> +static void usbhid_set_leds(struct hid_device *hid, unsigned int code, int val)
> +{
> +       struct hid_field *field;
> +       int offset;
> +
> +       /* This is often called for the mouse half. */
> +       if ((offset = hidinput_find_field(hid, EV_LED, code, &field)) != -1) {
> +               hid_set_field(field, offset, val);
> +               usbhid_submit_report(hid, field->report, USB_DIR_OUT);
> +       }
> +}
> +

This is fine and that's what we do in atkbd probe but maybe we should
move that in input core and reset leds as part of
input_register_device()?

-- 
Dmitry

  reply	other threads:[~2007-03-30 18:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-30 17:59 Pete Zaitcev
2007-03-30 18:14 ` Dmitry Torokhov [this message]
2007-03-30 19:54   ` Pete Zaitcev
2007-03-30 20:29     ` Dmitry Torokhov
2007-03-31 19:35 ` Jiri Kosina
2007-03-31 22:43   ` Pete Zaitcev
2007-04-02  5:24   ` Pete Zaitcev
2007-04-02 14:48     ` Jiri Kosina
2007-04-02 23:12       ` Pete Zaitcev
2007-04-03  5:04         ` Dmitry Torokhov
2007-04-03  6:24           ` Pete Zaitcev
2007-04-03  8:52         ` Jiri Kosina
2007-04-03  8:57           ` [linux-usb-devel] " Robert Marquardt
2007-04-03  9:32             ` Jiri Kosina
2007-04-05  3:24           ` Dmitry Torokhov
2007-04-05  8:50             ` Jiri Kosina
2007-04-05 20:38               ` Pete Zaitcev
2007-04-05 20:54                 ` Dmitry Torokhov
2007-04-05 21:22                   ` Pete Zaitcev
2007-04-01 11:49 ` Pekka Enberg
2007-04-01 16:16   ` Pete Zaitcev
2007-04-02  4:10   ` Dmitry Torokhov

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=d120d5000703301114r420a9604i34b6a015e6bad285@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=stuard_hayes@dell.com \
    --cc=zaitcev@redhat.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

all inboxes | Powered by JetHome®