linux/drivers/acpi/button.c
<<
/spa 1. /form1. a href="../linux+v3.7.4/drivers/acpi/button.c"> img src="../.static/gfx/right.png" alt=">>"> /spa 1. spa class="lxr_search"> ="+search" method="post" onsubmit="return do_search(this);"> input typ4 input typ4 button typ4Search Prefs. /a> /spa 1. /div1. form ac> ="ajax+*" method="post" onsubmit="return false;"> input typ4 /form1. div class="headingbottom">. div id 1 /a> spa class="comment">/* /spa 1. 2 /a> spa class="comment"> * button.c - ACPI Button Driver /spa 1. 3 /a> spa class="comment"> * /spa 1. 4 /a> spa class="comment"> * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> /spa 1. 5 /a> spa class="comment"> * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> /spa 1. 6 /a> spa class="comment"> * /spa 1. 7 /a> spa class="comment"> * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /spa 1. 8 /a> spa class="comment"> * /spa 1. 9 /a> spa class="comment"> * This program is free software; you ca redistribute it and/or modify /spa 1. a> spa class="comment"> * it under the terms of the GNU General Public License as published by /spa 1. 11 /a> spa class="comment"> * the Free Software Founda> ; either vers v42 of the License, or (at /spa 1. 12 /a> spa class="comment"> * your on> ) any later vers v. /spa 1. 13 /a> spa class="comment"> * /spa 1. 14 /a> spa class="comment"> * This program is distributed in the hope that it will be useful, but /spa 1. 15 /a> spa class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of /spa 1. 16 /a> spa class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU /spa 1. 17 /a> spa class="comment"> * General Public License for more details. /spa 1. 18 /a> spa class="comment"> * /spa 1. 19 /a> spa class="comment"> * You should have received a copy of the GNU General Public License along /spa 1. 2 a> spa class="comment"> * with this program; if not, write to the Free Software Founda> , Inc., /spa 1. 21 /a> spa class="comment"> * 59 Temple Place, Suite 330, Bost , MA 02111-1307 USA. /spa 1. 22 /a> spa class="comment"> * /spa 1. 23 /a> spa class="comment"> * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /spa 1. 24 /a> spa class="comment"> */ /spa 1. 25 /a>. 26 /a>#include <linux/kernel.h /a>>. 27 /a>#include <linux/module.h /a>>. 28 /a>#include <linux/init.h /a>>. 29 /a>#include <linux/typ4s.h /a>>. 30 /a>#include <linux/proc_fs.h /a>>. 31 /a>#include <linux/seq_file.h /a>>. 32 /a>#include <linux/input.h /a>>. 33 /a>#include <linux/slab.h /a>>. 34 /a>#include <acpi/acpi_bus.h /a>>. 35 /a>#include <acpi/acpi_drivers.h /a>>. 36 /a>. 37 /a>#define a href="+code=PREFIX" class="sref">PREFIX /a> spa class="string">"ACPI: " /spa 1. 38 /a>. 39 /a>#define a href="+code=ACPI_BUTTON_CLASS" class="sref">ACPI_BUTTON_CLASS /a> spa class="string">"button" /spa 1. 40 /a>#define a href="+code=ACPI_BUTTON_FILE_INFO" class="sref">ACPI_BUTTON_FILE_INFO /a> spa class="string">"info" /spa 1. 41 /a>#define a href="+code=ACPI_BUTTON_FILE_STATE" class="sref">ACPI_BUTTON_FILE_STATE /a> spa class="string">"state" /spa 1. 42 /a>#define a href="+code=ACPI_BUTTON_TYPE_UNKNOWN" class="sref">ACPI_BUTTON_TYPE_UNKNOWN /a> 0x00. 43 /a>#define a href="+code=ACPI_BUTTON_NOTIFY_STATUS" class="sref">ACPI_BUTTON_NOTIFY_STATUS /a> 0x80. 44 /a>. 45 /a>#define a href="+code=ACPI_BUTTON_SUBCLASS_POWER" class="sref">ACPI_BUTTON_SUBCLASS_POWER /a> spa class="string">"power" /spa 1. 46 /a>#define a href="+code=ACPI_BUTTON_HID_POWER" class="sref">ACPI_BUTTON_HID_POWER /a> spa class="string">"PNP0C0C" /spa 1. 47 /a>#define a href="+code=ACPI_BUTTON_DEVICE_NAME_POWER" class="sref">ACPI_BUTTON_DEVICE_NAME_POWER /a> spa class="string">"Power Button" /spa 1. 48 /a>#define a href="+code=ACPI_BUTTON_TYPE_POWER" class="sref">ACPI_BUTTON_TYPE_POWER /a> 0x01. 49 /a>. 50 /a>#define a href="+code=ACPI_BUTTON_SUBCLASS_SLEEP" class="sref">ACPI_BUTTON_SUBCLASS_SLEEP /a> spa class="string">"sleep" /spa 1. 51 /a>#define a href="+code=ACPI_BUTTON_HID_SLEEP" class="sref">ACPI_BUTTON_HID_SLEEP /a> spa class="string">"PNP0C0E" /spa 1. 52 /a>#define a href="+code=ACPI_BUTTON_DEVICE_NAME_SLEEP" class="sref">ACPI_BUTTON_DEVICE_NAME_SLEEP /a> spa class="string">"Sleep Button" /spa 1. 53 /a>#define a href="+code=ACPI_BUTTON_TYPE_SLEEP" class="sref">ACPI_BUTTON_TYPE_SLEEP /a> 0x03. 54 /a>. 55 /a>#define a href="+code=ACPI_BUTTON_SUBCLASS_LID" class="sref">ACPI_BUTTON_SUBCLASS_LID /a> spa class="string">"lid" /spa 1. 56 /a>#define a href="+code=ACPI_BUTTON_HID_LID" class="sref">ACPI_BUTTON_HID_LID /a> spa class="string">"PNP0C0D" /spa 1. 57 /a>#define a href="+code=ACPI_BUTTON_DEVICE_NAME_LID" class="sref">ACPI_BUTTON_DEVICE_NAME_LID /a> spa class="string">"Lid Switch" /spa 1. 58 /a>#define a href="+code=ACPI_BUTTON_TYPE_LID" class="sref">ACPI_BUTTON_TYPE_LID /a> 0x05. 59 /a>. 60 /a>#define a href="+code=_COMPONENT" class="sref">_COMPONENT /a> a href="+code=ACPI_BUTTON_COMPONENT" class="sref">ACPI_BUTTON_COMPONENT /a>. 61 /a> a href="+code=ACPI_MODULE_NAME" class="sref">ACPI_MODULE_NAME /a>( spa class="string">"button" /spa 1);. 62 /a>. 63 /a> a href="+code=MODULE_AUTHOR" class="sref">MODULE_AUTHOR /a>( spa class="string">"Paul Diefenbaugh" /spa 1);. 64 /a> a href="+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTION /a>( spa class="string">"ACPI Button Driver" /spa 1);. 65 /a> a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE /a>( spa class="string">"GPL" /spa 1);. 66 /a>. 67 /a>static const struct a href="+code=acpi_device_id" class="sref">acpi_device_id /a> a href="+code=button_device_ids" class="sref">button_device_ids /a>[] = {. 68 /a> { a href="+code=ACPI_BUTTON_HID_LID" class="sref">ACPI_BUTTON_HID_LID /a>, 0},. 69 /a> { a href="+code=ACPI_BUTTON_HID_SLEEP" class="sref">ACPI_BUTTON_HID_SLEEP /a>, 0},. 70 /a> { a href="+code=ACPI_BUTTON_HID_SLEEPF" class="sref">ACPI_BUTTON_HID_SLEEPF /a>, 0},. 71 /a> { a href="+code=ACPI_BUTTON_HID_POWER" class="sref">ACPI_BUTTON_HID_POWER /a>, 0},. 72 /a> { a href="+code=ACPI_BUTTON_HID_POWERF" class="sref">ACPI_BUTTON_HID_POWERF /a>, 0},. 73 /a> { spa class="string">"" /spa 1, 0},. 74 /a>};. 75 /a> a href="+code=MODULE_DEVICE_TABLE" class="sref">MODULE_DEVICE_TABLE /a>( a href="+code=acpi" class="sref">acpi /a>, a href="+code=button_device_ids" class="sref">button_device_ids /a>);. 76 /a>. 77 /a>static int a href="+code=acpi_button_add" class="sref">acpi_button_add /a>(struct a href="+code=acpi_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a>);. 78 /a>static int a href="+code=acpi_button_remove" class="sref">acpi_button_remove /a>(struct a href="+code=acpi_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a>, int a href="+code=typ4" class="sref">typ4 /a>);. 79 /a>static void a href="+code=acpi_button_notify" class="sref">acpi_button_notify /a>(struct a href="+code=acpi_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a>, a href="+code=u32" class="sref">u32 /a> a href="+code=event" class="sref">event /a>);. 80 /a>. 81 /a>#ifdef a href="+code=CONFIG_PM_SLEEP" class="sref">CONFIG_PM_SLEEP /a>. 82 /a>static int a href="+code=acpi_button_resume" class="sref">acpi_button_resume /a>(struct a href="+code=device" class="sref">device /a> * a href="+code=dev" class="sref">dev /a>);. 83 /a>#endif. 84 /a>static a href="+code=SIMPLE_DEV_PM_OPS" class="sref">SIMPLE_DEV_PM_OPS /a>( a href="+code=acpi_button_pm" class="sref">acpi_button_pm /a>, a href="+code=NULL" class="sref">NULL /a>, a href="+code=acpi_button_resume" class="sref">acpi_button_resume /a>);. 85 /a>. 86 /a>static struct a href="+code=acpi_driver" class="sref">acpi_driver /a> a href="+code=acpi_button_driver" class="sref">acpi_button_driver /a> = {. 87 /a> . a href="+code=nam4" class="sref">nam4 /a> = spa class="string">"button" /spa 1,. 88 /a> . a href="+code=class" class="sref">class /a> = a href="+code=ACPI_BUTTON_CLASS" class="sref">ACPI_BUTTON_CLASS /a>,. 89 /a> . a href="+code=ids" class="sref">ids /a> = a href="+code=button_device_ids" class="sref">button_device_ids /a>,. 90 /a> . a href="+code=ops" class="sref">ops /a> = {. 91 /a> . a href="+code=add" class="sref">add /a> = a href="+code=acpi_button_add" class="sref">acpi_button_add /a>,. 92 /a> . a href="+code=remove" class="sref">remove /a> = a href="+code=acpi_button_remove" class="sref">acpi_button_remove /a>,. 93 /a> . a href="+code=notify" class="sref">notify /a> = a href="+code=acpi_button_notify" class="sref">acpi_button_notify /a>,. 94 /a> },. 95 /a> . a href="+code=drv" class="sref">drv /a>. a href="+code=pm" class="sref">pm /a> = & a href="+code=acpi_button_pm" class="sref">acpi_button_pm /a>,. 96 /a>};. 97 /a>. 98 /a>struct a href="+code=acpi_button" class="sref">acpi_button /a> {. 99 /a> unsigned int a href="+code=typ4" class="sref">typ4 /a>;. 100 /a> struct a href="+code=input_dev" class="sref">input_dev /a> * a href="+code=input" class="sref">input /a>;. 101 /a> char a href="+code=phys" class="sref">phys /a>[32]; spa class="comment">/* for input device */ /spa 1. 102 /a> unsigned long a href="+code=pushed" class="sref">pushed /a>;. 103 /a> a href="+code=bool" class="sref">bool /a> a href="+code=wakeup_enabled" class="sref">wakeup_enabled /a>;. 104 /a>};. 105 /a>. 106 /a>static a href="+code=BLOCKING_NOTIFIER_HEAD" class="sref">BLOCKING_NOTIFIER_HEAD /a>( a href="+code=acpi_lid_notifier" class="sref">acpi_lid_notifier /a>);. 107 /a>static struct a href="+code=acpi_device" class="sref">acpi_device /a> * a href="+code=lid_device" class="sref">lid_device /a>;. 108 /a>. 109 /a> spa class="comment">/* -------------------------------------------------------------------------- /spa 1. 1 a> spa class="comment"> FS Interface (/proc) /spa 1. 111 /a> spa class="comment"> -------------------------------------------------------------------------- */ /spa 1. 112 /a>. 113 /a>static struct a href="+code=proc_dir_entry" class="sref">proc_dir_entry /a> * a href="+code=acpi_button_dir" class="sref">acpi_button_dir /a>;. 114 /a>static struct a href="+code=proc_dir_entry" class="sref">proc_dir_entry /a> * a href="+code=acpi_lid_dir" class="sref">acpi_lid_dir /a>;. 115 /a>. 116 /a>static int a href="+code=acpi_button_state_seq_show" class="sref">acpi_button_state_seq_show /a>(struct a href="+code=seq_file" class="sref">seq_file /a> * a href="+code=seq" class="sref">seq /a>, void * a href="+code=offset" class="sref">offset /a>). 117 /a>{. 118 /a> struct a href="+code=acpi_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a> = a href="+code=seq" class="sref">seq /a>-> a href="+code=private" class="sref">private /a>;. 119 /a> a href="+code=acpi_status" class="sref">acpi_status /a> a href="+code=status" class="sref">status /a>;. 120 /a> unsigned long long a href="+code=state" class="sref">state /a>;. 121 /a>. 122 /a> a href="+code=status" class="sref">status /a> = a href="+code=acpi_e.1.1ate_integer" class="sref">acpi_e.1.1ate_integer /a>( a href="+code=device" class="sref">device /a>-> a href="+code=handle" class="sref">handle /a>, spa class="string">"_LID" /spa 1, a href="+code=NULL" class="sref">NULL /a>, & a href="+code=state" class="sref">state /a>);. 123 /a> a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=seq" class="sref">seq /a>, spa class="string">"state: %s\n" /spa 1,. 124 /a> a href="+code=ACPI_FAILURE" class="sref">ACPI_FAILURE /a>( a href="+code=status" class="sref">status /a>) ? spa class="string">"unsupported" /spa 1 :. 125 /a> ( a href="+code=state" class="sref">state /a> ? spa class="string">"open" /spa 1 : spa class="string">"closed" /spa 1));. 126 /a> return 0;. 127 /a>}. 128 /a>. 129 /a>static int a href="+code=acpi_button_state_open_fs" class="sref">acpi_button_state_open_fs /a>(struct a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>, struct a href="+code=file" class="sref">file /a> * a href="+code=file" class="sref">file /a>). 130 /a>{. 131 /a> return a href="+code=single_open" class="sref">single_open /a>( a href="+code=file" class="sref">file /a>, a href="+code=acpi_button_state_seq_show" class="sref">acpi_button_state_seq_show /a>, a href="+code=PDE" class="sref">PDE /a>( a href="+code=inode" class="sref">inode /a>)-> a href="+code=data" class="sref">data /a>);. 132 /a>}. 133 /a>. 134 /a>static const struct a href="+code=file_opera> s" class="sref">file_opera> s /a> a href="+code=acpi_button_state_fops" class="sref">acpi_button_state_fops /a> = {. 135 /a> . a href="+code=owner" class="sref">owner /a> = a href="+code=THIS_MODULE" class="sref">THIS_MODULE /a>,. 136 /a> . a href="+code=open" class="sref">open /a> = a href="+code=acpi_button_state_open_fs" class="sref">acpi_button_state_open_fs /a>,. 137 /a> . a href="+code=read" class="sref">read /a> = a href="+code=seq_read" class="sref">seq_read /a>,. 138 /a> . a href="+code=llseek" class="sref">llseek /a> = a href="+code=seq_lseek" class="sref">seq_lseek /a>,. 139 /a> . a href="+code=release" class="sref">release /a> = a href="+code=single_release" class="sref">single_release /a>,. 140 /a>};. 141 /a>. 142 /a>static int a href="+code=acpi_button_add_fs" class="sref">acpi_button_add_fs /a>(struct a href="+code=acpi_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a>). 143 /a>{. 144 /a> struct a href="+code=acpi_button" class="sref">acpi_button /a> * a href="+code=button" class="sref">button /a> = a href="+code=acpi_driver_data" class="sref">acpi_driver_data /a>( a href="+code=device" class="sref">device /a>);. 145 /a> struct a href="+code=proc_dir_entry" class="sref">proc_dir_entry /a> * a href="+code=entry" class="sref">entry /a> = a href="+code=NULL" class="sref">NULL /a>;. 146 /a> int a href="+code=ret" class="sref">ret /a> = 0;. 147 /a>. 148 /a> spa class="comment">/* procfs I/F for ACPI lid device only */ /spa 1. 149 /a> if ( a href="+code=button" class="sref">button /a>-> a href="+code=typ4" class="sref">typ4 /a> != a href="+code=ACPI_BUTTON_TYPE_LID" class="sref">ACPI_BUTTON_TYPE_LID /a>). 150 /a> return 0;. 151 /a>. 152 /a> if ( a href="+code=acpi_button_dir" class="sref">acpi_button_dir /a> || a href="+code=acpi_lid_dir" class="sref">acpi_lid_dir /a>) {. 153 /a> a href="+code=printk" class="sref">printk /a>( a href="+code=KERN_ERR" class="sref">KERN_ERR /a> a href="+code=PREFIX" class="sref">PREFIX /a> spa class="string">"More tha one Lid device found!\n" /spa 1);. 154 /a> return - a href="+code=EEXIST" class="sref">EEXIST /a>;. 155 /a> }. 156 /a>. 157 /a> spa class="comment">/* create /proc/acpi/button */ /spa 1. 158 /a> a href="+code=acpi_button_dir" class="sref">acpi_button_dir /a> = a href="+code=proc_mkdir" class="sref">proc_mkdir /a>( a href="+code=ACPI_BUTTON_CLASS" class="sref">ACPI_BUTTON_CLASS /a>, a href="+code=acpi_root_dir" class="sref">acpi_root_dir /a>);. 159 /a> if (! a href="+code=acpi_button_dir" class="sref">acpi_button_dir /a>). 160 /a> return - a href="+code=ENODEV" class="sref">ENODEV /a>;. 161 /a>. 162 /a> spa class="comment">/* create /proc/acpi/button/lid */ /spa 1. 163 /a> a href="+code=acpi_lid_dir" class="sref">acpi_lid_dir /a> = a href="+code=proc_mkdir" class="sref">proc_mkdir /a>( a href="+code=ACPI_BUTTON_SUBCLASS_LID" class="sref">ACPI_BUTTON_SUBCLASS_LID /a>, a href="+code=acpi_button_dir" class="sref">acpi_button_dir /a>);. 164 /a> if (! a href="+code=acpi_lid_dir" class="sref">acpi_lid_dir /a>) {. 165 /a> a href="+code=ret" class="sref">ret /a> = - a href="+code=ENODEV" class="sref">ENODEV /a>;. 166 /a> goto a href="+code=remove_button_dir" class="sref">remove_button_dir /a>;. 167 /a> }. 168 /a>. 169 /a> spa class="comment">/* create /proc/acpi/button/lid/LID/ */ /spa 1. 170 /a> a href="+code=acpi_device_dir" class="sref">acpi_device_dir /a>( a href="+code=device" class="sref">device /a>) = a href="+code=proc_mkdir" class="sref">proc_mkdir /a>( a href="+code=acpi_device_bid" class="sref">acpi_device_bid /a>( a href="+code=device" class="sref">device /a>), a href="+code=acpi_lid_dir" class="sref">acpi_lid_dir /a>);. 171 /a> if (! a href="+code=acpi_device_dir" class="sref">acpi_device_dir /a>( a href="+code=device" class="sref">device /a>)) {. 172 /a> a href="+code=ret" class="sref">ret /a> = - a href="+code=ENODEV" class="sref">ENODEV /a>;. 173 /a> goto a href="+code=remove_lid_dir" class="sref">remove_lid_dir /a>;. 174 /a> }. 175 /a>. 176 /a> spa class="comment">/* create /proc/acpi/button/lid/LID/state */ /spa 1. 177 /a> a href="+code=entry" class="sref">entry /a> = a href="+code=proc_create_data" class="sref">proc_create_data /a>( a href="+code=ACPI_BUTTON_FILE_STATE" class="sref">ACPI_BUTTON_FILE_STATE /a>,. 178 /a> a href="+code=S_IRUGO" class="sref">S_IRUGO /a>, a href="+code=acpi_device_dir" class="sref">acpi_device_dir /a>( a href="+code=device" class="sref">device /a>),. 179 /a> & a href="+code=acpi_button_state_fops" class="sref">acpi_button_state_fops /a>, a href="+code=device" class="sref">device /a>);. 180 /a> if (! a href="+code=entry" class="sref">entry /a>) {. 181 /a> a href="+code=ret" class="sref">ret /a> = - a href="+code=ENODEV" class="sref">ENODEV /a>;. 182 /a> goto a href="+code=remove_dev_dir" class="sref">remove_dev_dir /a>;. 183 /a> }. 184 /a>. 185 /a> a href="+code=done" class="sref">done /a>:. 186 /a> return a href="+code=ret" class="sref">ret /a>;. 187 /a>. 188 /a> a href="+code=remove_dev_dir" class="sref">remove_dev_dir /a>:. 189 /a> a href="+code=remove_proc_entry" class="sref">remove_proc_entry /a>( a href="+code=acpi_device_bid" class="sref">acpi_device_bid /a>( a href="+code=device" class="sref">device /a>),. 190 /a> a href="+code=acpi_lid_dir" class="sref">acpi_lid_dir /a>);. 191 /a> a href="+code=acpi_device_dir" class="sref">acpi_device_dir /a>( a href="+code=device" class="sref">device /a>) = a href="+code=NULL" class="sref">NULL /a>;. 192 /a> a href="+code=remove_lid_dir" class="sref">remove_lid_dir /a>:. 193 /a> a href="+code=remove_proc_entry" class="sref">remove_proc_entry /a>( a href="+code=ACPI_BUTTON_SUBCLASS_LID" class="sref">ACPI_BUTTON_SUBCLASS_LID /a>, a href="+code=acpi_button_dir" class="sref">acpi_button_dir /a>);. 194 /a> a href="+code=remove_button_dir" class="sref">remove_button_dir /a>:. 195 /a> a href="+code=remove_proc_entry" class="sref">remove_proc_entry /a>( a href="+code=ACPI_BUTTON_CLASS" class="sref">ACPI_BUTTON_CLASS /a>, a href="+code=acpi_root_dir" class="sref">acpi_root_dir /a>);. 196 /a> goto a href="+code=done" class="sref">done /a>;. 197 /a>}. 198 /a>. 199 /a>static int a href="+code=acpi_button_remove_fs" class="sref">acpi_button_remove_fs /a>(struct a href="+code=acpi_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a>). 200 /a>{. 201 /a> struct a href="+code=acpi_button" class="sref">acpi_button /a> * a href="+code=button" class="sref">button /a> = a href="+code=acpi_driver_data" class="sref">acpi_driver_data /a>( a href="+code=device" class="sref">device /a>);. 202 /a>. 203 /a> if ( a href="+code=button" class="sref">button /a>-> a href="+code=typ4" class="sref">typ4 /a> != a href="+code=ACPI_BUTTON_TYPE_LID" class="sref">ACPI_BUTTON_TYPE_LID /a>). 204 /a> return 0;. 205 /a>. 206 /a> a href="+code=remove_proc_entry" class="sref">remove_proc_entry /a>( a href="+code=ACPI_BUTTON_FILE_STATE" class="sref">ACPI_BUTTON_FILE_STATE /a>,. 207 /a> a href="+code=acpi_device_dir" class="sref">acpi_device_dir /a>( a href="+code=device" class="sref">device /a>));. 208 /a> a href="+code=remove_proc_entry" class="sref">remove_proc_entry /a>( a href="+code=acpi_device_bid" class="sref">acpi_device_bid /a>( a href="+code=device" class="sref">device /a>),. 209 /a> a href="+code=acpi_lid_dir" class="sref">acpi_lid_dir /a>);. 210 /a> a href="+code=acpi_device_dir" class="sref">acpi_device_dir /a>( a href="+code=device" class="sref">device /a>) = a href="+code=NULL" class="sref">NULL /a>;. 211 /a> a href="+code=remove_proc_entry" class="sref">remove_proc_entry /a>( a href="+code=ACPI_BUTTON_SUBCLASS_LID" class="sref">ACPI_BUTTON_SUBCLASS_LID /a>, a href="+code=acpi_button_dir" class="sref">acpi_button_dir /a>);. 212 /a> a href="+code=remove_proc_entry" class="sref">remove_proc_entry /a>( a href="+code=ACPI_BUTTON_CLASS" class="sref">ACPI_BUTTON_CLASS /a>, a href="+code=acpi_root_dir" class="sref">acpi_root_dir /a>);. 213 /a>. 214 /a> return 0;. 215 /a>}. 216 /a>. 217 /a> spa class="comment">/* -------------------------------------------------------------------------- /spa 1. 218 /a> spa class="comment"> Driver Interface /spa 1. 219 /a> spa class="comment"> -------------------------------------------------------------------------- */ /spa 1. 220 /a>int a href="+code=acpi_lid_notifier_register" class="sref">acpi_lid_notifier_register /a>(struct a href="+code=notifier_block" class="sref">notifier_block /a> * a href="+code=nb" class="sref">nb /a>). 221 /a>{. 222 /a> return a href="+code=blocking_notifier_chain_register" class="sref">blocking_notifier_chain_register /a>(& a href="+code=acpi_lid_notifier" class="sref">acpi_lid_notifier /a>, a href="+code=nb" class="sref">nb /a>);. 223 /a>}. 224 /a> a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL /a>( a href="+code=acpi_lid_notifier_register" class="sref">acpi_lid_notifier_register /a>);. 225 /a>. 226 /a>int a href="+code=acpi_lid_notifier_unregister" class="sref">acpi_lid_notifier_unregister /a>(struct a href="+code=notifier_block" class="sref">notifier_block /a> * a href="+code=nb" class="sref">nb /a>). 227 /a>{. 228 /a> return a href="+code=blocking_notifier_chain_unregister" class="sref">blocking_notifier_chain_unregister /a>(& a href="+code=acpi_lid_notifier" class="sref">acpi_lid_notifier /a>, a href="+code=nb" class="sref">nb /a>);. 229 /a>}. 230 /a> a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL /a>( a href="+code=acpi_lid_notifier_unregister" class="sref">acpi_lid_notifier_unregister /a>);. 231 /a>. 232 /a>int a href="+code=acpi_lid_open" class="sref">acpi_lid_open /a>(void). 233 /a>{. 234 /a> a href="+code=acpi_status" class="sref">acpi_status /a> a href="+code=status" class="sref">status /a>;. 235 /a> unsigned long long a href="+code=state" class="sref">state /a>;. 236 /a>. 237 /a> if (! a href="+code=lid_device" class="sref">lid_device /a>). 238 /a> return - a href="+code=ENODEV" class="sref">ENODEV /a>;. 239 /a>. 240 /a> a href="+code=status" class="sref">status /a> = a href="+code=acpi_e.1.1ate_integer" class="sref">acpi_e.1.1ate_integer /a>( a href="+code=lid_device" class="sref">lid_device /a>-> a href="+code=handle" class="sref">handle /a>, spa class="string">"_LID" /spa 1, a href="+code=NULL" class="sref">NULL /a>,. 241 /a> & a href="+code=state" class="sref">state /a>);. 242 /a> if ( a href="+code=ACPI_FAILURE" class="sref">ACPI_FAILURE /a>( a href="+code=status" class="sref">status /a>)). 243 /a> return - a href="+code=ENODEV" class="sref">ENODEV /a>;. 244 /a>. 245 /a> return !! a href="+code=state" class="sref">state /a>;. 246 /a>}. 247 /a> a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL /a>( a href="+code=acpi_lid_open" class="sref">acpi_lid_open /a>);. 248 /a>. 249 /a>static int a href="+code=acpi_lid_send_state" class="sref">acpi_lid_send_state /a>(struct a href="+code=acpi_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a>). 250 /a>{. 251 /a> struct a href="+code=acpi_button" class="sref">acpi_button /a> * a href="+code=button" class="sref">button /a> = a href="+code=acpi_driver_data" class="sref">acpi_driver_data /a>( a href="+code=device" class="sref">device /a>);. 252 /a> unsigned long long a href="+code=state" class="sref">state /a>;. 253 /a> a href="+code=acpi_status" class="sref">acpi_status /a> a href="+code=status" class="sref">status /a>;. 254 /a> int a href="+code=ret" class="sref">ret /a>;. 255 /a>. 256 /a> a href="+code=status" class="sref">status /a> = a href="+code=acpi_e.1.1ate_integer" class="sref">acpi_e.1.1ate_integer /a>( a href="+code=device" class="sref">device /a>-> a href="+code=handle" class="sref">handle /a>, spa class="string">"_LID" /spa 1, a href="+code=NULL" class="sref">NULL /a>, & a href="+code=state" class="sref">state /a>);. 257 /a> if ( a href="+code=ACPI_FAILURE" class="sref">ACPI_FAILURE /a>( a href="+code=status" class="sref">status /a>)). 258 /a> return - a href="+code=ENODEV" class="sref">ENODEV /a>;. 259 /a>. 260 /a> spa class="comment">/* input layer checks if event is redundant */ /spa 1. 261 /a> a href="+code=input_report_switch" class="sref">input_report_switch /a>( a href="+code=button" class="sref">button /a>-> a href="+code=input" class="sref">input /a>, a href="+code=SW_LID" class="sref">SW_LID /a>, ! a href="+code=state" class="sref">state /a>);. 262 /a> a href="+code=input_sync" class="sref">input_sync /a>( a href="+code=button" class="sref">button /a>-> a href="+code=input" class="sref">input /a>);. 263 /a>. 264 /a> if ( a href="+code=state" class="sref">state /a>). 265 /a> a href="+code=pm_wakeup_event" class="sref">pm_wakeup_event /a>(& a href="+code=device" class="sref">device /a>-> a href="+code=dev" class="sref">dev /a>, 0);. 266 /a>. 267 /a> a href="+code=ret" class="sref">ret /a> = a href="+code=blocking_notifier_call_chain" class="sref">blocking_notifier_call_chain /a>(& a href="+code=acpi_lid_notifier" class="sref">acpi_lid_notifier /a>, a href="+code=state" class="sref">state /a>, a href="+code=device" class="sref">device /a>);. 268 /a> if ( a href="+code=ret" class="sref">ret /a> == a href="+code=NOTIFY_DONE" class="sref">NOTIFY_DONE /a>). 269 /a> a href="+code=ret" class="sref">ret /a> = a href="+code=blocking_notifier_call_chain" class="sref">blocking_notifier_call_chain /a>(& a href="+code=acpi_lid_notifier" class="sref">acpi_lid_notifier /a>, a href="+code=state" class="sref">state /a>,. 270 /a> a href="+code=device" class="sref">device /a>);. 271 /a> if ( a href="+code=ret" class="sref">ret /a> == a href="+code=NOTIFY_DONE" class="sref">NOTIFY_DONE /a> || a href="+code=ret" class="sref">ret /a> == a href="+code=NOTIFY_OK" class="sref">NOTIFY_OK /a>) {. 272 /a> spa class="comment">/* /spa 1. 273 /a> spa class="comment"> * It is also regarded as success if the notifier_chain /spa 1. 274 /a> spa class="comment"> * returns NOTIFY_OK or NOTIFY_DONE. /spa 1. 275 /a> spa class="comment"> */ /spa 1. 276 /a> a href="+code=ret" class="sref">ret /a> = 0;. 277 /a> }. 278 /a> return a href="+code=ret" class="sref">ret /a>;. 279 /a>}. 280 /a>. 281 /a>static void a href="+code=acpi_button_notify" class="sref">acpi_button_notify /a>(struct a href="+code=acpi_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a>, a href="+code=u32" class="sref">u32 /a> a href="+code=event" class="sref">event /a>). 282 /a>{. 283 /a> struct a href="+code=acpi_button" class="sref">acpi_button /a> * a href="+code=button" class="sref">button /a> = a href="+code=acpi_driver_data" class="sref">acpi_driver_data /a>( a href="+code=device" class="sref">device /a>);. 284 /a> struct a href="+code=input_dev" class="sref">input_dev /a> * a href="+code=input" class="sref">input /a>;. 285 /a>. 286 /a> switch ( a href="+code=event" class="sref">event /a>) {. 287 /a> case a href="+code=ACPI_FIXED_HARDWARE_EVENT" class="sref">ACPI_FIXED_HARDWARE_EVENT /a>:. 288 /a> a href="+code=event" class="sref">event /a> = a href="+code=ACPI_BUTTON_NOTIFY_STATUS" class="sref">ACPI_BUTTON_NOTIFY_STATUS /a>;. 28 a href="spa class="comment">/* fall_chain /a>(&a2mrn - a href="+codUgh/acpi/button.c#L276" id 190 /a> 2 2 a href="XED_HARDWARE_EVENT" class="sref">ACPI_BUTTON_NOTIFY_STATUS /a>;. 191 /a> a hre2="+co29f="+code=ret" class="sref">ret /a> =a>;.input /a>);. 192 /a> a href="+code2remov29class="comment">/* /sclass="sref">button /a>-> a href="+code=typ4" class="sref">typ4 /a> != a href="+code=ACPI_BUTT" class="sref">NOT="sref">ACPI_BUTTON_TYPE_LID /a>). 193 /a> a hre2="+co29 - a href="+code=ENOD class="sref">ret /a> ="sref">acpi_lid_send_state /a>(struct a href="+code=acpi_s="sref">device /a>);. 194 /a> a href="+code2remov29 0;. 195 /a> a hre2="+co29f="+code=pm_wakeup_evt">/* /scs="sref">ret /a>;.key/a>;.deviceKEersLEEPu32 /a> a>);.typ4 /a>keybi. 196 /a> goto 2 href29f="+code=ret" class="""""""""""""""""""""""""""""""""s="sref">deviceKEersLEEPdeviceKEerPOWE> a href="+code=PerPOWE>i/buton.c#L289" id 197 /a>}. 198 /a>.input_key_switch /a>( a href="+code=bkeyacpi_s="sref">devicea>, a href="+code=SW_LID" class="sref">SW_LIDkey/a>;. 199 /a>static int a 2ref="29 a href="+code=acpi_lid_dclass="sref">input_sync /a>( a href="+code=button" class="sref">buttona>);. 200 /a>{.input_key_switch /a>( a href="+code=bkeyacpi_s="sref">devicea>, a href="+code=SW_LID" class="sref">SW_LIDkey/a>;. 201 /a> struct3 a hr30 & a hrefclass="sref">input_sync /a>( a href="+code=button" class="sref">buttona>);. 192 /a> a href="+code3rs/ac3i/button.c#L203" id 203 /a> if ( a3href=30 - a href="+code=ENOD class="sref">ret /a> =f">pm_wakeup_event /a>(& a href="+code=device" class="sref">device /a>-> a href="+code=dev" class="sref">dev /a>, 0);. 204 /a> 3 retu3n 0;. 205 /a>. 206 /a> a hre3="+co30f="+code=ret" class="sref">ret /a> =code=bus_gen=acpcode=ACPp_event /a>(& acode=bus_gen=acpcode=ACPp_evacpi_s="sref">device /a>);.SW_LIDa> = a href="+code=ACPI_BUTT, ++s="sref">button /a>-> a href="+code=typ4" class="sref">typ4 /a>pushe_bid /a>( a hrefpushe_i/button.c#L263" id 197 /a>}. 198 /a>. 209 /a> 3 3 a href="+code=aclass="sref">NOT="sreDEBUG_PRI_HARDWARE_EVENT /a>:.ACPI_DB_INF, a href="+codeACPI_DB_INF,/button.c#L270" id 210 /a> a hre3="+co31 a href="+_LID" /spa 1, a href=Unsupode=ed 1.SW_LIDa> = a href="+code=ACPI_BUTTutton.c#L208" id 211 /a> a hre3="+co31 &breakton.c#L263" id 212 /a> a hre3="+co3e=remove_proc_ton.c#L280" id 213 /a>. 214 /a> return30;. 215 /a>}.SW_LIDCONFIG_PMrsLEEP 216 /a>.acpi_sumnd_state /a>(struct ef">acpi_sumnacpi_device" class="sref">a /a>);.device /a. 217 /a> spa class="c3mment31i/button.c#L228" id 218 /a> spa class="c3mment31=remove_proc_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a>, a href="+code=u32" classnotifier_call_chaito_cpi_device /a> * a href="+to_cpi_device acpi_s="sref">device /a. 219 /a> spa class="c3mment319remove_proc_device" class="sref">acpi_dutton /a> * a href="+code=button" class="sref">button /a> = a href="+code=acpi_driver_data" class="sref">acpi_driver_data /a>( a href="+code=device" class="sref">device /a>);. 220 /a>int a href="+3ode=a32/button.c#L281" id 221 /a>{.ret /a> = /a>-> a href="+code=typ4" class="sref">typ4 /a> != a href="+code=ACPI_BUTT" class="sref">NOT="sref">ACPI_BUTTON_TYPE_LID /a>). 222 /a> return3 a hr32class="comment">/* /sclass="sref">ret /a>;."sref">acpi_lid_send_state /a>(struct a href="+code=acpi_s="sref">device /a>);. 223 /a>}. 224 /a> a href="+code3EXPOR3_SYMBOton.c#L224" id 225 /a>. 226 /a>int a href="+3ode=a32/button.c#L267" id 227 /a>{.acpad_bid /a>( a href="+coef">acpad_acpi_device" class="sref">acpi_device /a> * a href="+code=device" class="sref">device /a>, a href="+code=u32" classton.c#L281" id 228 /a> return3 a hr3f="+coton.c#L228" id 229 /a>}.acpi_dutton /a> * a href="+code=button" class="sref">button /a> = a href="+code=acpi_drivton.c#L215" id 230 /a> a href="+code3EXPOR330remove_proc_device" class="sref">aut_dev /a> * a href="+code=input" class="sref">input /a>;. 231 /a>.input /he_bid /a>( a hrefhe" claer_data" class="sref">ace=devihe_bid /a>( a hrefef">ace=devihe_acpi_s="sref">device /a>);. 232 /a>int a href="+3ode=a33class="commencharss="sref">input /href.input /a hre. 233 /a>{., a herrot/button.c#L285" id 234 /a> a hre3="+co33/button.c#L245" id 235 /a> unsign3d lon3 long a href=s="sref">button /a> = a href="+code=acpi_driver_data" class="srkzallo/a>( a href="+cokzallo/acpi_dizeof_device" class="sref">acpi_dutton /a> * a href="+code=button" cldir" class="sref">GFP_=PREEamp; a href="+coGFP_=PREEai/button.c#L284" id 236 /a>.li /a> = a href="+code=acpi_drivton.c#L281" id 237 /a> if (! 3 href33 a href="+code=acEV" class="sref">ENODEV /aMEM a href="+code /aMEM/button.c#L285" id 238 /a> 3 retu33/button.c#L249" id 239 /a>.dev /a>, 0pi_driver_data /a>( a hreode=device" clanotifier_call_chain/a>-> a href="+code=input" ton.c#L285" id 240 /a> a hre3="+co34/button.c#L281" id 241 /a> 3 34=input_report_switch" class=n/a>-> a href="+code=input" class="sref">input /a>);.);._allo/=ACPI/a>-> a href="+coa>);._allo/=ACPI/a>-&acpi_tton.c#L284" id 242 /a> if ( a3href=3+code=ACPI_FAILURE class="sref">lia>);. 243 /a> 3 retu3n - a href="+code=ENODremove_fs" claserrotifier /a>, a herrot/butclass="sref">ENODEV /aMEM a href="+code /aMEM/button.c#L285" id 244 /a>.done /a>err_freedutton /a> * a href="+err_freedutton /button.c#L285" id 245 /a> return3!! a 3ref="+code=staton.c#L224" id 246 /a>}. 247 /a> a href="+code3EXPOR34=ret" class="sref">ret /a> =href.ace=devihref.ace=devihrefacpi_s="sref">device /a>);. 248 /a>.ace=devia hre.ace=devia hreacpi_s="sref">device /a>);. 249 /a>static int a 3ref="34/button.c#L260" id 250 /a>{.entry /devcmp.devicehe_bid /a>( a hrefhe" clair" class="sref">a href="drivHIDrPOWE> a href="+codea href="drivHIDrPOWE>i/butH||on.c#L260" id 251 /a> struct3 a hr35 s="sref">entry /devcmp.devicehe_bid /a>( a hrefhe" clair" class="sref">a href="drivHIDrPOWE>F a href="+codea href="drivHIDrPOWE>FBUTTutHton.c#L287" id 252 /a> unsign3d lon35class="comment">/* /spref">ret /a> = /a>-> a href="+code=typ4" class="sref">typ4 /a> != a href="+code=ACPI_BUTT"class="sref">NOT="sref">ACPI_BUTTPOWE> a href="+codea href="driv_BUTTPOWE>/button.c#L285" id 253 /a> a hre3="+co35 - a href="+code=ENODremove_fs" clasdevcpy_switch /a>( a devcpyacpi_s="sref">devicehref.NOT="sref">ACPIDEVICE_NAMTTPOWE> a href="+codea href="drivDEVICE_NAMTTPOWE>i/button.c#L284" id 254 /a> int a3href=35 0;.( a dprconfacpi_s="sref">devicea hre. 255 /a>./* /slass="sref">NOT="sref">ACPITTON_CLASS /a>, a href="+code=acpi_root_dir" class="sref">, a href="+code=acpPOWE> a href="+codea href="driv+code=acpPOWE>i/button.c#L284" id 256 /a> a hre3="+co3e=status" clas} elD_Hclass="sref">entry /devcmp.devicehe_bid /a>( a hrefhe" clair" class="sref">a href="drivHIDrsLEEP 257 /a> if ( a3href=35 a href="+code=acpi_s="sref">entry /devcmp.devicehe_bid /a>( a hrefhe" clair" class="sref">a href="drivHIDrsLEEPF a href="+codea href="drivHIDrsLEEPFBUTTutHton.c#L287" id 258 /a> 3 retu3n - a href="+code=ENODpref">ret /a> = /a>-> a href="+code=typ4" class="sref">typ4 /a> != a href="+code=ACPI_BUTT"class="sref">NOT="sref">ACPI_BUTTsLEEP 259 /a>.NOTdevcpy_switch /a>( a devcpyacpi_s="sref">devicehref.NOT="sref">ACPIDEVICE_NAMTTsLEEP 260 /a> spa 3lass=36 remove_fs" clasdprconf_switch /a>( a dprconfacpi_s="sref">devicea hre. 261 /a> a hre3="+co36 & a hrefclass="sref">in="sref">ACPITTON_CLASS /a>, a href="+code=acpi_root_dir" class="sref">, a href="+code=acpsLEEP 262 /a> a hre3="+co3e=input_sync" } elD_Hclass="sref">entry /devcmp.devicehe_bid /a>( a hrefhe" clair" class="sref">a href="drivHIDrON_TYPE_LID /a>). 263 /a>.-> a href="+code=typ4" class="sref">typ4 /a> != a href="+code=ACPI_BUTT"class="sref">NOT="sref">ACPI_BUTTON_TYPE_LID /a>). 264 /a> if ( a3href=36 0;.( a devcpyacpi_s="sref">devicehref.NOT="sref">ACPIDEVICE_NAMTTON_TYPE_LID /a>). 265 /a> 3 a h3ef="+code=pm_wakeup_event" class="sredprconf_switch /a>( a dprconfacpi_s="sref">devicea hre. 266 /a>.in="sref">ACPITTON_CLASS /a>, a href="+code=acpi_root_dir" class="sref">, a href="+code=acpON_SUBCLASS_LID /a>, a href="+code=acpi_buttotton.c#L284" id 267 /a> a hre3="+co3e=ret" class="} elD_Hton.c#L287" id 268 /a> if ( a3href=36 - a href="+code=ENODpref">ret /a> =prconock /a> * a hrefprconoacpi_s="sref">device=PRE_ER> a href="+code=PRE_ER>- a hs="sref">devicePREFIX a href="+codePREFIX- a hsLID" /spa 1, a href=Unsupode=ed he" [%s]drivers/acpi/buass="sref">SW_LIDhe_bid /a>( a hrefhe" clatton.c#L284" id 269 /a> 3 a h3ef="+code=ret" class="sref">ret /a> =errotifier /a>, a herrot/butclass="sref">ENODEV /a>;. 270 /a> 3 3 lass="sref">done /a>err_freeda>);. 271 /a> if ( a3href=3+code=ret" claton.c#L224" id 272 /a> 3 spa37/button.c#L203" id 273 /a> spa class="c3mment37=acpi_status" class="sref">aerrotifier /a>, a herrot/butcla class="sref">acpi_dutton pad_on_remove_fs /a>(struct a hread_on__dutton pad_on_remove_fs /a>(struct a hread59" class="line"3nam4 271 /a> 2 id-> a href="+code=inputA"sref">state /a>,. 269 /a> Evcpyacpi_s="sref">devicehref.NOT="sref">ACPIDEVICj2iACPI_FAILURE /."cpi/buass="sref">SW_LIDhe_bid /a>( Evcpyacpi_s="sref">devicehref.NOT="sref">ACPIDEVICj2dev /a>, 0pi_driver_data /a>( a hreode=device" clanotifier_call_chain/a>-> a href="+code=ire3="+co3oe" d" id 268 nass=j.,mov29 0;.device /a>-> a href="+code=dev"ni_sta/0 /a>( a h2="line_=PREEaref="drivers/acpi/button.c#L259" hf">device /a>-> a href="+code=dev"ni_sta/0 /a>( a h2="li)ef="driv3rs/ac36f="+code=ret" class=>devic/nfBUT0 3 a h3ef="+code=ret" class="sref">ret /a> =errotifier /a>, a herrot/butclass="sr 379 /a37t; a href="+code=dev" class="sref">dev ers/acpi/3utton.c#L281" id-& nam4 196 /a> goto 2 href29f="+co);. 196 /a> goto 2 href29f="+co=dev"ni_sta/0 /a>( a h2="li89" class="line" nam4 192 /a> a href="+code2remov29class="com=dev"ni_sta/0 /a>( a h2="liotifier /a>, a herrot/butclass="srh 3 cpi_device" class="sref"3acpi_38f="+code=input" class="sref">inpu 196 /a> goto 2 href29f="+coclass="sref">ret a> =er. class="line" namsidinput /a>);. 196 /a> goto 2 href29f="+coclass="sref">ret a> =er. class="line" nproducef="drivers/acpi/roduce="li89" class="line" nam4 192 /a> a href="+code2remov29class="comid, a herrot/butclass="srhcpi_duttof">button /a> = a href=3+code38 hread_on__dutton pad_on_remef="d 196 /a> goto 2 href29f="+codevice" class="sref">acpi. class="line" nparhref="drivers/acpi/arhre="li89"L266" class="line"3nam4 204 /a> 3 retu3n 0;., a herrot/butclass="srhstate /a>put /a>;.SW_ case a href="+code=ACam4 192 /a> a href="+code2remov29class="comid-> a href="+code=typ4" class="s287" id3287 /a> ="line" nam4 191 /a> hre3="+co35 - a href="+code=ENODremove_fs" clasdevreDEBUG_PRI_HARDWARE_EVENT /a>:.:.a href="tton pad_on_remef="d 196 /a> goto 2 href29f="+coevret" class="""""""evret [0]89" class="line" nBIT_MASomment">/* /spa BIT_MASo6, a herrot/butclass="sr_STATUS" 3lass="sref">ACPI_BUTTON_3OTIFY3STATUS /a>;. 196 /a> goto 2 href29f="+code=ret" class=""""""""""""""""""otifier /a>, a herrot/butclass="sr_rs/acpi/3276" class="line" nam43190 /a> 2 class="line"3nam4 213 /a>.;.incall_chai3/a>-> a href="+code=i3put" 3lass="sref">in="line" nam4 191 /a> hre3rs/ac35 a href="+code=aclass="sref">NOTdevreDEBUG_PRI_HARDWARE_EVENT /a>:.3yp4 /a> != a href="+cod3=ACPI3BUTT" class="sref">NOTtton pad_on_remef="d 196 /a> goto 2 href29f="+coevret" class="""""""evret [0]89" class="line" nBIT_MASomment">/* /spa BIT_MASo6, a herrot/butclass="sr(struct 3 href="+code=acpi_s="sre3">dev3ce /a>);. 196 /a> goto 2 href29f="+code=ret" class=""""""""""""""""""otifier /a>, a herrot/butclass="sr(state /a> a hre2="+co29f="3code=3m_wakeup_evt">/* /scs= class="line"3nam4 213 /a>. a href=3ifier_call_chaitest_bi.<3 href39=code=bus_gen=acpcode=ACPp_event /a>(&aEEP ="line" nam4 191 /a> hre3=36 0;.:.a href="tton pad_on_remef="d 196 /a> goto 2 href29f="+coevret" class="""""""evret [0]89" class="line" nBIT_MASomment">/* /spa BIT_MASo6, a herrot/butclass="sr(STATUS" 3de=bkeyacpi_s="sref">dev3cea>,3 a href="+code=SW_LID"rivers/acpi/butsedrivers/acpi/bulass=sedrivepa 1, a href=Unsupom4 262 /a> a hreftton pad_on_remef="d 196 /a> goto 2 href29f="+coswivers/acpi/bulass=sw""""""""otifier /a>, a herrot/butclass="sr(rs/acpi/3s="sref">buttona>);. 213 /a>.dev4cea>,4 a href="+codenam4 273 /a> spa class="c4tton" cla4s="sref">buttona>);.input /a>);.(struct a hread59" class="line"3nam4 utton.cass="l_a3href=3+code=ACPI_FAILURE .cass="l_a3hrefpa 1, a href=Unsupo#L203" id 203 /a> if ( a4 href="+c4de=device" class="sref">4evice4/a>-> a hre Evcpyacpi_s="sref">devicehref.NOT4a>.( Evcpyacpi_s=remove> 2 id " idotifier /a>, a herrot/butclass="s4="+co30f=4+code=ret" class="sref">4et /a405>-> a hre Evcpya_TYPE_LID /a>). 222 /a> return3 a hr32class="comment">/* /sclass="sref">ret /aa>-> a href="+code=typ4" class="4mp; acode4bus_gen=acpcode=ACPp_eva4pi_s=4sref">device /a>);. 223 /a>}. 224 4198 /a>.<4 href="driv3="+co3e=remo4e_pro4_defaultton.c#L288" id * It is also regarded as success if the notifier_chain /4> 4 3 3 a href4"+cod4=aclasam4 275 /a> spa class="comment">Thclassid9 4 ="sref">buttona>);. 275 /a> spa class="comment">more we only care about * 75"t one..ef="drivers/acpi/button.c#L276" idS a href="+code=ret" class="sref">ret /a> = 0;. 224 4ef="driv34s/ac31i/button.c#L224" i4 214 /a> retur430;.SW_LID4ONFIG4133"> 269 /a> Evcpyaam4 204 /a> 3 retu3n 0;. 204 /a> tton.cacpi. class="line" nflag 2 idret valclet /aa>-> a href="+code=typ4" class="4tton.c#L245" id = 0;.4 /a>)41ref">device /a>);. 204 /a> tton.cacpi. class="line" ngd.<4emove_proc_device" class4"sref41class="sref">a href="driice /a>);. 204 /a> tton.cacpi. class="line" ngd 2gd 224 4class="sr4f">device /a>, a href="4code=41a href="+code=SW_LID""drivHIDrON_TYPE_LID/a>statmay_tton.c203"> 204 /a> /a>statmay_tton.c="driL266" class="line"3nam4 204 /a> 3 retu3n 0;.-> a href="+code=typ4" class="4class="sr4f">button /a> = a href=4+code41vers/acpi/button.c#L263" id 204 /a> /a>statsedrtton.c#Lnable="driL266" class="line"3nam4 204 /a> 3 retu3n 0;. 224 4ers/a32co4e=ret" class="sref">ret 4a> = 42a href="+code=SW_LID" class="sref">SW_LIDkey_TYPE_LID /a>).ret tton.c#Lnableld59" class="line"3nam4tru 224 4e12 /a> 4!= a href="+code=ACPI_B4TT" c42ton.c#L280" id 214 /a> retur4struct a4href="+code=acpi_s="sref4>devi42 class="line"3nam4 214 /a> retur4a> a href4"+code3EXPOR3_SYMBOton.c4L224"42. 269 /a> class="line" nprePREFIX- a hsLID" /spa 1, a href=Unsupode=ed de=ed 3"> 2 a href=Unsupoe_bid /a>( a hrefhe" clatton.c#L284" id 3 a h3ef="+code=ret"utton.c#L284" idstatbe"3nam4 232 /a>int abhref="+3ode=a33class="commencharss="sref">input /href.215" class="line"3nam4 224 4eton.c#L24a32/button.c#L267" id 225 /a>.acpad_bid /a>( a href="+coef">acp4d_acpi_de4ice" class="sref">acpi_d4vice 4a> * a>( Evcpyacpi_s=remove> 2 id " idreDEBUG_PRI_HARDWARE_EVENT /a>:.devicess="li aremove> 2 id 224 4class="sr4f">button /a> = a href=4+code4acpi_dr( Evcpyacpi_s="sref">devicehref.i4put /a>;. 203 /a> if ( a4class="sr4f">ace=devihe_bid /a>( a4hrefe4">ace=d( Evcpyacpi_s="srefref="+code=staton.c#L224" id:.input /a>);.). 203 /a> if ( a4c> a href4lass="line"3nam44234 /43ddevicehref. 203 /a> if ( a4crs/ac3i/4g a href=s="sref">butto4 /a> 43ass="line"3nam4 226 /a>int a h4"srkzallo4a>( a href="+cokzallo/ac4i_diz43=code=bus_gen=acpcode=ACPp_event /a>(&4" id 2343device /a.move2 idu32 /a> a href="+code=event" class="sref">event /a>).(&4"_acpi_de45" id). 236 /a>.device /a>);. 220 /a>int a href="+3ode=a32/button.c#L281" id 221 /a>{.-44sref">a href="dri Evcpyaam4 204 /a> 3 retu3n 0;. 204 /a> tton.cacpi. class="line" nflag 2 idret valclet /aa>-> a href="+code=typ4" class="4put /a>);4 204 /a> tton.cacpi. class="line" ngd 2444UTT" class="sref">NOT#L280" id 204 /a> tton.cacpi. class="line" ngd 2gd 224 4ef">ENODE4 /aMEM a href="+code /a4EM/bu4ton.c#L285" id).ret tton.c#Lnableld59"/=bus_gen=acpcode=ACPp_event /a>(&4_freedutt4n /button.c#L285" idd 204 /a> /a>statsedrtton.c#Lnable="driL266" class="line"3nam4 204 /a> 3 retu3n 0;. 204 /a> falsLd 224 4esrkzallo4rs/a34/button.c#L267" id4/L2674 class="line"3nam4 247 /a> a href="+code4EXPOR34=r4t" class="sref">ret /a> 4href.4a href="drivehrefBUTTer_data" class="sr4f">ace=de4ihref.4ce=de4ihrefacpi_s="sref">device /a>ss="li aremove> 2 id 224 4ref">ace=4evia hre.ace4devia hreacpi_s="sref">deviceILURE un.cass="l_a3href=3+code=ACPI_FAILURE un.cass="l_a3hrefpa 1, a href=Unsupo_TYPE_LID /a>).);._allo/=ACP215" class="line"3nam4 224 4ra>, 0pi_4de=entry" class="sref">e4try /44 clanotifier_call_chain/a>-&k id<" class="""""""" id). 203 /a> if ( a4devicehe_4id /a>( a hrefhe" clair"4class4"sref">a href=s="line"3nam4 225 /a>. 247 /a> a href="+code4ref">typ44/a> != a href="+code=AC4I_BUT45ier /a>, a herrot/butcla class="sref"4f">device4ref.int LID /a>).int pa 1, a href=Unsuposs="li aa>int LID /a>). 203 /a> if ( a4dfreedutt4ea hre. The original LXR software by * m4LXR hreunity" idefthclaexperief="al 03 /ion by m4lxl@refux.noacpi.
lxl.refux.no kindly hos233"by m4Redpill Lefpro As="lineprovider of Lefuxacpi_ulting and op+s="ions serhrefs since 1995.