On Wed, 2009-03-11 at 01:11 +0800, Matthew Garrett wrote: > On Tue, Mar 10, 2009 at 04:03:31PM +0800, Zhang Rui wrote: > > sort the _BCL packge in case it's reversed. > > What code actually uses this? A later patch seems to check it in the > indexed case, but I can't find a reference to using it in the > non-indexed case. > It's just used in the indexed case. In bug http://bugzilla.kernel.org/show_bug.cgi?id=12249 Name (PCTG, Package (0x10) { 0x64, 0x5A, 0x55, 0x50, 0x4B, 0x46, 0x41, 0x3C, 0x37, 0x32, 0x2D, 0x28, 0x23, 0x1E, 0x19, 0x14 }) Method (_BCL, 0, NotSerialized) { Return (PCTG) } Method (_BQC, 0, NotSerialized) { Return (LBTN) } device->brightness->levels[] = {0x64, 0x5A, 0x14, 0x19,..., 0x5a, 0x64}; The index value returned by _BQC is the index in the PCTG package. if the _BCL package is in a reversed order, we can not use this index to get the value in device->brightness->levels[]. For example, if the current brightness is 0x64, _BQC returns 0 in this case, but we can not translate this to value 0x14, we need a flag to tell us that _BCL is reversed. But in the non-indexed case, _BQC always returns a percentage that can be used directly by ACPI video driver, i.e. we don't need to parse device->brightness->levels to get the real value. so we don't need to check the device->brightness->flags._BCL_reversed bit. thanks, rui -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html