linux/drivers/macintosh/via-pmu-led.c
<<
>>
Prefs
   1/*
   2 * via-pmu LED class device
   3 *
   4 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
   5 *
   6 * This program is free software; you can redistribute it and/or modify
   7 * it under the terms of the GNU General Public License as published by
   8 * the Free Software Foundation; either version 2 of the License, or
   9 * (at your option) any later version.
  10 *
  11 * This program is distributed in the hope that it will be useful, but
  12 * WITHOUT ANY WARRANTY; without even the implied warranty of
  13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLELicense, or
   1 * CNON INFRINGEMENT.  Seethe GNU General Public License afr modr
   1 *
   1 * /span>
   1 * iYu csoutld haveredceverd a cpyrof the GNU General Public License /span>
   1 * talongwitho tis program ; if not, wrie itothe Free Software /span>
   1 * (oundation;, Inc., 51Freankine St, Fifho Fookr, Bst"n;, MA  02110-1301 USA/span>
  12 *

  v2.6.31.5
 *
 * (at yo2"
	  >
  v2.f="dription value="v2.6.32.7"
	  >
  v2.6.32.7<.45"
	  >
  v2.6'l1r4ev2.6.14.6   1/*
tosh/via-pmu-">/*clasintosh/via-pmu-led.c#L1" id="L1" class="line42">   12/a>/*
tosh/vkernelu-">/*clasintosh/via-pmu-led.c#L1" id="L1" class="line   12span class="comment"> *2devta24">/*
tosh/vn clasu-">/*clasintosh/via-pmu-led.c#L1" id="L1" class="liners/macin2osh/via-pmu-led.c#L10" 2d="L725">/*
tosh/vss=mu-">/*clasintosh/via-pmu-led.c#L1" id="L1" class="lineyrof the2GNU General Public Lice2se /s26">/*
tosh/vadbu-">/*clasintosh/via-pmu-led.c#L1" id="L1" class="line1">   1<2a>/*
tosh/v clu-">/*clasintosh/via-pmu-led.c#L1" id="L1" class="line1 * (o2ndati28">/*
/*clasintosh/via-pmu-led.c#L1" id="L1" class="linename="L12">  12 * * Copyright 2006 Johannes Berg <joherg <3ohannes@sipsolutions.n53
	  >3  v2.t typehidden" namcode=spinlock_tine" name=sef">spinlock_t v2.hidden" namcode=Ber_cinnk_lockine" name=sef">Ber_cinnk_lock v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin3ue="v2.6332.7"
	  >
  v2.6.32.7<345"
	31 v2.t typehrraucthidden" namcode=adb_requestine" name=sef">adb_request v2.hidden" namcode=Ber_cinnk_reqine" name=sef">Ber_cinnk_req v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin3" name="31">   1
f, 1: requestn>nptio4famacintosh/via-pmu-led.c#L1" id="L1" class="lin3hannes@siipsolutions.net> * C33 v2.t typehL1"hidden" namcode=requested_changeine" name=sef">requested_change v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin3   13span class="comment"> *3devta34> * * Copyright 2006 Johannes Berg <johrs/macin3osh/via-pmu-led.c#L10" 3d="L735 v2.t typehvoidhidden" namcode=Ber_req_ id="Le" name=sef">Ber_req_ id= v2.(rraucthidden" namcode=adb_requestine" name=sef">adb_request v2.h*hidden" namcode=reqine" name=sef">req v2.)ent"> * Copyright 2006 Johannes Berg <johyrof the3GNU General Public Lice3se /s36">/*{ent"> * Copyright 2006 Johannes Berg <joh1">   1<3a>/*        unsignwar Fookidden" namcode=flagsine" name=sef">flags v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin31 * (o3ndati38> * * Copyright 2006 Johannes Berg <johname="L13">  12/*        idden" namcode=spin_lock_irqsav="Le" name=sef">spin_lock_irqsav= v2.(&idden" namcode=Ber_cinnk_lockine" name=sef">Ber_cinnk_lock v2.,kidden" namcode=flagsine" name=sef">flags v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin4erg <4ohannes@sipsolutions.n54
	  >40">/*        iOR FITNESS FOR A PART/* if someid= requestedre /hange
meantim/macintosh/via-pmu-led.c#L2"" id="L12" class="line"4ue="v2.6432.7"
	  >
  v2.6.32.7<445"
	4 >
  v2.6'l1r4ev2.6.14.6nly s#L10" ir4etn>ne whichLicen  v)macintosh/via-pmu-led.c#L2"" id="L12" class="line"4" name="41">   1/*        if (idden" namcode=requested_changeine" name=sef">requested_change v2. != -1 && !idden" namcode=Ber_sys_suspendedine" name=sef">Ber_sys_suspended v2.)ent"> * Copyright 2006 Johannes Berg <jo4/a> */*                idden" namcode=Ber_requestine" name=sef">Ber_request v2.(&idden" namcode=Ber_cinnk_reqine" name=sef">Ber_cinnk_req v2.,kidden" namcode=NULLine" name=sef">NULL v2.,k4, 0xee,k4, 0,kidden" namcode=requested_changeine" name=sef">requested_change v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin4rs/macin4osh/via-pmu-led.c#L10" 4d="L745">/*        iOR FITNESS FOR A PART/* reset requestedr/hange/*        idden" namcode=requested_changeine" name=sef">requested_change v2. = -1sintosh/via-pmu-led.c#L1" id="L1" class="lin41">   1<4a>/*        idden" namcode=spin_unlock_irqrestor="Le" name=sef">spin_unlock_irqrestor= v2.(&idden" namcode=Ber_cinnk_lockine" name=sef">Ber_cinnk_lock v2.,kidden" namcode=flagsine" name=sef">flags v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin41 * (o4ndati48> *<}intosh/via-pmu-led.c#L1" id="L1" class="lin4name="L14">  12 * * Copyright 2006 Johannes Berg <jo5erg <5ohannes@sipsolutions.n55
	  >50 v2.t typehvoidhidden" namcode=Ber_ &l_setine" name=sef">Ber_ &l_set v2.(rraucthidden" namcode= &l_e" nadevine" name=sef"> &l_e" nadev v2.h*idden" namcode= &l_edevine" name=sef"> &l_edev v2.,ent"> * Copyright 2006 Johannes Berg <jo5ue="v2.6532.7"
	  >
  v2.6.32.7<545"
	51">/*                        enumhidden" namcode= &l_bed.c#nessine" name=sef"> &l_bed.c#ness v2.hidden" namcode=bed.c#nessine" name=sef">bed.c#ness v2.)ent"> * Copyright 2006 Johannes Berg <jo5" name="51">   1/*{ent"> * Copyright 2006 Johannes Berg <jo5hannes@s5ipsolutions.net> * C53">/*        unsignwar Fookidden" namcode=flagsine" name=sef">flags v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin5/a> * * * Copyright 2006 Johannes Berg <jo5can redisstribute it and/or modifd="L755">/*        idden" namcode=spin_lock_irqsav="Le" name=sef">spin_lock_irqsav= v2.(&idden" namcode=Ber_cinnk_lockine" name=sef">Ber_cinnk_lock v2.,kidden" namcode=flagsine" name=sef">flags v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin5yrof the5GNU General Public Lice5se /s56">/*        switchL(idden" namcode=bed.c#nessine" name=sef">bed.c#ness v2.) {ent"> * Copyright 2006 Johannes Berg <jo51">   1<5a>/*        casekidden" namcode=LED_OFFine" name=sef">LED_OFF">/*:ent"> * Copyright 2006 Johannes Berg <jo51 * (o5ndati58">/*                idden" namcode=requested_changeine" name=sef">requested_change v2. = 0sintosh/via-pmu-led.c#L1" id="L1" class="lin5name="L15">  12/*                breaksintosh/via-pmu-led.c#L1" id="L1" class="lin6erg <6ohannes@sipsolutions.n56
	  >60">/*        casekidden" namcode=LED_FULLine" name=sef">LED_FULL">/*:ent"> * Copyright 2006 Johannes Berg <jo6ue="v2.6632.7"
	  >
  v2.6.32.7<645"
	61">/*                idden" namcode=requested_changeine" name=sef">requested_change v2. = 1sintosh/via-pmu-led.c#L1" id="L1" class="lin6" name="61">   1/*                breaksintosh/via-pmu-led.c#L1" id="L1" class="lin6hannes@s6ipsolutions.net> * C63">/*        default:ent"> * Copyright 2006 Johannes Berg <jo6/a> */*                goto idden" namcode=outine" name=sef">out v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin6can redi6stribute it and/or modi6d="L765">/*                breaksintosh/via-pmu-led.c#L1" id="L1" class="lin6>   7> se /s66">/*        }intosh/via-pmu-led.c#L1" id="L1" class="lin61">   1<6a>/*        iOR FITNESS FOR A PART/* if requestnisn't  id=, 0" n  id't  i="L1thiooktio4famacintosh/via-pmu-led.c#L1" id="L1" class="lin61 * (o6ndati68">/*        if (idden" namcode=Ber_cinnk_reqine" name=sef">Ber_cinnk_req v2..idden" namcode=OR pleteine" name=sef">OR plete">/* && !idden" namcode=Ber_sys_suspendedine" name=sef">Ber_sys_suspended v2.)ent"> * Copyright 2006 Johannes Berg <jo6name="L16">  12/*                idden" namcode=Ber_requestine" name=sef">Ber_request v2.(&idden" namcode=Ber_cinnk_reqine" name=sef">Ber_cinnk_req v2.,kidden" namcode=NULLine" name=sef">NULL v2.,k4, 0xee,k4, 0,kidden" namcode=requested_changeine" name=sef">requested_change v2.)sintosh/c#L8" id="L8" class="line" name="L8">erg <7ohannes@sipsolutions.n57
	  >70 v2.hidden" namcode=outine" name=sef">out v2.:ent"> * Copyright 2006 Johannes Berg <jo7ue="v2.6732.7"
	  >
  v2.6.32.7<745"
	71">/*        idden" namcode=spin_unlock_irqrestor="Le" name=sef">spin_unlock_irqrestor= v2.(&idden" namcode=Ber_cinnk_lockine" name=sef">Ber_cinnk_lock v2.,kidden" namcode=flagsine" name=sef">flags v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin7" name="71">   1 *<}intosh/via-pmu-led.c#L1" id="L1" class="lin7hannes@s7ipsolutions.net> * C73> * * Copyright 2006 Johannes Berg <jo7/a> * &l_e" nadev v2.hidden" namcode=Ber_ &line" name=sef">Ber_ &l v2. = {ent"> * Copyright 2006 Johannes Berg <jo7can redi7stribute it and/or modi7d="L775">/*        .idden" namcode=or mine" name=sef">or m v2. = iOR FITNESS Frranng">"Berg &l::front"o4famac,ent"> * Copyright 2006 Johannes Berg <jo7>   77se /s76">/*CONFIG_ADB_PMU_LED_IDE> * * Copyright 2006 Johannes Berg <jo7>   8>  * ta77">/*        .idden" namcode=default_ranggerine" name=sef">default_rangger v2. = iOR FITNESS Frranng">"ide-disk"o4famac,ent"> * Copyright 2006 Johannes Berg <jo71 * (o7ndati78">/* * Copyright 2006 Johannes Berg <jo7name="L17">  12/*        .idden" namcode=bed.c#ness_setine" name=sef">bed.c#ness_set v2. = idden" namcode=Ber_ &l_setine" name=sef">Ber_ &l_set v2.,ent"> * Copyright 2006 Johannes Berg <jo8erg <8ohannes@sipsolutions.n58
	  >80 v2.}sintosh/via-pmu-led.c#L1" id="L1" class="lin8ue="v2.6832.7"
	  >
  v2.6.32.7<845"
	81> * * Copyright 2006 Johannes Berg <jo8" name="81">   1__init v2.hidden" namcode=nes_Ber_ &l_initine" name=sef">nes_Ber_ &l_init v2.(void)ent"> * Copyright 2006 Johannes Berg <jo8hannes@s8ipsolutions.net> * C83">/*{ent"> * Copyright 2006 Johannes Berg <jo8/a> */*        rraucthidden" namcode=n clas_nodeine" name=sef">declas_node v2.h*idden" namcode=dtine" name=sef">dt v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin8can redi8stribute it and/or modi8d="L785">/*        constncharh*idden" namcode=modeline" name=sef">model v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin8>   78se /s86> * * Copyright 2006 Johannes Berg <jo8>   88 * ta87">/*        iOR FITNESS FOR A PART/* >nly dost"n;,on keylargo based modelsktio4famacintosh/via-pmu-led.c#L1" id="L1" class="lin8 9 * (ndati88">/*        if (idden" namcode=Ber_get_modeline" name=sef">Ber_get_model v2.() != idden" namcode=PMU_KEYLARGO_BASEDine" name=sef">PMU_KEYLARGO_BASED v2.)ent"> * Copyright 2006 Johannes Berg <jo8name="L18">  12/*                /div>

-idden" namcode=ENODEVine" name=sef">ENODEV v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin9erg <9ohannes@sipsolutions.n59
	  >90> * * Copyright 2006 Johannes Berg <jo9ue="v2.6932.7"
	  >
  v2.6.32.7<945"
	91">/*        idden" namcode=dtine" name=sef">dt v2. = idden" namcode=of_find_node_by_pathine" name=sef">of_find_node_by_path v2.(iOR FITNESS Frranng">"/"o4famac)sintosh/via-pmu-led.c#L1" id="L1" class="lin9" name="91">   1/*        if (idden" namcode=dtine" name=sef">dt v2. == idden" namcode=NULLine" name=sef">NULL v2.)ent"> * Copyright 2006 Johannes Berg <jo9hannes@s9ipsolutions.net> * C93">/*                /div>

-idden" namcode=ENODEVine" name=sef">ENODEV v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin9/a> */*        idden" namcode=modeline" name=sef">model v2. = idden" namcode=of_get_propertyine" name=sef">of_get_property v2.(idden" namcode=dtine" name=sef">dt v2., iOR FITNESS Frranng">"model"o4famac, idden" namcode=NULLine" name=sef">NULL v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin9can redi9stribute it and/or modi9d="L795">/*        if (idden" namcode=modeline" name=sef">model v2. == idden" namcode=NULLine" name=sef">NULL v2.) {ent"> * Copyright 2006 Johannes Berg <jo9>   79se /s96">/*                idden" namcode=of_node_putine" name=sef">of_node_put v2.(idden" namcode=dtine" name=sef">dt v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin9>   89 * ta97">/*                /div>

-idden" namcode=ENODEVine" name=sef">ENODEV v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin9 9 * 9ndati98">/*        }intosh/via-pmu-led.c#L1" id="L1" class="lin9> *
/*        if (idden" namcode=rrancmp"Le" name=sef">srancmp v2.(idden" namcode=modeline" name=sef">model v2., iOR FITNESS Frranng">"PowerBook"o4famac, idden" namcode=rral="fie" name=sef">sral=" v2.(iOR FITNESS Frranng">"PowerBook"o4famac)) != 0 &&="comment"> * This program is distributed in  the hope  that it will be useful, 
	  , 
">/*            idden" namcode=rrancmp"Le" name=sef">srancmp v2.(idden" namcode=modeline" name=sef">model v2., iOR FITNESS Frranng">"iBook"o4famac, idden" namcode=rral="fie" name=sef">sral=" v2.(iOR FITNESS Frranng">"iBook"o4famac)) != 0 &&="comment"> * This program is distributed in L12">  120/*            idden" namcode=rracmp"Le" name=sef">sracmp v2.(idden" namcode=modeline" name=sef">model v2., iOR FITNESS Frranng">"PowerMac7,2"o4famac) != 0 &&="comment"> * This program is distributed in  * MERC02	  , 2">/*            idden" namcode=rracmp"Le" name=sef">sracmp v2.(idden" namcode=modeline" name=sef">model v2., iOR FITNESS Frranng">"PowerMac7,3"o4famac) != 0) {ent"> * Copyright 2006 Johannes Berg <jo1042">   1<0/a>/*                idden" namcode=of_node_putine" name=sef">of_node_put v2.(idden" namcode=dtine" name=sef">dt v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin10   1<0span class="comment"> *<04	  , 4">/*                iOR FITNESS FOR A PART/* ignore/*                /div>

-idden" namcode=ENODEVine" name=sef">ENODEV v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin10yrof the 0GNU General Public Licen06	  , 6">/*        }intosh/via-pmu-led.c#L1" id="L1" class="lin101">   107	  , 7">/*        idden" namcode=of_node_putine" name=sef">of_node_put v2.(idden" namcode=dtine" name=sef">dt v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin101 * (ou08	  , 8> * * Copyright 2006 Johannes Berg <jo10name="L120">  12/*        idden" namcode=spin_lock_initine" name=sef">spin_lock_init v2.(&idden" namcode=Ber_cinnk_lockine" name=sef">Ber_cinnk_lock v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin1n the hopee that it will be useful,, but110">/*        iOR FITNESS FOR A PART/* no outstan>  12</*        idden" namcode=Ber_cinnk_reqine" name=sef">Ber_cinnk_req v2..idden" namcode=OR pleteine" name=sef">OR plete">/* = 1sintosh/via-pmu-led.c#L1" id="L1" class="lin13 * MERCCHANT112">/*        idden" namcode=Ber_cinnk_reqine" name=sef">Ber_cinnk_req v2..idden" namcode= id="Le" name=sef"> id= v2. = idden" namcode=Ber_req_ id="Le" name=sef">Ber_req_ id= v2.sintosh/via-pmu-led.c#L1" id="L1" class="lin1342">   1< * 113> * * Copyright 2006 Johannes Berg <jo1>   1< *</*        /div>

idden" namcode= &l_e" nadev_registerine" name=sef"> &l_e" nadev_register v2.(idden" namcode=NULLine" name=sef">NULL v2.,k&idden" namcode=Ber_ &line" name=sef">Ber_ &l v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin1nrs/macinttosh/via-pmu-led.c#L10" iid="L11" cla}intosh/via-pmu-led.c#L1" id="L1" class="lin1pyrof the  GNU General Public Licennse /116> * * Copyright 2006 Johannes Berg <jo181">   1> * t1longwitdden" namcode= ate_initcalline" name=sef"> ate_initcall v2.(idden" namcode=nes_Ber_ &l_initine" name=sef">nes_Ber_ &l_init v2.)sintosh/via-pmu-led.c#L1" id="L1" class="lin1n1 * (ouundat1on;, In/prerivers/m

"comment">/*
The original LXRas publis by10" intosh/viahttp://sourceforgepan / MAjects/lxri>LXRaOR Aunity v2.,kt"n;,experiA PAal -pmu-ledby1ntosh/viamailto:lxr@losh/.no"> xr@losh/.no v2..
"commen">/*
 xr.losh/.no kindly hostedrby1ntosh/viahttp://www.redpill-los MA.no">Redpill Los MA AS v2.,k MAviersiof Losux consult operosh/vs serclass since 1995.
"comment"/bodyen"/html/m