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] [day] [month] [year] [list]
Message-ID: <aMiQsMtyX9POrXof@ewhac.org>
Date: Mon, 15 Sep 2025 15:18:24 -0700
From: "Leo L. Schwab" <ewhac@...ac.org>
To: Hans de Goede <hansg@...nel.org>
Cc: Kate Hsuan <hpa@...hat.com>, Jiri Kosina <jikos@...nel.org>,
	Benjamin Tissoires <bentiss@...nel.org>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] HID: lg-g15 - Add support for Logitech G13.

On Wed, Sep 10, 2025 at 09:16:45PM +0200, Hans de Goede wrote:
> Since the driver writes any new values to the G13 and the G13 accepts
> those and remembers them even when the backlight is off,
> the notify() should be passed g15_led->brightness when an
> off -> on transition happens (and 0 or LED_OFF for the on -> off
> transition).
> 
> Since g15_led->brightness gets initialized by reading the actual
> setting from the G13 at probe time and then gets updated on
> any successful completion if writing a new brightness value
> to the G13, it should always reflect the value which the backlight
> will be set at by the G13 after an off -> on transition.
> 
> Or am I missing something ?
>
	If I'm understanding you correctly:

	You want `brightness` to be copied to `brightness_hw_changed` on
probe, and on every backlight off->on transition (cool so far).

	What do you want to happen to `brightness_hw_changed` when
`brightness` is changed in sysfs while the backlight is on?  As it stands,
the current behavior is:
	* Driver loads and probes; `brightness` and `brightness_hw_changed`
	  both set to 255.
	* sysfs `brightness` changed to 128.  `brightness_hw_changed`
	  remains at 255.
	* Toggle backilght off.  `brightness_hw_changed` changed to 0.
	  `brightness` remains at 128.
	* Toggle backlight back on.  `brightness_hw_changed` gets a copy of
	  `brightness`, and both are now 128.

	This seems inconsistent to me.  Hence my earlier suggestion that
`brightness_hw_changed` should track all changes to `brightness`, except
when the backlight is toggled off.

					Schwab

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ