Skip to contentSkip to conversation

Add Dell laptop backlight brightness display

PATCH RESEND Michael E Brown 2 participants 2 messages Feb 7, 2006

lore
Share & tools
lore
#0 lore raw

Matthew, Andrew,
(sorry, I'm not subscribed to l-k, so I'm just starting a new thread.)

I would _strongly_ suggest that this patch _not_ go in. This driver
uses hardcoded values that are subject to change without notice. It is perfectly legitimate for future versions of Dell BIOS to interpret pokes to cmos location 0x99 as the command to format your hard drive.

The proper way to do this is using libsmbios. The project page is at
http://linux.dell.com/libsmbios/main. Using libsmbios, plus the already-included dcdbas kernel driver, you can correctly do brightness control. If you would like to write a proper brightness control, it can be done entirely in user space, and I could help you.

There are specific smbios structures, proprietary to Dell, that are
documented in libsmbios. These structures, properly decoded, tell the proper port to use to control this. This is guaranteed to work across BIOS versions and not to format your hard drive. :-)

Libsmbios is 100% open source (dual GPL/OSL license).

--
Michael Brown
Libsmbios maintainer

#1 lore raw
Quoted 4 lines · Michael E Brown

I would _strongly_ suggest that this patch _not_ go in. This driver
uses hardcoded values that are subject to change without notice. It is perfectly legitimate for future versions of Dell BIOS to interpret pokes to cmos location 0x99 as the command to format your hard drive.

I managed to send the wrong patch - the Dell one only reads from nvram. If nvram reads are likely to reformat your hard drive, I think Dell needs to reconsider its BIOS design :)

More seriously, a quick scan of libsmbios hasn't revealed any method for obtaining the screen brightness. It's possible that I'm blind (I'm certainly slightly drunk), but can you give a pointer to the correct mechanism for making this call?

Thanks,

Signature · 1 line
Matthew Garrett | [email protected]