All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org
Cc: benjamin.tissoires@redhat.com, Jiri Kosina <jikos@kernel.org>,
	"Sean O'Brien" <seobrien@chromium.org>,
	"Douglas Anderson linux-kernel @ vger . kernel . org" 
	<dianders@chromium.org>
Subject: Re: [PATCH v5 3/5] HID: google: extract Vivaldi hid feature mapping for use in hid-hammer
Date: Mon, 28 Feb 2022 12:56:08 -0800	[thread overview]
Message-ID: <CAE-0n50xkGUoJvy5BLBPgR67nFGLfyL50qO2dHUuMpxrZd=2gw@mail.gmail.com> (raw)
In-Reply-To: <20220228075446.466016-4-dmitry.torokhov@gmail.com>

Quoting Dmitry Torokhov (2022-02-27 23:54:44)
> diff --git a/drivers/hid/hid-vivaldi-common.c b/drivers/hid/hid-vivaldi-common.c
> new file mode 100644
> index 000000000000..c88b26f4c78b
> --- /dev/null
> +++ b/drivers/hid/hid-vivaldi-common.c
> @@ -0,0 +1,140 @@
> +// SPDX-License-Identifier: GPL-2.0
[...]
> +/**
> + * vivaldi_feature_mapping - Fill out vivaldi keymap data exposed via HID
> + * @hdev: HID device to parse
> + * @field: HID field to parse
> + * @usage: HID usage to parse
> + *
> + * This function assumes that driver data attached to @hdev contains an

Maybe add

Note: This function assumes ...

> + * instance of &struct vivaldi_data in the very beginning.

It makes me nervous that this can't be checked statically but OK.

> + */
> +void vivaldi_feature_mapping(struct hid_device *hdev,
> +                            struct hid_field *field, struct hid_usage *usage)
> +{
> +       struct vivaldi_data *data = hid_get_drvdata(hdev);
> +       struct hid_report *report = field->report;
> +       u8 *report_data, *buf;
> +       u32 report_len;
> +       unsigned int fn_key;
> +       int ret;
[...]
> +
> +static DEVICE_ATTR_RO(function_row_physmap);
> +static struct attribute *vivaldi_sysfs_attrs[] = {
> +       &dev_attr_function_row_physmap.attr,
> +       NULL
> +};
> +
> +static const struct attribute_group vivaldi_attribute_group = {
> +       .attrs = vivaldi_sysfs_attrs,
> +};
> +
> +/**
> + * vivaldi_feature_mapping - Complete initialization of device using vivaldi map

vivaldi_input_configured

> + * @hdev: HID device to witch vivaldi attributes should be attached

s/witch/which/

> + * @hidinput: HID input device (unused).

Drop the period? It's not on the hdev argument description above.

> + */
> +int vivaldi_input_configured(struct hid_device *hdev,
> +                            struct hid_input *hidinput)

  reply	other threads:[~2022-02-28 20:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28  7:54 [PATCH v5 0/5] Input/HID: Consolidate ChromeOS Vivaldi keyboard logic Dmitry Torokhov
2022-02-28  7:54 ` [PATCH v5 1/5] HID: google: switch to devm when registering keyboard backlight LED Dmitry Torokhov
2022-02-28  7:54 ` [PATCH v5 2/5] Input: extract ChromeOS vivaldi physmap show function Dmitry Torokhov
2022-02-28  7:54 ` [PATCH v5 3/5] HID: google: extract Vivaldi hid feature mapping for use in hid-hammer Dmitry Torokhov
2022-02-28 20:56   ` Stephen Boyd [this message]
2022-02-28  7:54 ` [PATCH v5 4/5] HID: google: Add support for vivaldi to hid-hammer Dmitry Torokhov
2022-02-28  7:54 ` [PATCH v5 5/5] HID: google: modify HID device groups of eel Dmitry Torokhov
2022-02-28 20:57   ` Stephen Boyd
2022-03-01  6:55     ` Dmitry Torokhov
2022-03-02  1:52 ` [PATCH v5 0/5] Input/HID: Consolidate ChromeOS Vivaldi keyboard logic Stephen Boyd

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='CAE-0n50xkGUoJvy5BLBPgR67nFGLfyL50qO2dHUuMpxrZd=2gw@mail.gmail.com' \
    --to=swboyd@chromium.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dianders@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.