linux/drivers/acpi/button.c
<<
>>
Prefs
   1/*
   2 *  button.c - ACPI Button Driver
   3 *
   4 *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
   5 *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
   6 *
   7 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   8 *
   9 *  This program is free software; you can redistribute it and/or modify
  10 *  it under the terms of the GNU General Public License as published by
  11 *  the Free Software Foundation; either version 2 of the License, or (at
  12 *  your option) any later version.
  13 *
  14 *  This program is distributed in the hope that it will be useful, but
  15 *  WITHOUT ANY WARRANTY; without even the implied warranty of
  16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17 *  General Public License for more details.
  18 *
  19 *  You should have received a copy of the GNU General Public License along
  20 *  with this program; if not, write to the Free Software Foundation, Inc.,
  21 *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  22 *
  23 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24 */
  25
  26#include <linux/kernel.h>
  27#include <linux/module.h>
  28#include <linux/init.h>
  29#include <linux/types.h>
  30#include <linux/proc_fs.h>
  31#include <linux/seq_file.h>
  32#include <linux/input.h>
  33#include <linux/slab.h>
  34#include <acpi/acpi_bus.h>
  35#include <acpi/acpi_drivers.h>
  36
  37#define PREFIX "ACPI: "
  38
  39#define ACPI_BUTTON_CLASS               "button"
  40#define ACPI_BUTTON_FILE_INFO           "info"
  41#define ACPI_BUTTON_FILE_STATE          "state"
  42#define ACPI_BUTTON_TYPE_UNKNOWN        0x00
  43#define ACPI_BUTTON_NOTIFY_STATUS       0x80
  44
  45#define ACPI_BUTTON_SUBCLASS_POWER      "power"
  46#define ACPI_BUTTON_HID_POWER           "PNP0C0C"
  47#define ACPI_BUTTON_DEVICE_NAME_POWER   "Power Button"
  48#define ACPI_BUTTON_TYPE_POWER          0x01
  49
  50#define ACPI_BUTTON_SUBCLASS_SLEEP      "sleep"
  51#define ACPI_BUTTON_HID_SLEEP           "PNP0C0E"
  52#define ACPI_BUTTON_DEVICE_NAME_SLEEP   "Sleep Button"
  53#define ACPI_BUTTON_TYPE_SLEEP          0x03
  54
  55#define ACPI_BUTTON_SUBCLASS_LID        "lid"
  56#define ACPI_BUTTON_HID_LID             "PNP0C0D"
  57#define ACPI_BUTTON_DEVICE_NAME_LID     "Lid Switch"
  58#define ACPI_BUTTON_TYPE_LID            0x05
  59
  60#define _COMPONENT              ACPI_BUTTON_COMPONENT
  61ACPI_MODULE_NAME("button");
  62
  63MODULE_AUTHOR("Paul Diefenbaugh");
  64MODULE_DESCRIPTION("ACPI Button Driver");
  65MODULE_LICENSE("GPL");
  66
  67static const struct acpi_device_id button_device_ids[] = {
  68        {ACPI_BUTTON_HID_LID,    0},
  69        {ACPI_BUTTON_HID_SLEEP,  0},
  70        {ACPI_BUTTON_HID_SLEEPF, 0},
  71        {ACPI_BUTTON_HID_POWER,  0},
  72        {ACPI_BUTTON_HID_POWERF, 0},
  73        {"", 0},
  74};
  75MODULE_DEVICE_TABLE(acpi, button_device_ids);
  76
  77static int acpi_button_add(struct acpi_device *device);
  78static int acpi_button_remove(struct acpi_device *device, int type);
  79static void acpi_button_notify(struct acpi_device *device, u32 event);
  80
  81#ifdef CONFIG_PM_SLEEP
  82static int acpi_button_resume(struct device *dev);
  83#endif
  84static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume);
  85
  86static struct acpi_driver acpi_button_driver = {
  87        .name = "button",
  88        .class = ACPI_BUTTON_CLASS,
  89        .ids = button_device_ids,
  90        .ops = {
  91                .add = acpi_button_add,
  92                .remove = acpi_button_remove,
  93                .notify = acpi_button_notify,
  94        },
  95        .drv.pm = &acpi_button_pm,
  96};
  97
  98struct acpi_button {
  99        unsigned int type;
 100        struct 5">  15type;
        phy    .32];e" name="L93">  DEVICE_NAME_LID>   1 */
  9nera 100        puubli   .type;
idsacpi_drivwakeup_enablli   .type;
  74};
  85
acpi_drivBLOCKINGass="sIER_HEAode=ACPI_BUTTON_BLOCKINGass="sIER_HEAoref">SIMPLE_DEV_PM_OPSacpi_button_resume);
(struct acpi_deviclidat type;
  38
  19
  10<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  11< G-------------------------------------------------------------------------- */
  62
(h" cldir_entrcode=acpi_buttonh" cldir_entrcass="sref">acpi_devic_driver" clasicode=acpi_button_driver" clasirype" class="sref">type;
(h" cldir_entrcode=acpi_buttonh" cldir_entrcass="sref">acpi_devic_drivlidaticode=acpi_button_drivlidaticype" class="sref">type;
  85
  82static int acpi_button_resume(h" classode=acpi_buttonh" classass="sref">acpi_devich" ode=acpi_buttonh" ULL" c="L79sref">acpi_devicoffse= href="+code=OWoffse=ef">ae" name="L85">  85
acpi_button {
(struct acpi_device *notifyh" ode=acpi_buttonh" ULL"-.diefon_notify(h"ivlasode=acpi_buttonh"ivlasype" class="sref">type;
(struc clau    .acpi_driv clau    .type;
  9nera nera 100         clas   .type;
type;
( clau    .notify ekup"las_lt;pg+code=acpi_button_drivekup"las_lt;pg+cref">SIMPLE_DEV_PM_Oe *(handssode=acpi_buttonhandssULL" clss="sref">name = acpi_button_pm, pm  clas   .);
idsh" ch"intfode=acpi_buttonh" ch"intfref">SIMPLE_DEV_PM_Oh" ode=acpi_buttonh" ULL" cLE_STATE          "button",
  DEVs="sref">class FAILUR"+code=ACPI_MODULE_NAFAILUR"ref">SIMPLE_DEV_PM_Ohclau    . :t;button",
  DEEEEEE>SIMPLE_DEV_PM_Ohclas   .           :cLE_STATE          )acpi_button_resume);
);
  38
  82static int acpi_button_resume(in/a> href="+code=OWER/a>class="sref">5">  15 href="+code=OWER/a>clas,=cpi_button_notify(lassode=acpi_buttonlassass="sref">acpi_deviclassode=acpi_buttonlassass=ae" name="L85">  85
acpi_button {
SIMPLE_DEV_PM_Olassode=acpi_buttonlassass= class="sref">NULL,  class="sref">NULPD"+code=ACPI_MODUPD"ref">SIMPLE_DEV_PM_O/n/a> href="+code=OWER/a>clas)-.diefon_notify(data*);
);
  67static const ="conoperhe Fr    .acpi_driver ops = {
  95  own+code=acpi_buttonown+cass=lass="sref">notifyTHISAME" clode=acpi_buttonTHISAME" cl="sref">acpi_button_pm,
  95  open   .notify = ef">acpi_button_pm,
  87  reai   .notifyh" _reai   .ef">acpi_button_pm,
  88  llseekref="+code=acpillseeke" class="sref">notifyh" _lseekref="+code=acpih" _lseekef">ef">acpi_button_pm,
  89  releas .notifyh   ls_releas .ef">acpi_button_pm,
  74};
type;
  82static int acpi_button_resume(struct acpi_device *type;
ops = {
  98struct acpi_devict notify >ops >opsSIMPLE_DEV_PM_Oe *);
  98h" cldir_entrcode=acpi_buttonh" cldir_entrcass="sref">acpi_devicentrcode=acpi_buttonentrcass="ass="sref">notifym, );
  82statre= href="+code=OWre=ef">"as0cpi_button_resume);
  97
  19 */
SIMPLE_DEV_PM_Ot (ed int class = AClclass="sref">type;
);
type;
SIMPLE_DEV_PM_O_driver" clasicode=acpi_button_driver" clasirype" ||ss="sref">notify lidaticode=acpi_button_drivlidaticype")class="sref">ops = {
  fon_notify(h"intkref="+code=acpih"intkref">SIMPLE_DEV_PM_OKERN_ERe=ACPI_BUTTON_HIKERN_EReass="sref">acpi_drivdefine PREFIX "button");
 thod="p-sref">acpi_drivEEXISe=ACPI_BUTTON_COEEXISeULL"cpi_button_resume);
);
  76
  19
 */
classh" clmksicode=acpi_buttonh" clmksicref">SIMPLE_DEV_PM_O = =eIMPLE_DEV_PM_O_drivrootasicode=acpi_button_drivrootasice" cacpi_button_resume);
!eIMPLE_DEV_PM_O_driver" clasicode=acpi_button_driver" clasirype"lclass="sref">type;
acpi_drivENODEV=ACPI_BUTTON_COENODEVULL"cpi_button_resume);
type;
  19
 */
ids lidaticode=acpi_button_drivlidaticype" lass="sref">classh" clmksicode=acpi_buttonh" clmksicref">SIMPLE_DEV_PM_O = ACPI_B class="sref">NULL, );
!eIMPLE_DEV_PM_O_drivlidaticode=acpi_button_drivlidaticype")class="sref">ops = {
 2">  82statre= href="+code=OWre=ef">"as-sref">acpi_drivENODEV=ACPI_BUTTON_COENODEVULL"cpi_button_resume);
 goto 2">  82statre="sr>, , );
);
  38
  19
AC/espan class="comment"> */
(struct SIMPLE_DEV_PM_Oe *classh" clmksicode=acpi_buttonh" clmksicref">SIMPLE_DEV_PM_O_drivt NULLlidaticode=acpi_button_drivlidaticype")cpi_button_resume);
!eIMPLE_DEV_PM_O_drivt SIMPLE_DEV_PM_Oe *ops = {
  2">  82statre= href="+code=OWre=ef">"as-sref">acpi_drivENODEV=ACPI_BUTTON_COENODEVULL"cpi_button_resume);
  goto 2">  82statre="sr>lidaticode=acpi_buttonre="sr>lidaticULL"cpi_button_resume);
);
  85
  19
AC/ clasespan class="comment"> */
(entrcode=acpi_buttonentrcass="ass="sref">notifyh" clcreate_data*SIMPLE_DEV_PM_O = ACPIef">acpi_button_pm,
                   SIMPLE_DEV_PM_OS_IRUGe=ACPI_BUTTON_FIS_IRUGePI_B class="sref">NULLt SIMPLE_DEV_PM_Oe *acpi_button_pm,
                   class="sref">pm = &NULe *);
!eIMPLE_DEV_PM_Oentrcode=acpi_buttonentrcass=)class="sref">ops = {
  2">  82statre= href="+code=OWre=ef">"as-sref">acpi_drivENODEV=ACPI_BUTTON_COENODEVULL"cpi_button_resume);
  goto 2">  82statre="sr>=deaticode=acpi_buttonre="sr>=deaticULL"cpi_button_resume);
);
  54
 dontena href="+code=ont"lin:t;button",
  82statre= href="+code=OWre=ef">cpi_button_resume);
  97
  82statre="sr>=deaticode=acpi_buttonre="sr>=deaticULL":t;button",
(re="sr>h" clentrcode=acpi_buttonre="sr>h" clentrcref">SIMPLE_DEV_PM_O_drivt ,
  2">  82statLlidaticode=acpi_button_drivlidaticype")cpi_button_resume);
(struct SIMPLE_DEV_PM_Oe *classm, );
  82statre="sr>lidaticode=acpi_buttonre="sr>lidaticULL":t;button",
idsre="sr>h" clentrcode=acpi_buttonre="sr>h" clentrcref">SIMPLE_DEV_PM_O = ACPI_B class="sref">NULL, );
 re="sr>, , ,
idsre="sr>h" clentrcode=acpi_buttonre="sr>h" clentrcref">SIMPLE_DEV_PM_O = =eIMPLE_DEV_PM_O_drivrootasicode=acpi_button_drivrootasice" cacpi_button_resume);
  82statdontena href="+code=ont"lincpi_button_resume);
  38
  82static int cpi_button_resume(struct acpi_device *type;
acpi_button {
  98struct acpi_devict notify >ops >opsSIMPLE_DEV_PM_Oe *);
  62
SIMPLE_DEV_PM_Ot (ed int class = AClclass="sref">type;
 thod="p0cpi_button_resume);
  85
idsre="sr>h" clentrcode=acpi_buttonre="sr>h" clentrcref">SIMPLE_DEV_PM_O = ACPIef">acpi_button_pm,
 e="L91">  2">  82statLt SIMPLE_DEV_PM_Oe *);
h" clentrcode=acpi_buttonre="sr>h" clentrcref">SIMPLE_DEV_PM_O_drivt ,
            2">  82statLlidaticode=acpi_button_drivlidaticype")cpi_button_resume);
(struct SIMPLE_DEV_PM_Oe *classm, );
(re="sr>h" clentrcode=acpi_buttonre="sr>h" clentrcref">SIMPLE_DEV_PM_O = ACPI_B class="sref">NULL, );
(re="sr>h" clentrcode=acpi_buttonre="sr>h" clentrcref">SIMPLE_DEV_PM_O = =eIMPLE_DEV_PM_O_drivrootasicode=acpi_button_drivrootasice" cacpi_button_resume);
);
  76
  19
  10<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ing">&q Interfaasicense as published by
  19  G-------------------------------------------------------------------------- */
  82static inlidass="si+crregist+code=acpi_button_drivlidass="si+crregist+cref">cpi_button_resume(ss="si+crblockref="+code=acpiss="si+crblockass="sref">acpi_devicnbref="+code=acpisb">AClclass="sref">type;
acpi_button {
  82statblockingass="si+crchainrregist+code=acpi_buttonblockingass="si+crchainrregist+cref">class="sref">pm = &amlidass="si+code=acpi_button_drivlidass="si+cef">>=eIMPLE_DEV_PM_Onbref="+code=acpisb">AClcpi_button_resume);
 EXPORT_SYMBOa>, SIMPLE_DEV_PM_O_drivlidass="si+crregist+code=acpi_button_drivlidass="si+crregist+cref"lcpi_button_resume);
  85
  82static inlidass="si+crunregist+code=acpi_button_drivlidass="si+crunregist+cref">cpi_button_resume(ss="si+crblockref="+code=acpiss="si+crblockass="sref">acpi_devicnbref="+code=acpisb">AClclass="sref">type;
acpi_button {
  82statblockingass="si+crchainrunregist+code=acpi_buttonblockingass="si+crchainrunregist+cref">class="sref">pm = &amlidass="si+code=acpi_button_drivlidass="si+cef">>=eIMPLE_DEV_PM_Onbref="+code=acpisb">AClcpi_button_resume);
 EXPORT_SYMBOa>, SIMPLE_DEV_PM_O_drivlidass="si+crunregist+code=acpi_button_drivlidass="si+crunregist+cref"lcpi_button_resume);
type;
  82static inlidaopen   .="L7lclass="sref">type;
ops = {
  82static in clau    .acpi_driv clau    .type;
  9nera nera 100         clas   .type;
  76
!eIMPLE_DEV_PM_Olidat type;
  thod="p-sref">acpi_drivENODEV=ACPI_BUTTON_COENODEVULL"cpi_button_resume);
  59
( clau    .notify ekup"las_lt;pg+code=acpi_button_drivekup"las_lt;pg+cref">SIMPLE_DEV_PM_Olidat (handssode=acpi_buttonhandssULL" clss="sref">name = acpi_button_pm,   59
                         class="sref">pm  clas   .);
SIMPLE_DEV_PM_O FAILUR"+code=ACPI_MODULE_NAFAILUR"ref">SIMPLE_DEV_PM_Ohclau    .type;
  thod="p-sref">acpi_drivENODEV=ACPI_BUTTON_COENODEVULL"cpi_button_resume);
  54
type;
);
 EXPORT_SYMBOa>, SIMPLE_DEV_PM_O_drivlidaopen   .);
  38
  82static inlidasend_ clas   .cpi_button_resume(struct acpi_device *type;
acpi_button {
  98struct acpi_devict notify >ops >opsSIMPLE_DEV_PM_Oe * {
  9nera nera 100         clas   .type;
ids  clau    .acpi_driv clau    .type;
  82statre= href="+code=OWre=ef"> class="sref">type;
  85
ids clau    .notify ekup"las_lt;pg+code=acpi_button_drivekup"las_lt;pg+cref">SIMPLE_DEV_PM_Oe *(handssode=acpi_buttonhandssULL" clss="sref">name = acpi_button_pm, pm  clas   .);
SIMPLE_DEV_PM_O FAILUR"+code=ACPI_MODULE_NAFAILUR"ref">SIMPLE_DEV_PM_Ohclau    .type;
  thod="p-sref">acpi_drivENODEV=ACPI_BUTTON_COENODEVULL"cpi_button_resume);
  59
  19 */
(ER"_dereport_switch=ACPI_BUTTON_COER"_dereport_switchref">SIMPLE_DEV_PM_Ot (/noe= href="+code=OWER"_dype"g"">acpi_button_pSWe=ACPI_BUTTON_SUBCLSWe=ACype"g"!eIMPLE_DEV_PM_O clas   .);
(ER"_desync=ACPI_BUTTON_COER"_desyncref">SIMPLE_DEV_PM_Ot (/noe= href="+code=OWER"_dype"acpi_button_resume);
eIMPLE_DEV_PM_O clas   .);
 2">  82statpm_wakeup_e=eve   .class="sref">pm e *(e *  76
(re= href="+code=OWre=ef">"as2">  82statblockingass="si+crcallrchainode=acpi_buttonblockingass="si+crcallrchainref">class="sref">pm = &amlidass="si+code=acpi_button_drivlidass="si+cef">>=eIMPLE_DEV_PM_O clas   .NULe *);
eIMPLE_DEV_PM_Ore= href="+code=OWre=ef">"alass="sref">classms="sY_DON"+code=ACPI_MODUms="sY_DON"ype"api_button_resume);
  ton_resume(re= href="+code=OWre=ef">"as2">  82statblockingass="si+crcallrchainode=acpi_buttonblockingass="si+crcallrchainref">class="sref">pm = &amlidass="si+code=acpi_button_drivlidass="si+cef">>=eIMPLE_DEV_PM_O clas   .);
                           lass="sref">NULe *);
eIMPLE_DEV_PM_Ore= href="+code=OWre=ef">"alass="sref">classms="sY_DON"+code=ACPI_MODUms="sY_DON"ype" ||ss="sref">notifyre= href="+code=OWre=ef">"alass="sref">classms="sY_OK+code=ACPI_MODUms="sY_OKe" caclass="sref">ops = {
  2" name="L19">  19 */
  10<<<<<<<<<<<<<<<<<* Ie is also thgarded as success=ifEthe ss="si+crchainan class="comment"> */
  10<<<<<<<<<<<<<<<<<* thod="s ms="sY_OK or ms="sY_DON".an class="comment"> */
  10<<<<<<<<<<<<<<<<<*pan class="comment"> */
 ton_resume(re= href="+code=OWre=ef">"as0cpi_button_resume);
);
  82statre= href="+code=OWre=ef"> class="sref">type;
);
  98struct cpi_button_resume(struct acpi_device *=eIMPLE_DEV_PM_Oupi/button.c"+codeude=u32=ton_resume(e=eve   .);
ops = {
  98struct acpi_devict notify >ops >opsSIMPLE_DEV_PM_Oe * {
  98ER"_dee *acpi_devic/noe= href="+code=OWER"_dype"cpi_button_resume {
  85
ops = {
class FIXED_HARDWARE_EVENe=ACPI_BUTTON_CO FIXED_HARDWARE_EVENe"lin:t;button",
  eIMPLE_DEV_PM_Oe=eve   .notifyN_CLASS" clams="sY_ref"U+code=ACPI_BUTTON_CLASS" clams="sY_ref"U+ype"cpi_button_resume {
  t" name="L19">  19 */
class SS" clams="sY_ref"U+code=ACPI_BUTTON_CLASS" clams="sY_ref"U+ype":t;button",
  2">  82stat/noe= href="+code=OWER"_dype""as2">  82statb (/noe= href="+code=OWER"_dype"cpi_button_resume {
  ifE>SIMPLE_DEV_PM_Ot (ed int class = AClclass="sref">ops = {
  "L91">  2">  82static inlidasend_ clas   .SIMPLE_DEV_PM_Oe * {
 } elseElass="sref">ops = {
 "L92">  i"L82">  82statkey>sta*  82stattest_bi= href="+code=OWtest_bi=ref">SIMPLE_DEV_PM_OKEY_rLEEP href="+code=OWKEY_rLEEPe" c>=eIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"-.diefon_notify(keybi= href="+code=OWkeybi=">AClc?ass="sref">ops = {
                                 SIMPLE_DEV_PM_OKEY_rLEEP href="+code=OWKEY_rLEEPe" c :cLIMPLE_DEV_PM_OKEY_POWEe=ACPI_BUTTON_HIKEY_POWEeype"cpi_button_resume {
  97
          ton_resume(ER"_dereport_key=ACPI_BUTTON_COER"_dereport_keyref">SIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"g"">acpi_button_pkey>sta* {
          ton_notify(ER"_desync=ACPI_BUTTON_COER"_desyncref">SIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"acpi_button_resume);
ton_resume(ER"_dereport_key=ACPI_BUTTON_COER"_dereport_keyref">SIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"g"">acpi_button_pkey>sta*);
          ton_notify(ER"_desync=ACPI_BUTTON_COER"_desyncref">SIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"acpi_button_resume);
  62
  "L91">  2">  82statpm_wakeup_e=eve   .class="sref">pm e *(e * }pi_button_resume);
  85
 ton_resume(_buttons_generher>h" cle=eve   .SIMPLE_DEV_PM_Oe *acpi_button_pe=eve   .(pushef="+code=acpi_depushefype"acpi_button_resume);
 breakcpi_button_resume);
,
  ss="sref">class DEBUG_PRINe=ACPI_BUTTON_CO DEBUG_PRINeref">>SIMPLE_DEV_PM_O DB_INFe=ACPI_BUTTON_FI DB_INFeype" pi_button_resume);
          lss="sref">name = &qug"">acpi_button_pe=eve   .);
  breakcpi_button_resume);
);
  54
acpi_button_pCONFIG_PM_rLEEP href="+code=OWCONFIG_PM_rLEEP"line" name="L54">  54
  82static int cpi_button_resume(e *acpi_device *acpi_button {
(struct acpi_device *  82statto_struct SIMPLE_DEV_PM_Oe *(struct acpi_devict notify >ops >opsSIMPLE_DEV_PM_Oe * {
);
eIMPLE_DEV_PM_Ot (ed int class = AClpi_button_resume);
  thod="p2">  82static inlidasend_ clas   .SIMPLE_DEV_PM_Oe * {
);
  76
  82static int cpi_button_resume(struct acpi_device *);
acpi_button {
(struct acpi_devict );
(ER"_dee *acpi_devic/noe= href="+code=OWER"_dype"cpi_button_resume {
acpi_devichef="+code=acpi_dehss="sr"ass="sref">notify > SIMPLE_DEV_PM_Oe * {
acpi_devicid="*acpi_devica hre* {
  82staterrocode=acpi_buttonerrocype"cpi_button_resume {
  54
acpi_devict notifykzalloc=ACPI_BUTTON_COkzallocref">cizeof>cpi_button_resume(struct NULGFP_KERNEa>,  {
!eIMPLE_DEV_PM_Ot );
 thod="p-sref">acpi_drivENOMEMref="+code=acpiENOMEMype"cpi_button_resume {
  38
(e *(eopsops  82statb  {
);
(b (/noe= href="+code=OWER"_dype""as2">  82stat/noe= href="+code=OWER"_dype""as2">  82stat/noe=_allocate_d *acpi_button_resume {
!eIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"aElass="sref">ops = {
  2">  82staterrocode=acpi_buttonerrocype""as-sref">acpi_drivENOMEMref="+code=acpiENOMEMype"cpi_button_resume {
 goto 2">  82staterr_freect  {
);
  76
(id="*notify >  > SIMPLE_DEV_PM_Oe * {
notify > SIMPLE_DEV_PM_Oe * {
  59
!eIMPLE_DEV_PM_Ocpicmp*SIMPLE_DEV_PM_Ohef="+code=acpi_dehss="sr class="sref">NULYPE_LID" claHID_POWEe=ACPI_BUTTON_HIYPE_LID" claHID_POWEeype"aE||e" name="L59">  59
SIMPLE_DEV_PM_Ohef="+code=acpi_dehss="sr class="sref">NULYPE_LID" claHID_POWEeF=ACPI_BUTTON_HIYPE_LID" claHID_POWEeFref"a)Elass="sref">ops = {
  2IMPLE_DEV_PM_Ot (ed int class =  {
  2">  82statcpicpy=ACPI_BUTTON_COcpicpyref">SIMPLE_DEV_PM_Oid="*class =  {
 2">  82statcpri"Lf=ACPI_BUTTON_COcpri"Lfref">SIMPLE_DEV_PM_Oa hre*name = &qugpi_button_resume {
 "L92">  ss="sref">class = =eIMPLE_DEV_PM_OASS_LID" class="sref"POWEe=ACPI_BUTTON_HIYPE_LID" class="sref"POWEee" cacpi_button_resume {
!eIMPLE_DEV_PM_Ocpicmp*SIMPLE_DEV_PM_Ohef="+code=acpi_dehss="sr class="sref">NULYPE_LID" claHID_rLEEP href="+code=OWYPE_LID" claHID_rLEEPype"aE||e" name="L59">  59
 e="!eIMPLE_DEV_PM_Ocpicmp*SIMPLE_DEV_PM_Ohef="+code=acpi_dehss="sr class="sref">NULYPE_LID" claHID_rLEEPF=ACPI_BUTTON_HIYPE_LID" claHID_rLEEPFref"a)Elass="sref">ops = {
  2IMPLE_DEV_PM_Ot (ed int class =  {
  ss="sref">classcpicpy=ACPI_BUTTON_COcpicpyref">SIMPLE_DEV_PM_Oid="*class =  {
  82statcpri"Lf=ACPI_BUTTON_COcpri"Lfref">SIMPLE_DEV_PM_Oa hre*name = &qugpi_button_resume {
          ton_notify( = =eIMPLE_DEV_PM_OASS_LID" class="sref"rLEEP href="+code=OWYPE_LID" class="sref"rLEEPe" cacpi_button_resume {
!eIMPLE_DEV_PM_Ocpicmp*SIMPLE_DEV_PM_Ohef="+code=acpi_dehss="sr class="sref">NULYPE_LID" claHID_code=ACPI_BUTTON_TYPE_LID" claHID_codref"a)Elass="sref">ops = {
  2">  82statt (ed int class = ACcpi_button_resume {
 2">  82statcpicpy=ACPI_BUTTON_COcpicpyref">SIMPLE_DEV_PM_Oid="*class =  {
 2">  82statcpri"Lf=ACPI_BUTTON_COcpri"Lfref">SIMPLE_DEV_PM_Oa hre*name = &qugpi_button_resume {
         ton_notify( = =eIMPLE_DEV_PM_OASS_LID" class="sref"=ACPI_BUTTON_SUBCLASS_LID" class="sref">ACPI_Bacpi_button_resume {
ops = {
  2IMPLE_DEV_PM_Opri"Lkref="+code=acpipri"Lkref">SIMPLE_DEV_PM_OKERN_ERe=ACPI_BUTTON_HIKERN_ERe"lineSIMPLE_DEV_PM_OPREFIX=ACPI_BUTTON_HIPREFIX"lineSss="sref">name = &qug"">acpi_button_phef="+code=acpi_dehss="sracpi_button_resume {
  ton_resume(errocode=acpi_buttonerrocype""as-sref">acpi_drivENODEV=ACPI_BUTTON_COENODEVULL"cpi_button_resume);
  82staterr_freec/noe= href="+code=OWerr_freec/noe=ULL"cpi_button_resume);
);
  62
idserrocode=acpi_buttonerrocype""aston_resume(struct f    .SIMPLE_DEV_PM_Oe * {
eIMPLE_DEV_PM_Oerrocode=acpi_buttonerrocype"lpi_button_resume);
 goto 2">  82staterr_freec/noe= href="+code=OWerr_freec/noe=ULL"cpi_button_resume);
  76
(snpri"Lf=ACPI_BUTTON_COcnpri"Lfref">SIMPLE_DEV_PM_Ot (phy    .=cizeof>SIMPLE_DEV_PM_Ot (phy    .name = &qug"">acpi_button_phef="+code=acpi_dehss="sracpi_button_resume {
  38
(/noe= href="+code=OWER"_dype"-.diefon_notify(id="*notifyid="* {
(/noe= href="+code=OWER"_dype"-.diefon_notify(phy    .  82statb (phy    . {
(ER"_d href="+code=OWER"_dype"-.diefon_notify(ef="+code=acpi_dess="sr.2">  82statb sed int   82statBUS_HOSe=ACPI_BUTTON_COBUS_HOSeref"cpi_button_resume {
(ER"_d href="+code=OWER"_dype"-.diefon_notify(ef="+code=acpi_dess="sr.2">  82statproduce   .  82statb (ed int  {
idsER"_d href="+code=OWER"_dype"-.diefon_notify(e *  82statpareve   .pm e *(e *  54
eIMPLE_DEV_PM_Ob (ed int ops = {
class SS" claef="+POWEe=ACPI_BUTTON_HIYPE_LID" claef="+POWEeype":t;button",
 lass="sref">idsER"_d href="+code=OWER"_dype"-.diefon_notify(evbi= href="+code=OWevbi=ype"[0]"as2">  82statBIT_MASK+code=ACPI_MODUBIT_MASKref">SIMPLE_DEV_PM_OEV_KEY=ACPI_BUTTON_COEV_KEY="sracpi_button_resume {
  eIMPLE_DEV_PM_Oset_bi= href="+code=OWset_bi=ref">SIMPLE_DEV_PM_OKEY_POWEe=ACPI_BUTTON_HIKEY_POWEeype">=eIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"-.diefon_notify(keybi= href="+code=OWkeybi=">AClcpi_button_resume {
  breakcpi_button_resume);
);
class SS" claef="+rLEEP href="+code=OWYPE_LID" claef="+rLEEPype":t;button",
  lass="sref">idsER"_d href="+code=OWER"_dype"-.diefon_notify(evbi= href="+code=OWevbi=ype"[0]"as2">  82statBIT_MASK+code=ACPI_MODUBIT_MASKref">SIMPLE_DEV_PM_OEV_KEY=ACPI_BUTTON_COEV_KEY="sracpi_button_resume {
  eIMPLE_DEV_PM_Oset_bi= href="+code=OWset_bi=ref">SIMPLE_DEV_PM_OKEY_rLEEP href="+code=OWKEY_rLEEPe" c>=eIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"-.diefon_notify(keybi= href="+code=OWkeybi=">AClcpi_button_resume {
 breakcpi_button_resume);
  85
class SS" claef="+code=ACPI_BUTTON_TYPE_LID" class="sref">AC:t;button",
 lass="sref">idsER"_d href="+code=OWER"_dype"-.diefon_notify(evbi= href="+code=OWevbi=ype"[0]"as2">  82statBIT_MASK+code=ACPI_MODUBIT_MASKref">SIMPLE_DEV_PM_OEV_SW=ACPI_BUTTON_COEV_SW">AClcpi_button_resume {
  eIMPLE_DEV_PM_Oset_bi= href="+code=OWset_bi=ref">SIMPLE_DEV_PM_OSWe=ACPI_BUTTON_SUBCLSWe=ACype"g"lass="sref">idsER"_d href="+code=OWER"_dype"-.diefon_notify(swbi= href="+code=OWswbi=">AClcpi_button_resume {
  breakcpi_button_resume);
type;
(errocode=acpi_buttonerrocype""aston_resume(ER"_deregist+c_d *SIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"acpi_button_resume);
eIMPLE_DEV_PM_Oerrocode=acpi_buttonerrocype"lpi_button_resume);
 goto 2">  82staterr_remove>f    .eIMPLE_DEV_PM_Ot (ed int class = AClElass="sref">ops = {
 ton_resume(_buttlidasend_ clas   .SIMPLE_DEV_PM_Oe * {
 2" name="L19">  19 */
  10<<<<<<<<<<<<<<<<<* This assumssEthere's only one lid =devic, or ifEthere arean class="comment"> */
  10<<<<<<<<<<<<<<<<<* more we only care aboutEthe ="Lt one...an class="comment"> */
  10<<<<<<<<<<<<<<<<<*pan class="comment"> */
  SIMPLE_DEV_PM_Olidae *(e * {
);
eIMPLE_DEV_PM_Oe *(wakeup*  82statflag    .  82statvalef="+code=acpi_devalef">AClElass="sref">ops = {
 2" name="L19">  19 */
 ton_resume(_buttenable_g int SIMPLE_DEV_PM_Oe *(wakeup*  82statg iae * */
 e="name=="L93"> ton_resume(e *(wakeup*  82statg ianumb+code=acpi_buttong ianumb+ce" cacpi_button_resume {
  ifE>!eIMPLE_DEV_PM_O> class="sref">pm e *(e *ops = {
          ton_notify(> class="sref">pm e *(e *idstruint  {
ton_resume(t (wakeup_enablef="+code=acpi_dewakeup_enablefype""aston_resume(truint  {
  }pi_button_resume);
);
  82statpri"Lkref="+code=acpipri"Lkref">SIMPLE_DEV_PM_OKERN_INFe=ACPI_BUTTON_FIKERN_INFe"lineSIMPLE_DEV_PM_OPREFIX=ACPI_BUTTON_HIPREFIX"lineSss="sref">name = &qug"">acpi_button_pid="*class > SIMPLE_DEV_PM_Oe * {
);
  76
  82staterr_remove>f    .f    .SIMPLE_DEV_PM_Oe * {
  82staterr_freec/noe= href="+code=OWerr_freec/noe=ULL":t;button",
(/noe=_freecd *SIMPLE_DEV_PM_O/noe= href="+code=OWER"_dype"acpi_button_resume);
  82staterr_freect ,
(kfree href="+code=OWkfreeref">SIMPLE_DEV_PM_Ot );
);
  85
  82static int cpi_button_resume(struct acpi_device *=="L82">  82stated int   85
acpi_button {
(struct acpi_devict notify >ops >opsSIMPLE_DEV_PM_Oe * {
  59
eIMPLE_DEV_PM_Oe *(wakeup*  82statflag    .  82statvalef="+code=acpi_devalef">AClElass="sref">ops = {
  SIMPLE_DEV_PM_O >isable_g int SIMPLE_DEV_PM_Oe *(wakeup*  82statg iae * */
  e" name="L91">  SIMPLE_DEV_PM_Oe *(wakeup*  82statg ianumb+code=acpi_buttong ianumb+ce" cacpi_button_resume {
  ifE>eIMPLE_DEV_PM_Ot (wakeup_enablef="+code=acpi_dewakeup_enablefype")e" name="L85">  85
 "L91">  SIMPLE_DEV_PM_Oe aset_wakeup_enable*class="sref">pm e *(e *idsfals * {
);
  76
(struct f    .SIMPLE_DEV_PM_Oe * {
 *SIMPLE_DEV_PM_Ot (/noe= href="+code=OWER"_dype"acpi_button_resume {
(kfree href="+code=OWkfreeref">SIMPLE_DEV_PM_Ot );
);
  62
 >opsSIMPLE_DEV_PM_Ostruct opsops);

The original LXR software byEthe i_button_http://sourceforge.net/projects/lxc">LXR >  1unity=devg"this experi19lxc@#L5ux.no=dev.
lxc.#L5ux.no kindly hostedEbyEi_button_http://www.redpill-#L5pro.no">Redpill LL5pro Asref">=provider of LL5ux=consulting and operheions ser/a> s since 1995.