From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4538226E71A; Wed, 30 Jul 2025 09:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753868643; cv=none; b=j0RiJW1FjDtNlX6Zh7Rp3WmQJz+wKBSl8BOXveTyisF6LOW0RYfNcwDUIaBS+v/CixmgZcK/TpKl8KHvvEXQCBdIHRC0NLzJpEUc0RdfY6kwArCZWAnLpJmriK/2XnVZcAb1W2pcGhH0uywtJ2GuLkvrgltR4GqTuA8+u7UHsA8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753868643; c=relaxed/simple; bh=PAfgvNWC/QK+eWoNodSFaDiYUr8sGbeuyS9C8d3LAEk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=psp7PAJZpfqkZ+pFdHpPFxYui0jbS9Z2ZxQUyx1OdZj9yOr6+kUjnc5YQ9ljzN2YF/34aaNOdMk+4AwYsD++pKECDaOlTuErWHZ3sAW7TWi3/1iK02rDCm9eEHC0NwVScZE6nE8pFslGXU3RpAnoCinIBN90Cjk0Nr1KA2J6b4Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xJkOPsaU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xJkOPsaU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD271C4CEF5; Wed, 30 Jul 2025 09:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753868643; bh=PAfgvNWC/QK+eWoNodSFaDiYUr8sGbeuyS9C8d3LAEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xJkOPsaUuNG7bmZVgJW5qCdRF5WHLV9PU3XEftzd2ed5qwBrSxemjgQceDBvlMnGz EMN5I1PmaChCn48ysaxvRCFglEPebRup3VRPHJqaZVtdW8RWeqRlP+uBqWwoe9Lz7C jAGr5CoeRv2yiv/fLAcr4bvKDrVeg9Zxwji0pDvA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rong Zhang , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 6.12 040/117] platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots Date: Wed, 30 Jul 2025 11:35:09 +0200 Message-ID: <20250730093235.123011693@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250730093233.592541778@linuxfoundation.org> References: <20250730093233.592541778@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rong Zhang commit e10981075adce203eac0be866389309eeb8ef11e upstream. On some models supported by ideapad-laptop, the HW/FW can remember the state of keyboard backlight among boots. However, it is always turned off while shutting down, as a side effect of the LED class device unregistering sequence. This is inconvenient for users who always prefer turning on the keyboard backlight. Thus, set LED_RETAIN_AT_SHUTDOWN on the LED class device so that the state of keyboard backlight gets remembered, which also aligns with the behavior of manufacturer utilities on Windows. Fixes: 503325f84bc0 ("platform/x86: ideapad-laptop: add keyboard backlight control support") Cc: stable@vger.kernel.org Signed-off-by: Rong Zhang Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250707163808.155876-3-i@rong.moe Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Greg Kroah-Hartman --- drivers/platform/x86/ideapad-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -1672,7 +1672,7 @@ static int ideapad_kbd_bl_init(struct id priv->kbd_bl.led.name = "platform::" LED_FUNCTION_KBD_BACKLIGHT; priv->kbd_bl.led.brightness_get = ideapad_kbd_bl_led_cdev_brightness_get; priv->kbd_bl.led.brightness_set_blocking = ideapad_kbd_bl_led_cdev_brightness_set; - priv->kbd_bl.led.flags = LED_BRIGHT_HW_CHANGED; + priv->kbd_bl.led.flags = LED_BRIGHT_HW_CHANGED | LED_RETAIN_AT_SHUTDOWN; err = led_classdev_register(&priv->platform_device->dev, &priv->kbd_bl.led); if (err)