[PATCH 2/3] hald-linux: Add keyboard backlight support for MacBook Air
Henrik Rydberg
rydberg at euromail.se
Thu Oct 9 08:05:37 PDT 2008
The keyboard backlight of the MacBook Air can be controlled via the
applesmc sysfs interface. This patch defines a new device which uses
hald-addon-generic-kbd-backlight to add keyboard backlight
functionality via the applesmc.
Signed-off-by: Henrik Rydberg <rydberg at euromail.se>
---
fdi/policy/10osvendor/10-macbookpro-utils.fdi | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/fdi/policy/10osvendor/10-macbookpro-utils.fdi b/fdi/policy/10osvendor/10-macbookpro-utils.fdi
index 60882a2..81d1e28 100644
--- a/fdi/policy/10osvendor/10-macbookpro-utils.fdi
+++ b/fdi/policy/10osvendor/10-macbookpro-utils.fdi
@@ -13,6 +13,9 @@
<match key="system.hardware.product" string_outof="MacBookPro1,1;MacBookPro1,2;MacBookPro2,1;MacBookPro2,2">
<spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
</match>
+ <match key="system.hardware.product" string_outof="MacBookAir1,1">
+ <spawn udi="/org/freedesktop/Hal/devices/applesmc_keyboard_backlight"/>
+ </match>
</match>
</match>
</device>
@@ -43,5 +46,15 @@
<merge key="keyboard_backlight.num_levels" type="int">256</merge>
</match>
</device>
+ <device>
+ <match key="info.udi" string="/org/freedesktop/Hal/devices/applesmc_keyboard_backlight">
+ <append key="info.capabilities" type="strlist">keyboard_backlight</append>
+ <merge key="info.product" type="string">Applesmc Keyboard Backlight</merge>
+ <merge key="keyboard_backlight.num_levels" type="int">256</merge>
+ <merge key="keyboard_backlight.access_method" type="string">custom</merge>
+ <merge key="linux.sysfs_path" type="string">/sys/class/leds/smc::kbd_backlight</merge>
+ <append key="info.addons" type="strlist">hald-addon-generic-kbd-backlight</append>
+ </match>
+ </device>
</deviceinfo>
--
1.5.6.3
More information about the hal
mailing list