Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5771166rwb; Tue, 9 Aug 2022 03:59:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR5hi9BpUhYgJ/kFPuJEl/W0oPfMXtXekrR5CPztZPUFydKcWiU3c/c0HJyoWGbu+Jl7QS5n X-Received: by 2002:a17:906:8a49:b0:730:b15e:f8d2 with SMTP id gx9-20020a1709068a4900b00730b15ef8d2mr15962991ejc.694.1660042782848; Tue, 09 Aug 2022 03:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660042782; cv=none; d=google.com; s=arc-20160816; b=cenAX7rAS69wAMlUFnNbstHaKEfa5cGN7lcKGfB0oQOMktrO/jbPSnmqa8oosaoZxA TZKfiuYPPs/Jla6em/mceV09KWDnKPnp4/4IIXTP5Pr7bJqMhehvX1gMH4zO2otNV5sL kyRbpPU/wSdtmd/HZ6M4jmUR7HFNHhIRw1Vv2ynGOHIcgCKRnLJ1SOBZtyjB90E8ld7W QjWsSwI6rv4pkLzIz8OrJYs4PAUVxRzY2Qt9UL1LNjRWXubEKhakcJb+nxGqnAhShBVp nba7lZ+Q8P109PR1Em8qc8+h7KHnZ8fuMaNhh8aGYpKy7xAEgIV4OufO9trMBEa7Xq7j BXcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=l+Hf7cwYZmOHCWYW6DFUKgfT6ABZ0nMhFyBlOZTV3ak=; b=OFiOV+HxDQjSICjH0p22a6NttlwzBvwmF3aZ318PkJCHxyBHl+aSMc4L0IXqqja8xz qgK4h7nAdP7NKILRsicf0yo2FIdUPLlVVlgO75s1GA1jSTNclfPEQ0R14h6HHUn3FB5m gN16izg7De9KQ42iJK8ykx4R9P2Pr9MEsW8LJKpKwA0vIJgAz5R9rrsuYVKeQi6Hcc/u LM8n4RiGZHz+eYPLyneFg2ygtRxqlx85VTIJvV2t9zvD2TyZJvQIc0s84RZ2sPvjmkQf KCJxrXGFRxmE2W/qT/BP0dlJ17uHyYIN+qtr1RGM+NqrUW9AGYlmEoOUO1levGZNY+qs vbQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=eBBbAb58; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf24-20020a1709077f1800b00732b3af4684si1422977ejc.163.2022.08.09.03.59.10; Tue, 09 Aug 2022 03:59:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=eBBbAb58; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241268AbiHIKul (ORCPT + 99 others); Tue, 9 Aug 2022 06:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235826AbiHIKuh (ORCPT ); Tue, 9 Aug 2022 06:50:37 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E48F555A7; Tue, 9 Aug 2022 03:50:33 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 1171E1C0003; Tue, 9 Aug 2022 12:50:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1660042232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l+Hf7cwYZmOHCWYW6DFUKgfT6ABZ0nMhFyBlOZTV3ak=; b=eBBbAb588ByY6uJI+nodeBT2GzrlesNObPpp0S/AIkfvEVO0WlKz63YEma66+Nb5XP8D9Q l1RAIlcrlqjPJiNUgSeVyFCuCgLeloPmEXX6xKU9fQd/Xzu1wRcjHG3dqoLcrSE1nYQEoL 3Wb9TPgV6l+xR+tBKnK3hVG8Z27H1vA= Date: Tue, 9 Aug 2022 12:50:31 +0200 From: Pavel Machek To: "Luke D. Jones" Cc: hdegoede@redhat.com, andy.shevchenko@gmail.com, pobrn@protonmail.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/6] asus-wmi: Implement TUF laptop keyboard RGB control Message-ID: <20220809105031.GA4971@duo.ucw.cz> References: <20220809025054.1626339-1-luke@ljones.dev> <20220809025054.1626339-2-luke@ljones.dev> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline In-Reply-To: <20220809025054.1626339-2-luke@ljones.dev> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > Adds support for TUF laptop RGB control via the multicolor LED API. >=20 > As this is the bas for adjusting only the RGB values, it sets the > default mode of the keyboard to static since there is no way to read > any existing settings from the device. These defaults overwrite the > booted state of the keyboard when the module is loaded. > + if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_MODE)) { > + struct mc_subled *mc_led_info =3D asus->keyboard_rgb_mode.subled_info; > + struct led_classdev_mc *mc_cdev =3D &asus->keyboard_rgb_mode.dev; > + struct device *dev =3D &asus->platform_device->dev; > + u8 led_brightness =3D 255; > + > + /* > + * asus::kbd_backlight still controls a base 3-level backlight and when > + * it is on 0, the RGB is not visible at all. RGB should be treated as > + * an additional step. > + */ Ouch. Lets not do that? If rgb interface is available, hide the 3 level one, or something. > + mc_cdev->led_cdev.name =3D "asus::multicolour::kbd_backlight"; Make this "rgb:kbd_backlight" or "inputX:rgb:kbd_backligh" and document it in Documentation/leds/well-known-leds.txt. Thanks and best regards, Pavel --=20 People of Russia, stop Putin before his war on Ukraine escalates. --dDRMvlgZJXvWKvBx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYvI79wAKCRAw5/Bqldv6 8sdWAJ4rC+HTcJctMx3yKybeVCUyLk+l9gCfdFRsmnQksDv9b7aEeWafABCmqts= =/0qH -----END PGP SIGNATURE----- --dDRMvlgZJXvWKvBx--