I'm having a go at writing an ACPI driver for changing the brightness of my laptop screen from within Haiku. To get started, I have copied the source code for the battery driver and threw most of the function contents out. After copying the driver to /boot/home/add-ons/kernel/drivers/power and rebooting, I can get some output from 'cat /dev/power/acpi_backlight'. Rene told me the driver should unload after that, and the syslog shows this indeed:
KERN: acpi_backlight: acpi_backlight_init_device
KERN: acpi_backlight: acpi_backlight_open
KERN: acpi_backlight: acpi_backlight_read
Last message repeated 1 time
KERN: acpi_backlight: acpi_backlight_close
KERN: acpi_backlight: acpi_backlight_free
KERN: acpi_backlight: acpi_backlight_uninit_device
However, after changing the driver, recompiling and copying it again, the changes are not visible on a new cat. Listimage shows it's still loaded:
$ listimage 1 | grep backlight
349 /boot/system/add-ons/kernel/drivers/power/acpi_backlight 0x807f4000 0x807f6000 0 0
For the atheros driver, issuing ifconfig down, makes the driver print to the syslog:
KERN: [net/atheroswifi/0] compat_free()
And also here, listimage still shows it.
So, what is broken? Or more likely, what am I doing wrong? :)
I just discovered this message: http://article.gmane.org/gmane.os.haiku.devel/8575
I'll try placing the driver under /boot/system...
Get latest updates about Open Source Projects, Conferences and News.