From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [PATCH v3 09/11] platform/x86: asus-wmi: Control RGB keyboard backlight Date: Wed, 8 May 2019 19:12:29 +0200 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" Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-api@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--