lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Mar 2022 20:21:26 -0600
From:   Manuel Schönlaub <manuel.schoenlaub@...il.com>
To:     Pavel Machek <pavel@....cz>
Cc:     lains@...eup.net, jikos@...nel.org, benjamin.tissoires@...hat.com,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: logitech-hidpp: support Color LED feature (8071).

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ