[ltp] Re: Thinkpad keyboard backlight ACPI interface

Pali Rohár linux-thinkpad@linux-thinkpad.org
Sun, 9 Aug 2015 23:26:04 +0200


--nextPart1505648.7bD7P23MIJ
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable

On Sunday 09 August 2015 23:20:26 Fabio D'Urso wrote:
> On Tuesday, July 28, 2015 02:05:03 PM Pali Roh=C3=A1r wrote:
> > On Tuesday 28 July 2015 13:56:32 Bj=C3=B8rn Mork wrote:
> > > Pali Roh=C3=A1r <pali.rohar@gmail.com> writes:
> > > > On Tuesday 28 July 2015 13:17:58 Bj=C3=B8rn Mork wrote:
> > > >> Pali Roh=C3=A1r <pali.rohar@gmail.com> writes:
> > > >> > I would like to write kernel patch for thinkpad_acpi.c to
> > > >> > support keyboard backlight (like other modules in
> > > >> > drivers/platform/x86/ tree),
> > > >> > but last missing information is how to detect current level
> > > >> > of brightness and check if backlight is supported...
> > > >>=20
> > > >> Based on the code you posted, I would assume that MLCG returns
> > > >> the current brightness level.  Did you test that?
> > > >=20
> > > > Of course and it returns:
> > > >=20
> > > > 0x50200 - off
> > > > 0x50201 - level 1
> > > > 0x50202 - level 2
> > > >=20
> > > > But I do not understand why it returns 0x5020{0,1,2} and not
> > > > only 0,1,2.
> > >=20
> > > Looks like it might have several bitfields with different
> > > meanings. You'll probably have to guess what they are.
> >=20
> > Yes... Last number looks like current level. But what others? Maybe
> > it represent if backlight feature is supported? Do not know.
> >=20
> > But it would be good, if more people with Thinkpad machines with
> > and also without keyboard backligth send output from "MLCG" ACPI
> > call.
>=20
> I can confirm that everything is as you described also on my W541
> (with backlight), except for the line
>  OperationRegion (MNVS, SystemMemory, 0xCCD7D018, 0x1000)
> which is actually
>  OperationRegion (MNVS, SystemMemory, 0x7CE7D018, 0x1000)
>=20
> The rest of the DSDT code is like yours, MLCG always returns
> 0x5020{0,1,2} and MLCS {0,1,2} works as expected and returns 0x0.
>=20
> I have also toggled the Fn lock and Ctrl/Fn swapping, but the
> mysterious 0x5020n did not change. I have the latest BIOS version
> (2.21).
>=20
> Fabio D'Urso
>=20

Thanks for confirmation. Now I need dumps also from machines without=20
backlight keyboard, but with MLCG method.

=2D-=20
Pali Roh=C3=A1r
pali.rohar@gmail.com

--nextPart1505648.7bD7P23MIJ
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEABECAAYFAlXHxWwACgkQi/DJPQPkQ1LIIgCgxzHK6UisaodNvuI5XhBAufU9
UvMAn15HW1MGQ4vmm3T0kDnQQbLsvQc1
=Ojn5
-----END PGP SIGNATURE-----

--nextPart1505648.7bD7P23MIJ--