17b840e52Sphitran /*************************************************************************** 27b840e52Sphitran * 37b840e52Sphitran * devinfo_acpi.h : definitions for acpi devices 47b840e52Sphitran * 5d2ec54f7Sphitran * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 67b840e52Sphitran * Use is subject to license terms. 77b840e52Sphitran * 87b840e52Sphitran * Licensed under the Academic Free License version 2.1 97b840e52Sphitran * 107b840e52Sphitran **************************************************************************/ 117b840e52Sphitran 127b840e52Sphitran #ifndef DEVINFO_ACPI_H 137b840e52Sphitran #define DEVINFO_ACPI_H 147b840e52Sphitran 157b840e52Sphitran #include "devinfo.h" 167b840e52Sphitran 177b840e52Sphitran extern DevinfoDevHandler devinfo_acpi_handler; 18d2ec54f7Sphitran extern DevinfoDevHandler devinfo_power_button_handler; 197b840e52Sphitran 207b840e52Sphitran #define MINOR_SHIFT 8 217b840e52Sphitran #define MINOR2TYPE(minor) ((minor) >> MINOR_SHIFT) 227b840e52Sphitran 237b840e52Sphitran /* Battery device types */ 247b840e52Sphitran enum batt_type { 257b840e52Sphitran BATT_TYPE_UNKNOWN = -1, 267b840e52Sphitran BATT_TYPE_CBAT, 277b840e52Sphitran BATT_TYPE_AC, 287b840e52Sphitran BATT_TYPE_SBAT 297b840e52Sphitran }; 307b840e52Sphitran 317b840e52Sphitran HalDevice *devinfo_battery_add_major(HalDevice *parent, di_node_t node, 327b840e52Sphitran char *devfs_path, char *device_type, gboolean rescan, HalDevice *battery_d); 3359066d3cSphitran void devinfo_acpi_add_minor(HalDevice *parent, di_node_t node, 347b840e52Sphitran char *minor_path, dev_t dev); 357b840e52Sphitran void devinfo_battery_remove_minor(char *parent_devfs_path, gchar *udi); 36*076d97abSPhi Tran void devinfo_battery_rescan(char *parent_devfs_path, gchar *udi); 3759066d3cSphitran const gchar *devinfo_acpi_get_prober(HalDevice *d, int *timeout); 38*076d97abSPhi Tran void devinfo_power_button_event(void); 39*076d97abSPhi Tran void devinfo_brightness_hotkeys_event(char *subclass); 40d2ec54f7Sphitran 41*076d97abSPhi Tran void devinfo_lid_event(char *subclass, gchar *udi); 42*076d97abSPhi Tran gboolean devinfo_lid_rescan(HalDevice *d); 437b840e52Sphitran 447b840e52Sphitran #endif /* DEVINFO_ACPI_H */ 45