I've started to create a kernel driver for my 3000 series lenovo, to try and sort out some of the brokenness. At the moment, the driver just polls a bit of memory (0xb9) on the embedded controller and emits a KEY_BRIGHTNESS_XXX INPUT event when it changes. It also expresses a backlight class for the panel, although setting the value doesn't do much yet.
Now the question: for debugging I want to dump all 255 registers of the embedded controller to userspace. In thinkpad_acpi this is done using /proc/acpi/ibm/ecdump but I really don't want to hack proc support into my tiny driver. Should I be using the mem or misc kernel class for this? debugfs? relayfs? All I want to do is be able to read all 255 bytes, and also change them individually if needed.
Ideas? Thanks.
While you're at it, do you think you could fix the fans? [adamw@lenovo build]$ ls /proc/acpi/fan/ [adamw@lenovo build]$ that's on my 3000 V100. According to smart kernel-type people I asked, the fact that there's nothing in /proc/acpi/fan means that the kernel can't control my fans, and the fact that my system frequently powers itself off due to overheating if I try and run a compile job more than five minutes long appears to back up this theory. They told me there is something hideously complicated that could be done to fix this, but it was beyond my feeble capacities. =)