There are better ways to spend a Saturday afternoon than ripping out a /proc interface, replacing it with sysfs, and then getting carried away by making your driver integrate, where possible, into the various kernel subsystems.

In lieu of this, a few days ago I ripped out the last vestiges of “hotkey” support - it isn’t required on modern Acer laptops (either the keys work out-of-the-box, or they generate the relevant scan codes and can be easily mapped to keycodes).

To summarise today’s efforts:

1) Ripped out all remaining vestiges of /proc (it’s full of nearly impossible to read code, copied from other drivers, who in turn had little idea what the interface code did. proc is a case of square peg, round hole).

2) Converted acer_acpi to create a new platform driver (i.e. a driver that doesn’t really fit anywhere else) called “acer-laptop” and assign wireless, bluetooth and the experimental 3G to this platform driver (if you assign the properties to ACPI, then end up buried deep in the bowels of sys)

The mail LED is moved to the LED subsystem as acer:mail (in accordance with how asus-laptop implements their mail LED).

Brightness (WMID only) is moved to the backlight subsystem - it looks like it might even work (it doesn’t crash hideously, or segfault, at least), but I don’t have the hardware, so it’s otherwise completely untested.

3) Discovered that as far as Linux’s ACPI implementation is concerned, pnp0c14 != PNP0C14. This minor little detail meant that on my machine, using the older AMW0 interface, the acpi_driver didn’t run its attached operation functions (e.g. add, remove and resume, which in turn call other functions that are required to set up all functionality)

I may even get round to submitting this upstream one day (although I’m certain there’s more clean up work/ refactoring that can be done first with the removal of proc).

Post A Comment

You must be logged in to post a comment.