Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
button.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/input.h>
#include <linux/slab.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>

Go to the source code of this file.

Data Structures

struct  acpi_button
 

Macros

#define PREFIX   "ACPI: "
 
#define ACPI_BUTTON_CLASS   "button"
 
#define ACPI_BUTTON_FILE_INFO   "info"
 
#define ACPI_BUTTON_FILE_STATE   "state"
 
#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"
 
#define ACPI_BUTTON_TYPE_POWER   0x01
 
#define ACPI_BUTTON_SUBCLASS_SLEEP   "sleep"
 
#define ACPI_BUTTON_HID_SLEEP   "PNP0C0E"
 
#define ACPI_BUTTON_DEVICE_NAME_SLEEP   "Sleep Button"
 
#define ACPI_BUTTON_TYPE_SLEEP   0x03
 
#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
 
#define _COMPONENT   ACPI_BUTTON_COMPONENT
 

Functions

 ACPI_MODULE_NAME ("button")
 
 MODULE_AUTHOR ("Paul Diefenbaugh")
 
 MODULE_DESCRIPTION ("ACPI Button Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (acpi, button_device_ids)
 
int acpi_lid_notifier_register (struct notifier_block *nb)
 
 EXPORT_SYMBOL (acpi_lid_notifier_register)
 
int acpi_lid_notifier_unregister (struct notifier_block *nb)
 
 EXPORT_SYMBOL (acpi_lid_notifier_unregister)
 
int acpi_lid_open (void)
 
 EXPORT_SYMBOL (acpi_lid_open)
 
 module_acpi_driver (acpi_button_driver)
 

Macro Definition Documentation

#define _COMPONENT   ACPI_BUTTON_COMPONENT

Definition at line 60 of file button.c.

#define ACPI_BUTTON_CLASS   "button"

Definition at line 39 of file button.c.

#define ACPI_BUTTON_DEVICE_NAME_LID   "Lid Switch"

Definition at line 57 of file button.c.

#define ACPI_BUTTON_DEVICE_NAME_POWER   "Power Button"

Definition at line 47 of file button.c.

#define ACPI_BUTTON_DEVICE_NAME_SLEEP   "Sleep Button"

Definition at line 52 of file button.c.

#define ACPI_BUTTON_FILE_INFO   "info"

Definition at line 40 of file button.c.

#define ACPI_BUTTON_FILE_STATE   "state"

Definition at line 41 of file button.c.

#define ACPI_BUTTON_HID_LID   "PNP0C0D"

Definition at line 56 of file button.c.

#define ACPI_BUTTON_HID_POWER   "PNP0C0C"

Definition at line 46 of file button.c.

#define ACPI_BUTTON_HID_SLEEP   "PNP0C0E"

Definition at line 51 of file button.c.

#define ACPI_BUTTON_NOTIFY_STATUS   0x80

Definition at line 43 of file button.c.

#define ACPI_BUTTON_SUBCLASS_LID   "lid"

Definition at line 55 of file button.c.

#define ACPI_BUTTON_SUBCLASS_POWER   "power"

Definition at line 45 of file button.c.

#define ACPI_BUTTON_SUBCLASS_SLEEP   "sleep"

Definition at line 50 of file button.c.

#define ACPI_BUTTON_TYPE_LID   0x05

Definition at line 58 of file button.c.

#define ACPI_BUTTON_TYPE_POWER   0x01

Definition at line 48 of file button.c.

#define ACPI_BUTTON_TYPE_SLEEP   0x03

Definition at line 53 of file button.c.

#define ACPI_BUTTON_TYPE_UNKNOWN   0x00

Definition at line 42 of file button.c.

#define PREFIX   "ACPI: "

Definition at line 37 of file button.c.

Function Documentation

int acpi_lid_notifier_register ( struct notifier_block nb)

Definition at line 220 of file button.c.

int acpi_lid_notifier_unregister ( struct notifier_block nb)

Definition at line 226 of file button.c.

int acpi_lid_open ( void  )

Definition at line 232 of file button.c.

ACPI_MODULE_NAME ( "button"  )
EXPORT_SYMBOL ( acpi_lid_notifier_register  )
EXPORT_SYMBOL ( acpi_lid_notifier_unregister  )
EXPORT_SYMBOL ( acpi_lid_open  )
module_acpi_driver ( acpi_button_driver  )
MODULE_AUTHOR ( "Paul Diefenbaugh"  )
MODULE_DESCRIPTION ( "ACPI Button Driver"  )
MODULE_DEVICE_TABLE ( acpi  ,
button_device_ids   
)
MODULE_LICENSE ( "GPL"  )