Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
95174c3e
Commit
95174c3e
authored
22 years ago
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: Move per-componet defines into component files. Only share in headers what is needed by
multiple users.
parent
593c70f0
No related merge requests found
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
144 additions
and
173 deletions
+144
-173
drivers/acpi/ac.c
drivers/acpi/ac.c
+11
-0
drivers/acpi/acpi_drivers.h
drivers/acpi/acpi_drivers.h
+6
-173
drivers/acpi/battery.c
drivers/acpi/battery.c
+13
-0
drivers/acpi/button.c
drivers/acpi/button.c
+27
-0
drivers/acpi/debug.c
drivers/acpi/debug.c
+3
-0
drivers/acpi/ec.c
drivers/acpi/ec.c
+8
-0
drivers/acpi/fan.c
drivers/acpi/fan.c
+8
-0
drivers/acpi/pci_link.c
drivers/acpi/pci_link.c
+7
-0
drivers/acpi/pci_root.c
drivers/acpi/pci_root.c
+5
-0
drivers/acpi/power.c
drivers/acpi/power.c
+10
-0
drivers/acpi/processor.c
drivers/acpi/processor.c
+12
-0
drivers/acpi/scan.c
drivers/acpi/scan.c
+6
-0
drivers/acpi/system.c
drivers/acpi/system.c
+10
-0
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+18
-0
No files found.
drivers/acpi/ac.c
View file @
95174c3e
...
...
@@ -40,6 +40,17 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION
(
ACPI_AC_DRIVER_NAME
);
MODULE_LICENSE
(
"GPL"
);
#define ACPI_AC_COMPONENT 0x00020000
#define ACPI_AC_CLASS "ac_adapter"
#define ACPI_AC_HID "ACPI0003"
#define ACPI_AC_DRIVER_NAME "ACPI AC Adapter Driver"
#define ACPI_AC_DEVICE_NAME "AC Adapter"
#define ACPI_AC_FILE_STATE "state"
#define ACPI_AC_NOTIFY_STATUS 0x80
#define ACPI_AC_STATUS_OFFLINE 0x00
#define ACPI_AC_STATUS_ONLINE 0x01
#define ACPI_AC_STATUS_UNKNOWN 0xFF
int
acpi_ac_add
(
struct
acpi_device
*
device
);
int
acpi_ac_remove
(
struct
acpi_device
*
device
,
int
type
);
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/acpi_drivers.h
View file @
95174c3e
...
...
@@ -32,107 +32,17 @@
#define ACPI_MAX_STRING 80
/* --------------------------------------------------------------------------
ACPI Bus
-------------------------------------------------------------------------- */
#define ACPI_BUS_COMPONENT 0x00010000
#define ACPI_BUS_CLASS "system_bus"
#define ACPI_BUS_HID "ACPI_BUS"
#define ACPI_BUS_DRIVER_NAME "ACPI Bus Driver"
#define ACPI_BUS_DEVICE_NAME "System Bus"
/* --------------------------------------------------------------------------
AC Adapter
-------------------------------------------------------------------------- */
#define ACPI_AC_COMPONENT 0x00020000
#define ACPI_AC_CLASS "ac_adapter"
#define ACPI_AC_HID "ACPI0003"
#define ACPI_AC_DRIVER_NAME "ACPI AC Adapter Driver"
#define ACPI_AC_DEVICE_NAME "AC Adapter"
#define ACPI_AC_FILE_STATE "state"
#define ACPI_AC_NOTIFY_STATUS 0x80
#define ACPI_AC_STATUS_OFFLINE 0x00
#define ACPI_AC_STATUS_ONLINE 0x01
#define ACPI_AC_STATUS_UNKNOWN 0xFF
/* --------------------------------------------------------------------------
Battery
-------------------------------------------------------------------------- */
#define ACPI_BATTERY_COMPONENT 0x00040000
#define ACPI_BATTERY_CLASS "battery"
#define ACPI_BATTERY_HID "PNP0C0A"
#define ACPI_BATTERY_DRIVER_NAME "ACPI Battery Driver"
#define ACPI_BATTERY_DEVICE_NAME "Battery"
#define ACPI_BATTERY_FILE_INFO "info"
#define ACPI_BATTERY_FILE_STATUS "state"
#define ACPI_BATTERY_FILE_ALARM "alarm"
#define ACPI_BATTERY_NOTIFY_STATUS 0x80
#define ACPI_BATTERY_NOTIFY_INFO 0x81
#define ACPI_BATTERY_UNITS_WATTS "mW"
#define ACPI_BATTERY_UNITS_AMPS "mA"
/* --------------------------------------------------------------------------
Button
-------------------------------------------------------------------------- */
#define ACPI_SYSTEM_COMPONENT 0x02000000
#define ACPI_BUTTON_COMPONENT 0x00080000
#define ACPI_BUTTON_DRIVER_NAME "ACPI Button Driver"
#define ACPI_BUTTON_CLASS "button"
#define ACPI_BUTTON_FILE_INFO "info"
#define ACPI_BUTTON_TYPE_UNKNOWN 0x00
#define ACPI_BUTTON_NOTIFY_STATUS 0x80
/* _HID definitions */
#define ACPI_BUTTON_SUBCLASS_POWER "power"
#define ACPI_BUTTON_HID_POWER "PNP0C0C"
#define ACPI_POWER_HID "ACPI_PWR"
#define ACPI_PROCESSOR_HID "ACPI_CPU"
#define ACPI_SYSTEM_HID "ACPI_SYS"
#define ACPI_THERMAL_HID "ACPI_THM"
#define ACPI_BUTTON_HID_POWERF "ACPI_FPB"
#define ACPI_BUTTON_DEVICE_NAME_POWER "Power Button (CM)"
#define ACPI_BUTTON_DEVICE_NAME_POWERF "Power Button (FF)"
#define ACPI_BUTTON_TYPE_POWER 0x01
#define ACPI_BUTTON_TYPE_POWERF 0x02
#define ACPI_BUTTON_SUBCLASS_SLEEP "sleep"
#define ACPI_BUTTON_HID_SLEEP "PNP0C0E"
#define ACPI_BUTTON_HID_SLEEPF "ACPI_FSB"
#define ACPI_BUTTON_DEVICE_NAME_SLEEP "Sleep Button (CM)"
#define ACPI_BUTTON_DEVICE_NAME_SLEEPF "Sleep Button (FF)"
#define ACPI_BUTTON_TYPE_SLEEP 0x03
#define ACPI_BUTTON_TYPE_SLEEPF 0x04
#define ACPI_BUTTON_SUBCLASS_LID "lid"
#define ACPI_BUTTON_HID_LID "PNP0C0D"
#define ACPI_BUTTON_DEVICE_NAME_LID "Lid Switch"
#define ACPI_BUTTON_TYPE_LID 0x05
/* --------------------------------------------------------------------------
Embedded Controller
-------------------------------------------------------------------------- */
#define ACPI_EC_COMPONENT 0x00100000
#define ACPI_EC_CLASS "embedded_controller"
#define ACPI_EC_HID "PNP0C09"
#define ACPI_EC_DRIVER_NAME "ACPI Embedded Controller Driver"
#define ACPI_EC_DEVICE_NAME "Embedded Controller"
#define ACPI_EC_FILE_INFO "info"
/* --------------------------------------------------------------------------
Fan
-------------------------------------------------------------------------- */
#define ACPI_FAN_COMPONENT 0x00200000
#define ACPI_FAN_CLASS "fan"
#define ACPI_FAN_HID "PNP0C0B"
#define ACPI_FAN_DRIVER_NAME "ACPI Fan Driver"
#define ACPI_FAN_DEVICE_NAME "Fan"
#define ACPI_FAN_FILE_STATE "state"
#define ACPI_FAN_NOTIFY_STATUS 0x80
/* --------------------------------------------------------------------------
...
...
@@ -145,22 +55,10 @@
/* ACPI PCI Root Bridge (pci_root.c) */
#define ACPI_PCI_ROOT_CLASS "pci_bridge"
#define ACPI_PCI_ROOT_HID "PNP0A03"
#define ACPI_PCI_ROOT_DRIVER_NAME "ACPI PCI Root Bridge Driver"
#define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge"
void
acpi_pci_get_translations
(
acpi_pci_id
*
id
,
u64
*
mem_tra
,
u64
*
io_tra
);
/* ACPI PCI Interrupt Link (pci_link.c) */
#define ACPI_PCI_LINK_CLASS "pci_irq_routing"
#define ACPI_PCI_LINK_HID "PNP0C0F"
#define ACPI_PCI_LINK_DRIVER_NAME "ACPI PCI Interrupt Link Driver"
#define ACPI_PCI_LINK_DEVICE_NAME "PCI Interrupt Link"
#define ACPI_PCI_LINK_FILE_INFO "info"
#define ACPI_PCI_LINK_FILE_STATUS "state"
int
acpi_pci_link_check
(
void
);
int
acpi_pci_link_get_irq
(
acpi_handle
handle
,
int
index
);
...
...
@@ -182,17 +80,6 @@ int acpi_pci_bind_root (struct acpi_device *device, acpi_pci_id *id, struct pci_
Power Resource
-------------------------------------------------------------------------- */
#define ACPI_POWER_COMPONENT 0x00800000
#define ACPI_POWER_CLASS "power_resource"
#define ACPI_POWER_HID "ACPI_PWR"
#define ACPI_POWER_DRIVER_NAME "ACPI Power Resource Driver"
#define ACPI_POWER_DEVICE_NAME "Power Resource"
#define ACPI_POWER_FILE_INFO "info"
#define ACPI_POWER_FILE_STATUS "state"
#define ACPI_POWER_RESOURCE_STATE_OFF 0x00
#define ACPI_POWER_RESOURCE_STATE_ON 0x01
#define ACPI_POWER_RESOURCE_STATE_UNKNOWN 0xFF
#ifdef CONFIG_ACPI_POWER
int
acpi_power_get_inferred_state
(
struct
acpi_device
*
device
);
...
...
@@ -204,18 +91,6 @@ int acpi_power_transition (struct acpi_device *device, int state);
Processor
-------------------------------------------------------------------------- */
#define ACPI_PROCESSOR_COMPONENT 0x01000000
#define ACPI_PROCESSOR_CLASS "processor"
#define ACPI_PROCESSOR_HID "ACPI_CPU"
#define ACPI_PROCESSOR_DRIVER_NAME "ACPI Processor Driver"
#define ACPI_PROCESSOR_DEVICE_NAME "Processor"
#define ACPI_PROCESSOR_FILE_INFO "info"
#define ACPI_PROCESSOR_FILE_POWER "power"
#define ACPI_PROCESSOR_FILE_PERFORMANCE "performance"
#define ACPI_PROCESSOR_FILE_THROTTLING "throttling"
#define ACPI_PROCESSOR_FILE_LIMIT "limit"
#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
#define ACPI_PROCESSOR_NOTIFY_POWER 0x81
#define ACPI_PROCESSOR_LIMIT_NONE 0x00
#define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01
#define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02
...
...
@@ -223,48 +98,6 @@ int acpi_power_transition (struct acpi_device *device, int state);
int
acpi_processor_set_thermal_limit
(
acpi_handle
handle
,
int
type
);
/* --------------------------------------------------------------------------
System
-------------------------------------------------------------------------- */
#define ACPI_SYSTEM_COMPONENT 0x02000000
#define ACPI_SYSTEM_CLASS "system"
#define ACPI_SYSTEM_HID "ACPI_SYS"
#define ACPI_SYSTEM_DRIVER_NAME "ACPI System Driver"
#define ACPI_SYSTEM_DEVICE_NAME "System"
#define ACPI_SYSTEM_FILE_INFO "info"
#define ACPI_SYSTEM_FILE_EVENT "event"
#define ACPI_SYSTEM_FILE_ALARM "alarm"
#define ACPI_SYSTEM_FILE_DSDT "dsdt"
#define ACPI_SYSTEM_FILE_FADT "fadt"
#define ACPI_SYSTEM_FILE_SLEEP "sleep"
#define ACPI_SYSTEM_FILE_DEBUG_LAYER "debug_layer"
#define ACPI_SYSTEM_FILE_DEBUG_LEVEL "debug_level"
/* --------------------------------------------------------------------------
Thermal Zone
-------------------------------------------------------------------------- */
#define ACPI_THERMAL_COMPONENT 0x04000000
#define ACPI_THERMAL_CLASS "thermal_zone"
#define ACPI_THERMAL_HID "ACPI_THM"
#define ACPI_THERMAL_DRIVER_NAME "ACPI Thermal Zone Driver"
#define ACPI_THERMAL_DEVICE_NAME "Thermal Zone"
#define ACPI_THERMAL_FILE_STATE "state"
#define ACPI_THERMAL_FILE_TEMPERATURE "temperature"
#define ACPI_THERMAL_FILE_TRIP_POINTS "trip_points"
#define ACPI_THERMAL_FILE_COOLING_MODE "cooling_mode"
#define ACPI_THERMAL_FILE_POLLING_FREQ "polling_frequency"
#define ACPI_THERMAL_NOTIFY_TEMPERATURE 0x80
#define ACPI_THERMAL_NOTIFY_THRESHOLDS 0x81
#define ACPI_THERMAL_NOTIFY_DEVICES 0x82
#define ACPI_THERMAL_NOTIFY_CRITICAL 0xF0
#define ACPI_THERMAL_NOTIFY_HOT 0xF1
#define ACPI_THERMAL_MODE_ACTIVE 0x00
#define ACPI_THERMAL_MODE_PASSIVE 0x01
#define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff"
/* --------------------------------------------------------------------------
Debug Support
-------------------------------------------------------------------------- */
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/battery.c
View file @
95174c3e
...
...
@@ -46,6 +46,19 @@ MODULE_LICENSE("GPL");
#define ACPI_BATTERY_FORMAT_BIF "NNNNNNNNNSSSS"
#define ACPI_BATTERY_FORMAT_BST "NNNN"
#define ACPI_BATTERY_COMPONENT 0x00040000
#define ACPI_BATTERY_CLASS "battery"
#define ACPI_BATTERY_HID "PNP0C0A"
#define ACPI_BATTERY_DRIVER_NAME "ACPI Battery Driver"
#define ACPI_BATTERY_DEVICE_NAME "Battery"
#define ACPI_BATTERY_FILE_INFO "info"
#define ACPI_BATTERY_FILE_STATUS "state"
#define ACPI_BATTERY_FILE_ALARM "alarm"
#define ACPI_BATTERY_NOTIFY_STATUS 0x80
#define ACPI_BATTERY_NOTIFY_INFO 0x81
#define ACPI_BATTERY_UNITS_WATTS "mW"
#define ACPI_BATTERY_UNITS_AMPS "mA"
static
int
acpi_battery_add
(
struct
acpi_device
*
device
);
static
int
acpi_battery_remove
(
struct
acpi_device
*
device
,
int
type
);
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/button.c
View file @
95174c3e
...
...
@@ -40,6 +40,33 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION
(
ACPI_BUTTON_DRIVER_NAME
);
MODULE_LICENSE
(
"GPL"
);
#define ACPI_BUTTON_COMPONENT 0x00080000
#define ACPI_BUTTON_DRIVER_NAME "ACPI Button Driver"
#define ACPI_BUTTON_CLASS "button"
#define ACPI_BUTTON_FILE_INFO "info"
#define ACPI_BUTTON_TYPE_UNKNOWN 0x00
#define ACPI_BUTTON_NOTIFY_STATUS 0x80
#define ACPI_BUTTON_SUBCLASS_POWER "power"
#define ACPI_BUTTON_HID_POWER "PNP0C0C"
#define ACPI_BUTTON_DEVICE_NAME_POWER "Power Button (CM)"
#define ACPI_BUTTON_DEVICE_NAME_POWERF "Power Button (FF)"
#define ACPI_BUTTON_TYPE_POWER 0x01
#define ACPI_BUTTON_TYPE_POWERF 0x02
#define ACPI_BUTTON_SUBCLASS_SLEEP "sleep"
#define ACPI_BUTTON_HID_SLEEP "PNP0C0E"
#define ACPI_BUTTON_DEVICE_NAME_SLEEP "Sleep Button (CM)"
#define ACPI_BUTTON_DEVICE_NAME_SLEEPF "Sleep Button (FF)"
#define ACPI_BUTTON_TYPE_SLEEP 0x03
#define ACPI_BUTTON_TYPE_SLEEPF 0x04
#define ACPI_BUTTON_SUBCLASS_LID "lid"
#define ACPI_BUTTON_HID_LID "PNP0C0D"
#define ACPI_BUTTON_DEVICE_NAME_LID "Lid Switch"
#define ACPI_BUTTON_TYPE_LID 0x05
int
acpi_button_add
(
struct
acpi_device
*
device
);
int
acpi_button_remove
(
struct
acpi_device
*
device
,
int
type
);
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/debug.c
View file @
95174c3e
...
...
@@ -10,6 +10,9 @@
#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME
(
"debug"
)
#define ACPI_SYSTEM_FILE_DEBUG_LAYER "debug_layer"
#define ACPI_SYSTEM_FILE_DEBUG_LEVEL "debug_level"
static
int
acpi_system_read_debug
(
char
*
page
,
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/ec.c
View file @
95174c3e
...
...
@@ -38,6 +38,14 @@
#define _COMPONENT ACPI_EC_COMPONENT
ACPI_MODULE_NAME
(
"acpi_ec"
)
#define ACPI_EC_COMPONENT 0x00100000
#define ACPI_EC_CLASS "embedded_controller"
#define ACPI_EC_HID "PNP0C09"
#define ACPI_EC_DRIVER_NAME "ACPI Embedded Controller Driver"
#define ACPI_EC_DEVICE_NAME "Embedded Controller"
#define ACPI_EC_FILE_INFO "info"
#define ACPI_EC_FLAG_OBF 0x01
/* Output buffer full */
#define ACPI_EC_FLAG_IBF 0x02
/* Input buffer full */
#define ACPI_EC_FLAG_SCI 0x20
/* EC-SCI occurred */
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/fan.c
View file @
95174c3e
...
...
@@ -40,6 +40,14 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION
(
ACPI_FAN_DRIVER_NAME
);
MODULE_LICENSE
(
"GPL"
);
#define ACPI_FAN_COMPONENT 0x00200000
#define ACPI_FAN_CLASS "fan"
#define ACPI_FAN_HID "PNP0C0B"
#define ACPI_FAN_DRIVER_NAME "ACPI Fan Driver"
#define ACPI_FAN_DEVICE_NAME "Fan"
#define ACPI_FAN_FILE_STATE "state"
#define ACPI_FAN_NOTIFY_STATUS 0x80
int
acpi_fan_add
(
struct
acpi_device
*
device
);
int
acpi_fan_remove
(
struct
acpi_device
*
device
,
int
type
);
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/pci_link.c
View file @
95174c3e
...
...
@@ -45,6 +45,13 @@
#define _COMPONENT ACPI_PCI_COMPONENT
ACPI_MODULE_NAME
(
"pci_link"
)
#define ACPI_PCI_LINK_CLASS "pci_irq_routing"
#define ACPI_PCI_LINK_HID "PNP0C0F"
#define ACPI_PCI_LINK_DRIVER_NAME "ACPI PCI Interrupt Link Driver"
#define ACPI_PCI_LINK_DEVICE_NAME "PCI Interrupt Link"
#define ACPI_PCI_LINK_FILE_INFO "info"
#define ACPI_PCI_LINK_FILE_STATUS "state"
#define ACPI_PCI_LINK_MAX_POSSIBLE 16
static
int
acpi_pci_link_add
(
struct
acpi_device
*
device
);
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/pci_root.c
View file @
95174c3e
...
...
@@ -39,6 +39,11 @@
#define _COMPONENT ACPI_PCI_COMPONENT
ACPI_MODULE_NAME
(
"pci_root"
)
#define ACPI_PCI_ROOT_CLASS "pci_bridge"
#define ACPI_PCI_ROOT_HID "PNP0A03"
#define ACPI_PCI_ROOT_DRIVER_NAME "ACPI PCI Root Bridge Driver"
#define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge"
extern
struct
pci_ops
*
pci_root_ops
;
static
int
acpi_pci_root_add
(
struct
acpi_device
*
device
);
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/power.c
View file @
95174c3e
...
...
@@ -36,6 +36,16 @@
#define _COMPONENT ACPI_POWER_COMPONENT
ACPI_MODULE_NAME
(
"acpi_power"
)
#define ACPI_POWER_COMPONENT 0x00800000
#define ACPI_POWER_CLASS "power_resource"
#define ACPI_POWER_DRIVER_NAME "ACPI Power Resource Driver"
#define ACPI_POWER_DEVICE_NAME "Power Resource"
#define ACPI_POWER_FILE_INFO "info"
#define ACPI_POWER_FILE_STATUS "state"
#define ACPI_POWER_RESOURCE_STATE_OFF 0x00
#define ACPI_POWER_RESOURCE_STATE_ON 0x01
#define ACPI_POWER_RESOURCE_STATE_UNKNOWN 0xFF
int
acpi_power_add
(
struct
acpi_device
*
device
);
int
acpi_power_remove
(
struct
acpi_device
*
device
,
int
type
);
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/processor.c
View file @
95174c3e
...
...
@@ -51,6 +51,18 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION
(
ACPI_PROCESSOR_DRIVER_NAME
);
MODULE_LICENSE
(
"GPL"
);
#define ACPI_PROCESSOR_COMPONENT 0x01000000
#define ACPI_PROCESSOR_CLASS "processor"
#define ACPI_PROCESSOR_DRIVER_NAME "ACPI Processor Driver"
#define ACPI_PROCESSOR_DEVICE_NAME "Processor"
#define ACPI_PROCESSOR_FILE_INFO "info"
#define ACPI_PROCESSOR_FILE_POWER "power"
#define ACPI_PROCESSOR_FILE_PERFORMANCE "performance"
#define ACPI_PROCESSOR_FILE_THROTTLING "throttling"
#define ACPI_PROCESSOR_FILE_LIMIT "limit"
#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
#define ACPI_PROCESSOR_NOTIFY_POWER 0x81
#define US_TO_PM_TIMER_TICKS(t) ((t * (PM_TIMER_FREQUENCY/1000)) / 1000)
#define C2_OVERHEAD 4
/* 1us (3.579 ticks per us) */
#define C3_OVERHEAD 4
/* 1us (3.579 ticks per us) */
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/scan.c
View file @
95174c3e
...
...
@@ -16,6 +16,12 @@ ACPI_MODULE_NAME ("scan")
extern
struct
acpi_device
*
acpi_root
;
#define ACPI_BUS_CLASS "system_bus"
#define ACPI_BUS_HID "ACPI_BUS"
#define ACPI_BUS_DRIVER_NAME "ACPI Bus Driver"
#define ACPI_BUS_DEVICE_NAME "System Bus"
static
int
acpi_device_register
(
struct
acpi_device
*
device
,
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/system.c
View file @
95174c3e
...
...
@@ -33,6 +33,16 @@
#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME
(
"acpi_system"
)
#define ACPI_SYSTEM_CLASS "system"
#define ACPI_SYSTEM_DRIVER_NAME "ACPI System Driver"
#define ACPI_SYSTEM_DEVICE_NAME "System"
#define ACPI_SYSTEM_FILE_INFO "info"
#define ACPI_SYSTEM_FILE_EVENT "event"
#define ACPI_SYSTEM_FILE_ALARM "alarm"
#define ACPI_SYSTEM_FILE_DSDT "dsdt"
#define ACPI_SYSTEM_FILE_FADT "fadt"
#define ACPI_SYSTEM_FILE_SLEEP "sleep"
extern
FADT_DESCRIPTOR
acpi_fadt
;
/* --------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
drivers/acpi/thermal.c
View file @
95174c3e
...
...
@@ -54,6 +54,24 @@ static int tzp = 0;
MODULE_PARM
(
tzp
,
"i"
);
MODULE_PARM_DESC
(
tzp
,
"Thermal zone polling frequency, in 1/10 seconds.
\n
"
);
#define ACPI_THERMAL_COMPONENT 0x04000000
#define ACPI_THERMAL_CLASS "thermal_zone"
#define ACPI_THERMAL_DRIVER_NAME "ACPI Thermal Zone Driver"
#define ACPI_THERMAL_DEVICE_NAME "Thermal Zone"
#define ACPI_THERMAL_FILE_STATE "state"
#define ACPI_THERMAL_FILE_TEMPERATURE "temperature"
#define ACPI_THERMAL_FILE_TRIP_POINTS "trip_points"
#define ACPI_THERMAL_FILE_COOLING_MODE "cooling_mode"
#define ACPI_THERMAL_FILE_POLLING_FREQ "polling_frequency"
#define ACPI_THERMAL_NOTIFY_TEMPERATURE 0x80
#define ACPI_THERMAL_NOTIFY_THRESHOLDS 0x81
#define ACPI_THERMAL_NOTIFY_DEVICES 0x82
#define ACPI_THERMAL_NOTIFY_CRITICAL 0xF0
#define ACPI_THERMAL_NOTIFY_HOT 0xF1
#define ACPI_THERMAL_MODE_ACTIVE 0x00
#define ACPI_THERMAL_MODE_PASSIVE 0x01
#define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff"
#define ACPI_THERMAL_MAX_ACTIVE 10
#define KELVIN_TO_CELSIUS(t) ((t-2732+5)/10)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment