Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5257829yba; Wed, 8 May 2019 10:13:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwm/3oHh27C78VBsqKF9ZRVB/uMGR9r3z5X84Mn5BRtptNizARSe+3J/6s3kodbF+oTB2Z2 X-Received: by 2002:a17:902:860c:: with SMTP id f12mr15311249plo.127.1557335635931; Wed, 08 May 2019 10:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557335635; cv=none; d=google.com; s=arc-20160816; b=fePesAnR/G7MSXnrsicIMf0VKlyLktgQ7jlgF875fcrqmVh2k6JjEH8kWEfWah+sNX d+7hjx3RbHYhX/xFFp+tp/jbnDdwg4MOe6Qdq/xbQ2EyU0ytoTNcMMWwWpCzDvGqiufr PzNB3n/64ABlEUBIxqekDTKATQphlUQaI6zdQIWwAIBiDV7dxAoIDLPQtcCElWF87Z6v dQH4o33et3b6SZtuIL/5jgiw2nGGhTS6coO/6yIuaI1C2KV3G6BKitexrec58iIhpRhH E6LT9gKyf/QAix/LnkRmoB9tjC0V1rBbIfJip46ZJD9GYAL6/Lofcu3haZc5EvnuQydx KnMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lsspeEICFurTJlSTg793y7N6tFOjRTqJwC/eJS5sDl0=; b=WqytapgR5x9lWLOPZlwVtR6+GMGJN0CIE6q8UkcWS3SjmNWthhvtBGysbHLlXgjI51 PRj/vLpwhzTj+qnusRxRN+83T3xg2Gvfv8uE3qYbdjw7m9PQPOx+BkFzFOB0GoKtn06U F0WLi4eqB5vDm1VXi3KlQkrs6BYorfXhnUTYZ3aNPmXhfOUxJ51Rh12sJ3mrORSHnn9o vlDGkUkOJ5IQ3I59NinDjDYlhLNuBvmMgyQDh3LJIcKhIFxILl/py55DW1GO0Vf1bRsU 2HWiuNXY4TdnnL9ty9RfDPyLxXdjkeloFqYwrXE6/NrqCFfnSG9qUboZyLDSt0NMZqsV CPFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d137si14000803pga.23.2019.05.08.10.13.39; Wed, 08 May 2019 10:13:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728813AbfEHRMc (ORCPT + 99 others); Wed, 8 May 2019 13:12:32 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:57972 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728376AbfEHRMb (ORCPT ); Wed, 8 May 2019 13:12:31 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id D33C180260; Wed, 8 May 2019 19:12:16 +0200 (CEST) Date: Wed, 8 May 2019 19:12:29 +0200 From: Pavel Machek To: Andy Shevchenko Cc: Yurii Pavlovskyi , Jacek Anaszewski , Linux LED Subsystem , Corentin Chary , Darren Hart , Andy Shevchenko , Daniel Drake , acpi4asus-user , Platform Driver , Linux Kernel Mailing List , linux-api@vger.kernel.org Subject: Re: [PATCH v3 09/11] platform/x86: asus-wmi: Control RGB keyboard backlight Message-ID: <20190508171229.GA22024@amd> References: <7acd57fe-604a-a96a-4ca2-a25bc88d6405@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > The WMI exposes two methods for controlling RGB keyboard backlight, whi= ch > > allows controlling: > > * RGB components in range 00 - ff, > > * Switch between 4 effects, > > * Switch between 3 effect speed modes, > > * Separately enable the backlight on boot, in the awake state (after dr= iver > > load), in sleep mode, and probably in something called shutdown mode = (no > > observable effects of enabling it are known so far). > > > > The configuration should be written to several sysfs parameter buffers > > which are then written via WMI by writing either 1 or 2 to the "kbbl_se= t" > > parameter. When reading the buffers the last written value is returned. > > > > If the 2 is written to "kbbl_set", the parameters will be reset on rebo= ot > > (temporary mode), 1 is permanent mode, parameters are retained. > > > > The calls use new 3-dword input buffer method call. > > > > The functionality is only enabled if corresponding DSTS methods return > > exact valid values. > > > > The following script demonstrates usage: > > > > echo Red [00 - ff] > > echo 33 > /sys/devices/platform/asus-nb-wmi/kbbl/kbbl_red > > echo Green [00 - ff] > > echo ff > /sys/devices/platform/asus-nb-wmi/kbbl/kbbl_green > > echo Blue [00 - ff] > > echo 0 > /sys/devices/platform/asus-nb-wmi/kbbl/kbbl_blue > > echo Mode: 0 - static color, 1 - breathing, 2 - color cycle, 3 - strobi= ng > > echo 0 > /sys/devices/platform/asus-nb-wmi/kbbl/kbbl_mode > > echo Speed for modes 1 and 2: 0 - slow, 1 - medium, 2 - fast > > echo 0 > /sys/devices/platform/asus-nb-wmi/kbbl/kbbl_speed > > echo Enable: 02 - on boot, before module load, 08 - awake, 20 - sleep, > > echo 2a or ff to set all > > echo 2a > /sys/devices/platform/asus-nb-wmi/kbbl/kbbl_flags > > echo Save: 1 - permanently, 2 - temporarily, reset after reboot > > echo 1 > /sys/devices/platform/asus-nb-wmi/kbbl/kbbl_set > > >=20 > Shouldn't be the LED subsystem driver for this? Yes, please. We have common interface for LED drivers; this needs to use it. Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --45Z9DzgjV8m4Oswq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlzTDf0ACgkQMOfwapXb+vJFGACfSBV9DLzKArrDcy1WFTMiUIRD adwAoKGN8uwzERJIj5yAWDJcBhtOauT3 =Pemh -----END PGP SIGNATURE----- --45Z9DzgjV8m4Oswq--