From: Joe Perches <joe@perches.com>
To: Sean O'Brien <seobrien@chromium.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Jiri Kosina <jikos@kernel.org>
Cc: linux-input@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] HID: add vivaldi HID driver
Date: Wed, 09 Sep 2020 15:11:46 -0700 [thread overview]
Message-ID: <ad58952a64bdf8e64bf4da5461db43c6a30d3b70.camel@perches.com> (raw)
In-Reply-To: <20200909150254.1.I170489c0c2ac1538b3890abb5a92b95ad4f04d01@changeid>
On Wed, 2020-09-09 at 15:03 -0700, Sean O'Brien wrote:
> Add vivaldi HID driver. This driver allows us to read and report the top
> row layout of keyboards which provide a vendor-defined (Google) HID
> usage.
[]
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
[]
> @@ -814,6 +814,13 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
>
> if ((parser->global.usage_page << 16) >= HID_UP_MSVENDOR)
> parser->scan_flags |= HID_SCAN_FLAG_VENDOR_SPECIFIC;
> +
> + if ((parser->global.usage_page << 16) == HID_UP_GOOGLEVENDOR)
> + for (i = 0; i < parser->local.usage_index; i++)
> + if (parser->local.usage[i] ==
> + (HID_UP_GOOGLEVENDOR | 0x0001))
> + parser->device->group =
> + HID_GROUP_VIVALDI;
Can you please make this less indented code
so there are fewer line breaks?
Something like:
if ((parser->global.usage_page << 16) != HID_UP_GOOGLEVENDOR)
return;
for (i = 0; i < parser->local.usage_index; i++) {
if (parser->local.usage[i] != (HID_UP_GOOGLEVENDOR | 0x0001))
continue;
parser->device->group = HID_GROUP_VIVALDI;
break;
}
next prev parent reply other threads:[~2020-09-09 22:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 22:03 Sean O'Brien
2020-09-09 22:11 ` Joe Perches [this message]
2020-09-09 22:31 ` Sean O'Brien
2020-09-21 22:49 ` ping: " Sean O'Brien
2020-09-30 20:45 ` Jiri Kosina
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=ad58952a64bdf8e64bf4da5461db43c6a30d3b70.camel@perches.com \
--to=joe@perches.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=seobrien@chromium.org \
/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®