hal/hald/linux2 acpi.c,1.46,1.47
Richard Hughes
hughsient at freedesktop.org
Sat Feb 18 15:11:25 PST 2006
Update of /cvs/hal/hal/hald/linux2
In directory gabe:/tmp/cvs-serv20068/hald/linux2
Modified Files:
acpi.c
Log Message:
2006-02-18 Richard Hughes <richard at hughsie.com>
* hald/linux2/acpi.c (laptop_panel_refresh, acpi_synthesize_hotplug_events): add handler for omnibook displays.
* tools/hal-system-lcd-get-brightness, tools/hal-system-lcd-set-brightness: Add omnibook support.
* hald/linux2/acpi.c (acpi_synthesize_display): don't prepend the acpi/ here as the new omnibook isn't under /proc/acpi. See http://bugzilla.gnome.org/show_bug.cgi?id=331458 for details.
Index: acpi.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/acpi.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- acpi.c 29 Jan 2006 17:07:54 -0000 1.46
+++ acpi.c 18 Feb 2006 23:11:23 -0000 1.47
@@ -47,6 +47,7 @@
ACPI_TYPE_IBM_DISPLAY,
ACPI_TYPE_PANASONIC_DISPLAY,
ACPI_TYPE_SONY_DISPLAY,
+ ACPI_TYPE_OMNIBOOK_DISPLAY,
ACPI_TYPE_BUTTON
};
@@ -693,6 +694,10 @@
type = "sony";
desc = "Sony LCD Panel";
br_levels = 8;
+ } else if (acpi_type == ACPI_TYPE_OMNIBOOK_DISPLAY) {
+ type = "omnibook";
+ desc = "Omnibook LCD Panel";
+ br_levels = 8;
} else {
type = "unknown";
desc = "Unknown LCD Panel";
@@ -837,7 +842,7 @@
acpi_synthesize_display (char *vendor, char *display, int method)
{
gchar path[HAL_PATH_MAX];
- snprintf (path, sizeof (path), "%s/acpi/%s/%s", get_hal_proc_path (), vendor, display);
+ snprintf (path, sizeof (path), "%s/%s/%s", get_hal_proc_path (), vendor, display);
/*
* We do not use acpi_synthesize as the target is not a directory full
* of directories, but a flat file list.
@@ -903,11 +908,13 @@
* When the sysfs code comes into mainline, we can use that, but until
* then we can supply an abstracted interface to the user.
*/
- acpi_synthesize_display ("toshiba", "lcd", ACPI_TYPE_TOSHIBA_DISPLAY);
- acpi_synthesize_display ("asus", "brn", ACPI_TYPE_ASUS_DISPLAY);
- acpi_synthesize_display ("pcc", "brightness", ACPI_TYPE_PANASONIC_DISPLAY);
- acpi_synthesize_display ("ibm", "brightness", ACPI_TYPE_IBM_DISPLAY);
- acpi_synthesize_display ("sony", "brightness", ACPI_TYPE_SONY_DISPLAY);
+ acpi_synthesize_display ("acpi/toshiba", "lcd", ACPI_TYPE_TOSHIBA_DISPLAY);
+ acpi_synthesize_display ("acpi/asus", "brn", ACPI_TYPE_ASUS_DISPLAY);
+ acpi_synthesize_display ("acpi/pcc", "brightness", ACPI_TYPE_PANASONIC_DISPLAY);
+ acpi_synthesize_display ("acpi/ibm", "brightness", ACPI_TYPE_IBM_DISPLAY);
+ acpi_synthesize_display ("acpi/sony", "brightness", ACPI_TYPE_SONY_DISPLAY);
+ /* onmibook does not live under acpi GNOME#331458 */
+ acpi_synthesize_display ("omnibook", "lcd", ACPI_TYPE_OMNIBOOK_DISPLAY);
/* setup timer for things that we need to poll */
g_timeout_add (ACPI_POLL_INTERVAL,
@@ -1022,6 +1029,14 @@
.remove = acpi_generic_remove
};
+static ACPIDevHandler acpidev_handler_laptop_panel_omnibook = {
+ .acpi_type = ACPI_TYPE_OMNIBOOK_DISPLAY,
+ .add = acpi_generic_add,
+ .compute_udi = acpi_generic_compute_udi,
+ .refresh = laptop_panel_refresh,
+ .remove = acpi_generic_remove
+};
+
static ACPIDevHandler acpidev_handler_button = {
.acpi_type = ACPI_TYPE_BUTTON,
.add = acpi_generic_add,
@@ -1049,6 +1064,7 @@
&acpidev_handler_laptop_panel_panasonic,
&acpidev_handler_laptop_panel_asus,
&acpidev_handler_laptop_panel_sony,
+ &acpidev_handler_laptop_panel_omnibook,
NULL
};
More information about the hal-commit
mailing list