Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp212426rdb; Thu, 16 Nov 2023 17:17:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IETMCAItap+B2x6eYQ7kWgBU1pDIx3KeRXcU+cUNWQfHok2qbfHawN8mKLKLGFkB/zD6g9p X-Received: by 2002:a17:903:32c9:b0:1cc:7ec0:bc8a with SMTP id i9-20020a17090332c900b001cc7ec0bc8amr12454912plr.66.1700183822253; Thu, 16 Nov 2023 17:17:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700183822; cv=none; d=google.com; s=arc-20160816; b=gl/RIfo/8Ql9ptEIDGABkVGiODCYC5lmFZVWo4tbU+ah1xwM/oH/6iqFoLXpA5Rtgc vDAZkZOZAdT4M/ir0GCRpTTwgn+9d1TxW293o7RK7IwA0dVW72pXUJkq3zwzjmEIiJQO wcIqK/K0THv3jyfdRgfnZRnvEsoYdJ/xrZtoA6AnOQiPw6WN9TFrHzW57F1gG61duXhz cuWnJf2FhyZpC7VjoS+ew0rNa3XhHh75+sxzvS5uggsHvbDMnnNRcsm/QWu0l6gI0hs8 9lVu5/KqVp2YmzOrYgJZQsp04DABYvobysNEWI4x6KiT/S65oqduL7ki1sZJJEihfpcS 8GEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=argAW/l5NVCwSSKLt8lTVPDhHTjwmM5Ir7e3W5JDo04=; fh=JMzzSxVRPA/ydaJ3Dt0QS2ws9NywLb5x5SvfzqU5z7c=; b=Adap3QimKRONfb+IshBny91MVX/fo5zQ6Uvdza6S+JQUoUAXHAZpiR8eqr9QU0kMfX f4B8IjbqrbwGyDIAx9aSp0rD/aFSuMehvdHWGHQo0yeh9G2oSKwCV5vKu4RfTnRs2KF/ ajhIZVR+UOgHcQs74pW0f/Z8KEdN1HU3oGaNmn67m0cPX5vwc9MR/mZOl/hzU/ajuBrS wFW0DeNXuRjR2Iu0vUEKLxFpHYXOzyUGhfbvRJkooMRE2T6Od/vgr2hXOYeuwr3tBN2Y YA9NnDKCf/ELi75D9ubaWRsqg4KBrY60/pi7C8+JBah4emlug6z8uqFjN6fFQ1bCzMYf C1Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm2 header.b=GrsbGzEA; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=chjU55KX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id x5-20020a170902b40500b001c9de48fc7asi669527plr.170.2023.11.16.17.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 17:17:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm2 header.b=GrsbGzEA; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=chjU55KX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6BF5F81E0FC3; Thu, 16 Nov 2023 17:16:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229946AbjKQBQb (ORCPT + 99 others); Thu, 16 Nov 2023 20:16:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjKQBQa (ORCPT ); Thu, 16 Nov 2023 20:16:30 -0500 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7A161A8; Thu, 16 Nov 2023 17:16:20 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A190F5C0120; Thu, 16 Nov 2023 20:16:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 16 Nov 2023 20:16:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1700183777; x=1700270177; bh=argAW/l5NV CwSSKLt8lTVPDhHTjwmM5Ir7e3W5JDo04=; b=GrsbGzEAgT5nR3pCk/pWwpLW1y hFG+ioTZfTPgWpISlI8ZhXvrJ59/SLK0nyGkaoaW5C1GdnGcqSHhozkrlfKhfEPZ dsaVbVo2LLYLBk4z+klgw0LuWo5zYQ9fN+8lvOxjfFl/ACLIdh8XYiP3UKemJI/8 ea63iAAmkW9tO14csBr8VziaoPWXWeKg/t12U2KCn+yGafIQG4FaNeApOn8zwjKL c8/DHHfKtmDcMBkqHpKoYpq8Etqw1dx3Ve6U5tdmhn10OlZBtxVxOWHDWjKZcD5N sOZ4VZHAu1W75O9Mhm14wnoWq1Akje7r8CkPNkbaSoolB93WBe8W1uaUhOXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1700183777; x=1700270177; bh=argAW/l5NVCwS SKLt8lTVPDhHTjwmM5Ir7e3W5JDo04=; b=chjU55KXXMe+tP6cnVAjAwNIAgXdH ELY9t1lNShJvSzO2YyyM7mCO9fcIGeMFoPZIM4P5G9yfTZP9sHUxSE+/wCQvCdKL T+V26SMiSGqtiMJFN59XdLchEgnZAt/1cOqpwXzk+Ui9pmO8rZjacTYI5wilCG6n w3lbtSJjOIL0K+VJKuanVgjYuSTkoHV2znG7Iqfqfb1yhoZbyaYZVRorX0/6K2Ak DCEiqGHL+J5IS326sSmTuqFTJpzkAAXmHeRHDncfY9p7VpWxB1I7KmIoHSfTwET+ siaZ0fI/I5gX3TKQUgLpQRfpUy/D7hvKJFKLgvlThuo25ca3I1I4DZSfQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudefledgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpedfnfhukhgvucffrdculfhonhgvshdfuceolhhukhgvsehljhho nhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgfdujedthfduudekffefkeeiffdttd dvhfegudduueffuefhfefggeefteevvdegnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Nov 2023 20:16:14 -0500 (EST) From: "Luke D. Jones" To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, benato.denis96@gmail.com Subject: [PATCH 0/2] hid-asus: reset the backlight brightness level on resume Date: Fri, 17 Nov 2023 14:15:54 +1300 Message-ID: <20231117011556.13067-1-luke@ljones.dev> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 16 Nov 2023 17:16:52 -0800 (PST) From: Denis Benato I have noticed that in my Asus device RC71L the keyboard backlight is LEDs brightness of two RGB rings around two joysticks of this handheld device. The firmware on this device (and other devices from the same manufacturer) restores a default brightness level (that is full brightness for my device and off for some others) after resuming from sleep; that means sysfs will report a wrong brightness level and requires human intervention to restore the desired brightness. I have fixed aforementioned problems with this patch I am submitting. This patch (composed of two distinct patches) compiles without warnings on both gcc and clang and also improves a function signature and constant-correctness of the kernel driver. Denis Benato (2): hid-asus: add const to read-only outgoing usb buffer hid-asus: reset the backlight brightness level on resume drivers/hid/hid-asus.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) -- 2.42.1