From: "Leo L. Schwab" <ewhac@ewhac.org>
To: Kate Hsuan <hpa@redhat.com>
Cc: Hans de Goede <hansg@kernel.org>, Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] HID: lg-g15 - Add support for Logitech G13.
Date: Thu, 14 Aug 2025 13:27:07 -0700 [thread overview]
Message-ID: <aJ5Gm5AaLI6iJ4le@ewhac.org> (raw)
In-Reply-To: <CAEth8oEf3c9quzL2boHo=dJg6+p8scSsq5hL7j2LLjdtREsQxw@mail.gmail.com>
On Thu, Aug 14, 2025 at 05:09:09PM +0800, Kate Hsuan wrote:
> Thank you for your work.
>
Thank you for your feedback. And thank you for collecting all your
comments into one post.
> On Tue, Aug 12, 2025 at 2:57 PM Leo L. Schwab <ewhac@ewhac.org> wrote:
> The comment should in C comments, for example
> struct input_dev *input_js; /*joystick device for G13*/
>
Will sweep all those up.
> > +static int lg_g13_kbd_led_set(struct led_classdev *led_cdev, enum led_brightness brightness)
> > +{
> > + struct led_classdev_mc *mc = lcdev_to_mccdev(led_cdev);
> > + struct lg_g15_led *g15_led =
> > + container_of(mc, struct lg_g15_led, mcdev);
> > + struct lg_g15_data *g15 = dev_get_drvdata(led_cdev->dev->parent);
> > +
> > + /* Ignore LED off on unregister / keyboard unplug */
> > + if (led_cdev->flags & LED_UNREGISTERING)
> > + return 0;
> > +
> > + guard(mutex)(&g15->mutex);
> guard() can be moved to lg_g13_kbd_led_write() to ensure the code is
> protected by a mutex lock when lg_g13_kbd_led_write() is called.
>
I was mimicking the existing structure of the G15 and G510 code,
which I assumed was set up that way for a reason. Will move this.
> > +static int lg_g13_event(struct lg_g15_data *g15, u8 const *data)
> > +{
> > + struct g13_input_report const * const rep = (struct g13_input_report *) data;
> > + int i, val;
> > + bool hw_brightness_changed;
> Remove unused variable.
>
I will be slightly restructuring this.
> > switch (g15->model) {
> > + case LG_G13:
> > + /*
> > + * Some usermode libraries tend to ignore devices that don't
> > + * "look like" a joystick. Create additional input device
> > + * dedicated as joystick.
> > + */
> Nit.
> Improve the comment and describe the hardware and the variable
> settings below in brief.
I'll wordsmith this. It'll get a bit wordier, though...
> Some style and comment style issues are pointed out, and I'll start to
> test this work after I receive my G13.
>
If anything explodes, please let me know right away.
Schwab
prev parent reply other threads:[~2025-08-14 20:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 6:53 [PATCH v2] HID: lg-g15 - Add support for Logitech G13 Leo L. Schwab
2025-08-12 11:24 ` Markus Elfring
2025-08-12 11:51 ` Markus Elfring
2025-08-12 12:55 ` Markus Elfring
2025-08-13 0:11 ` kernel test robot
2025-08-14 9:09 ` Kate Hsuan
2025-08-14 20:27 ` Leo L. Schwab [this message]
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=aJ5Gm5AaLI6iJ4le@ewhac.org \
--to=ewhac@ewhac.org \
--cc=bentiss@kernel.org \
--cc=hansg@kernel.org \
--cc=hpa@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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.