xref: /titanic_44/usr/src/cmd/hal/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi (revision 18c2aff776a775d34a4c9893a4c72e0434d68e36)
1<?xml version="1.0" encoding="UTF-8"?>
2
3<deviceinfo version="0.2">
4
5  <device>
6    <match key="info.category" string="laptop_panel">
7      <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.LaptopPanel</append>
8
9      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">SetBrightness</append>
10      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist">i</append>
11      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist">brightness_value</append>
12      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-set-brightness</append>
13
14      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">GetBrightness</append>
15      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist"></append>
16      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist"></append>
17      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-get-brightness</append>
18    </match>
19  </device>
20
21  <!-- On some borken laptops, the brightness control is all done in hardware
22       but the hardware also synthesizes keypresses when the brightness is
23       changed. This gives power manager software problems as the brightness
24       can get into a feedback state so the panel flashes uncontrollably.
25       This is a hardware "feature" seen on IBM x31 laptops. -->
26  <device>
27    <match key="info.category" string="laptop_panel">
28      <match key="/org/freedesktop/Hal/devices/computer:smbios.system.manufacturer" string="IBM">
29        <match key="/org/freedesktop/Hal/devices/computer:smbios.system.version" string="ThinkPad X31">
30          <merge key="laptop_panel.brightness_in_hardware" type="bool">true</merge>
31        </match>
32      </match>
33    </match>
34  </device>
35
36  <!-- this is for Macbook Pro (LCD panel, light sensor, keyboard backlight) -->
37  <device>
38    <match key="system.kernel.name" string="Linux">
39      <match key="smbios.system.manufacturer" string="Apple Computer, Inc.">
40        <match key="smbios.system.product" string="MacBookPro1,1">
41          <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_light_sensor"/>
42          <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight"/>
43          <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
44        </match>
45      </match>
46    </match>
47  </device>
48  <device>
49    <match key="info.udi" string="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel">
50      <append key="info.capabilities" type="strlist">laptop_panel</append>
51      <merge key="info.product" type="string">MacBook Pro Laptop Panel</merge>
52      <merge key="laptop_panel.access_method" type="string">custom</merge>
53      <merge key="laptop_panel.num_levels" type="int">229</merge>
54      <append key="info.addons" type="strlist">hald-addon-macbookpro-backlight</append>
55    </match>
56  </device>
57  <device>
58    <match key="info.udi" string="/org/freedesktop/Hal/devices/macbook_pro_light_sensor">
59      <append key="info.capabilities" type="strlist">light_sensor</append>
60      <merge key="info.product" type="string">MacBook Pro Light Sensor</merge>
61      <merge key="light_sensor.num_sensors" type="int">2</merge>
62      <merge key="light_sensor.num_levels" type="int">256</merge>
63      <append key="light_sensor.sensor_locations" type="strlist">right</append>
64      <append key="light_sensor.sensor_locations" type="strlist">left</append>
65    </match>
66  </device>
67  <device>
68    <match key="info.udi" string="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight">
69      <append key="info.capabilities" type="strlist">keyboard_backlight</append>
70      <merge key="info.product" type="string">MacBook Pro Keyboard Backlight</merge>
71      <merge key="keyboard_backlight.num_levels" type="int">256</merge>
72    </match>
73  </device>
74
75</deviceinfo>
76