xref: /titanic_50/usr/src/cmd/hal/hald/solaris/devinfo_acpi.h (revision 79d2f1e1d69dd8621f962e48584f1e2434b3c837)
1 /***************************************************************************
2  *
3  * devinfo_acpi.h : definitions for acpi devices
4  *
5  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
6  * Use is subject to license terms.
7  *
8  * Licensed under the Academic Free License version 2.1
9  *
10  **************************************************************************/
11 
12 #pragma ident	"%Z%%M%	%I%	%E% SMI"
13 
14 #ifndef DEVINFO_ACPI_H
15 #define	DEVINFO_ACPI_H
16 
17 #include "devinfo.h"
18 
19 extern DevinfoDevHandler devinfo_acpi_handler;
20 extern DevinfoDevHandler devinfo_battery_handler;
21 extern DevinfoDevHandler devinfo_power_button_handler;
22 
23 #define	MINOR_SHIFT			8
24 #define	MINOR2TYPE(minor)		((minor) >> MINOR_SHIFT)
25 
26 /* Battery device types */
27 enum batt_type {
28 	BATT_TYPE_UNKNOWN = -1,
29 	BATT_TYPE_CBAT,
30 	BATT_TYPE_AC,
31 	BATT_TYPE_SBAT
32 };
33 
34 HalDevice *devinfo_battery_add_major(HalDevice *parent, di_node_t node,
35     char *devfs_path, char *device_type, gboolean rescan, HalDevice *battery_d);
36 void devinfo_battery_add_minor(HalDevice *parent, di_node_t node,
37     char *minor_path, dev_t dev);
38 void devinfo_battery_remove_minor(char *parent_devfs_path, gchar *udi);
39 void devinfo_battery_device_rescan(char *parent_devfs_path, gchar *udi);
40 const gchar *devinfo_battery_get_prober(HalDevice *d, int *timeout);
41 void devinfo_power_button_rescan(void);
42 void devinfo_brightness_hotkeys_rescan(char *subclass);
43 
44 void devinfo_lid_device_rescan(char *subclass, gchar *udi);
45 
46 #endif /* DEVINFO_ACPI_H */
47