From: "Manuel Schönlaub" <manuel.schoenlaub@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: lains@riseup.net, jikos@kernel.org,
benjamin.tissoires@redhat.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: logitech-hidpp: support Color LED feature (8071).
Date: Wed, 23 Mar 2022 20:21:26 -0600 [thread overview]
Message-ID: <YjvVptj8exUCD7sx@hermes> (raw)
In-Reply-To: <20220323210423.GA10741@duo.ucw.cz>
On Wed, Mar 23, 2022 at 10:04:23PM +0100, Pavel Machek wrote:
> Hi!
>
> > The HID++ protocol allows to set multicolor (RGB) to a static color.
> > Multiple of such LED zones per device are supported.
> > This patch exports said LEDs so that they can be set from userspace.
> >
> > Signed-off-by: Manuel Schönlaub <manuel.schoenlaub@gmail.com>
>
> Please cc LEDs stuff to the LED lists.
>
Will do. Though it seems like first we should discuss whether the kernel
in fact is the right place, no?
> > +static int hidpp_mc_led_register(struct hidpp_device *hidpp_dev,
> > + struct led_classdev_mc *mc_dev,
> > + int zone)
> > +{
> > + struct hid_device *hdev = hidpp_dev->hid_dev;
> > + struct mc_subled *mc_led_info;
> > + struct led_classdev *cdev;
> > + int ret;
> > +
> > + mc_led_info = devm_kmalloc_array(&hdev->dev, 3,
> > + sizeof(*mc_led_info),
> > + GFP_KERNEL | __GFP_ZERO);
> > + if (!mc_led_info)
> > + return -ENOMEM;
> > +
> > + mc_led_info[0].color_index = LED_COLOR_ID_RED;
> > + mc_led_info[1].color_index = LED_COLOR_ID_GREEN;
> > + mc_led_info[2].color_index = LED_COLOR_ID_BLUE;
> > +
> > + mc_dev->subled_info = mc_led_info;
> > + mc_dev->num_colors = 3;
> > +
> > + cdev = &mc_dev->led_cdev;
> > + cdev->name = devm_kasprintf(&hdev->dev, GFP_KERNEL,
> > + "%s:rgb:indicator-%d", hdev->uniq, zone);
>
> So this is keyboard backlight? We should add the documentation at the
> very least, so that other drivers use same name.
>
> Best regards,
> Pavel
>
> --
> People of Russia, stop Putin before his war on Ukraine escalates.
I do not own a Logitech keyboard, but some mice. There are RGB leds
that you can normally control with Windows software.
I'd suppose (but could not verify) that supported keyboards by Logitech
work with the same feature.
Best Regards,
Manuel
next prev parent reply other threads:[~2022-03-24 2:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 23:50 [PATCH] HID: logitech-hidpp: support Color LED feature (8071) Manuel Schönlaub
2022-03-23 21:04 ` Pavel Machek
2022-03-24 2:21 ` Manuel Schönlaub [this message]
2022-05-05 8:25 ` Pavel Machek
2022-03-23 21:22 ` Filipe Laíns
2022-03-23 22:24 ` Bastien Nocera
2022-03-24 3:28 ` Manuel Schönlaub
2022-03-24 9:32 ` Bastien Nocera
2022-03-24 16:10 ` Manuel Schönlaub
2022-05-05 8:29 ` Pavel Machek
2022-03-24 3:34 ` Manuel Schönlaub
2022-03-24 19:54 ` Benjamin Tissoires
2022-03-25 1:29 ` Manuel Schönlaub
2022-05-05 8:32 ` Pavel Machek
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=YjvVptj8exUCD7sx@hermes \
--to=manuel.schoenlaub@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=lains@riseup.net \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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;
as well as URLs for NNTP newsgroup(s).