linux/Documentation/watchdog/watchdog-kernel-api.txt
<<
>>
Prefs
   1The Linux WatchDog Timer Driver Core kernel API.
   2===============================================
   3Last reviewed: 22-May-2012
   4
}1.6
  
  alue="v2.6.12.3"
	  >
  v2.6.12.lass="line" name="L4">   4
}1.6
  
  alue="v2.6.12.3"L1" c"12.6.27.41
  
  
  
  alue="v2.6.12.6"L1" c"62.6.27.41
  
6    4
}1.6
  
  alue="v2.6.12.7"L1" c"72.6.27.41
  
7    4
}1.6
  
  alue="v2.6.12.8"L1" c"82.6.27.41
  
8    4
}1.6
  
  alue="v2.6.12.9"L1" c"92.6.27.41
  
9   getes no geescribe what ation/watchdog/wa(WDT)atchdog-owatdogce isL2" id="L2" class="line" name="L2">   2================10g Timer 0Driver Core kernel API.0    2================1og Timer  Driver Core kernel API..

 tocn pleasechdad tocufollowlts2" id="L2" class="line" name="L2">   2================1========1=======================1
   2======= L2" id="L2" class="line" name="L2">   2================12-May-20112
   4
}1.6
  
  alue="v2.6.12.1 
  alue1="v2.6.12.3"
	  >
  v2.16.12.1ass="So what etes toisgetL4">  geescribe? I geescribes tocuxt# that cionbe used byline" name="L4">   4
}1.6
  
  alue="v2.6.12.13"L1" c"112.6.27.41
  
1     4
}1.6
  
  alue="v2.6.12.16"L1" c"162.6.27.41
  
16 
work. Doisgfrn>
work proviees all ia74rfacltsgtowards user t" ce sogthatline" name="L4">   4
}1.6
  
  alue="v2.6.12.17"L1" c"172.6.27.41
  
17 
 codegetes no ghave to bechdproduned each tog/. Doisgalsogmeansgthatline" name="L4">   4
}1.6
  
  alue="v2.6.12.18"L1" c"182.6.27.41
  
18 
   tog/r dchdog-tocn only needs to proviee tocudiffer>  grout/opsline" name="L4">   4
}1.6
  
  alue="v2.6.12.19"L1" c"192.6.27.41
  
19 
   tog/r (WDT)L2" id="L2" class="line" name="L2">   2=================0g Timer20Driver Core kernel API20    4
}1.6
  
  alue="v2.6.12.2og Timer2 Driver Core kernel API2.
   4
}1.6
  
  alue="v2.6.12.2================================

   4
}1.6
  
  alue="v2.6.12.22-May-20212

   tog/r dchdog-toat wa  sgto use tocuion/watchdog/watchdog-kernline" name="L4">   4
}1.6
  
  alue="v2.6.12.2 
  alue2="v2.6.12.3"
	  >
  v2.26.12.2ass="muatc#i
  uee <t">
	ption>
  .hctio (you wouldghave to do toisganyway whe line" name="L4">   4
}1.6
  
  alue="v2.6.12.23"L1" c"212.6.27.41
  
2  
   ddogce dchdog). Doisgi
  uee f5b2 containsgfollowlts2" id="L2" class="line" name="L2">   2================26"L1" c"262.6.27.41
  
26    2================27"L1" c"272.6.27.41
  
27    4
}1.6
  
  alue="v2.6.12.28"L1" c"282.6.27.41
  
28 
  _regis74r_ddogce(strunp tion>
  _ddogce *)oline" name="L4">   4
}1.6
  
  alue="v2.6.12.29"L1" c"292.6.27.41
  
29 
  _unregis74r_ddogce(strunp tion>
  _ddogce *)oline" name="L4">   4
}1.6
  
  alue="v2.6.12.30g Timer30Driver Core kernel API30    4
}1.6
  
  alue="v2.6.12.3og Timer3 Driver Core kernel API3.
   2================3========3=======================3
   2================32-May-20112
   2================3 
  alue3="v2.6.12.3"
	  >
  v2.36.12.3ass="line" name="L4">   4
}1.6
  
  alue="v2.6.12.33"L1" c"312.6.27.41
  
3  
  _unregis74r_ddogcegrout/op deregis74rs a regis74red tion>
   tog/rline" name="L4">   4
}1.6
  
  alue="v2.6.12.36"L1" c"362.6.27.41
  
36 
74rgof toisgrout/op isgtocupoia74r to tocuregis74redline" name="L4">   4
}1.6
  
  alue="v2.6.12.37"L1" c"372.6.27.41
  
37 
  _ddogce strunpureL2" id="L2" class="line" name="L2">   2================38"L1" c"382.6.27.41
  
38    4
}1.6
  
  alue="v2.6.12.39"L1" c"392.6.27.41
  
39 
   ddogce strunpure botts like tois:2" id="L2" class="line" name="L2">   2================40g Timer40Driver Core kernel API40    4
}1.6
  
  alue="v2.6.12.4og Timer4 Driver Core kernel API4.
   4
}1.6
  
  alue="v2.6.12.4========4=======================4
   4
}1.6
  
  alue="v2.6.12.42-May-20412
   4
}1.6
  
  alue="v2.6.12.4 
  alue=="v2.6.12.3"
	  >
  v2.66.12.44ef="        strunp ddogce *ddooline" name="L4">   4
}1.6
  
  alue="v2.6.12.43"L1" c"412.6.27.41
  
4    oline" name="L4">   4
}1.6
  
  alue="v2.6.12.46"L1" c"462.6.27.41
  
46 
  _info *infooline" name="L4">   4
}1.6
  
  alue="v2.6.12.47"L1" c"472.6.27.41
  
47 
  _ops *opsoline" name="L4">   4
}1.6
  
  alue="v2.6.12.48"L1" c"482.6.27.41
  
48    4
}1.6
  
  alue="v2.6.12.49"L1" c"492.6.27.41
  
49    4
}1.6
  
  alue="v2.6.12.50g Timer50Driver Core kernel API50    4
}1.6
  
  alue="v2.6.12.5og Timer5 Driver Core kernel API5.
   4
}1.6
  
  alue="v2.6.12.5========5=======================5
   4
}1.6
  
  alue="v2.6.12.52-May-20512
   4
}1.6
  
  alue="v2.6.12.5 
  alue5="v2.6.12.3"
	  >
  v2.56.12.54ef="        unsigned lotsg clausoline" name="L4">   4
}1.6
  
  alue="v2.6.12.53"L1" c"112.6.27.41
  
      4
}1.6
  
  alue="v2.6.12.56"L1" c"562.6.27.41
  
56    4
}1.6
  
  alue="v2.6.12.57"L1" c"572.6.27.41
  
57    2================58"L1" c"582.6.27.41
  
58 
  _regis74r_ddogce,L1" 0 isgspecial. I ghas both a2" id="L2" class="line" name="L2">   2================59"L1" c"592.6.27.41
  
59    2ic major, minowa0) as well as tocuoldline" name="L4">   4
}1.6
  
  alue="v2.6.12.60g Timer60Driver Core kernel API60    2   2================6og Timer6 Driver Core kernel API6.
   2================6========6=======================6
   2   2================62-May-20612

  _regis74r_ddogceL2" id="L2" class="line" name="L2">   2================6 
  alue6="v2.6.12.3"
	  >
  v2.66.12.64ef="*Lddo: ddogce undog-tocution>
   2.6.1 (created by tion>
  _regis74r_ddogce)L2" id="L2" class="line" name="L2">   2================63"L1" c"612.6.27.41
  
6    : set "">
 to tocupar>   ddogce (owaNULL) befernesalllts2" id="L2" class="line" name="L2">   2================66"L1" c"662.6.27.41
  
66 
  _regis74r_ddogceL2" id="L2" class="line" name="L2">   2================67"L1" c"672.6.27.41
  
67 
  _info strunpureL Doisgstrunpure ghdosgsomnline" name="L4">   4
}1.6
  
  alue="v2.6.12.68"L1" c"682.6.27.41
  
68 ocution>
   tog/r itself. (Like it's uniqueion>
)line" name="L4">   4
}1.6
  
  alue="v2.6.12.69"L1" c"692.6.27.41
  
69 oculis7gof tion>
   oper 4ocution>
   supportsL2" id="L2" class="line" name="L2">   2================70g Timer70Driver Core kernel API70 ocution>
   tog/r's tog/out>
2================7og Timer7 Driver Core kernel API7. ocution> tog/r's minimum tog/out>
2================7========7=======================7 ocution> tog/r's maximum tog/out> 2================72-May-20712 2 2================7 alue7="v2.6.12.3" > v2.76.12.74ef=" WDIOF_*g clausgbits)L2" id="L2" class="line" name="L2"> 2================73"L1" c"712.6.27.41 7 ocudchdogs pchdate datagof a tion> ddogceL2" id="L2" class="line" name="L2"> 2================76"L1" c"762.6.27.41 76 ocution> _set_drveatagandline" name="L4"> 4 }1.6 alue="v2.6.12.77"L1" c"772.6.27.41 77 _get_drveatagrout/opsL2" id="L2" class="line" name="L2"> 2================78"L1" c"782.6.27.41 78 2================79"L1" c"792.6.27.41 79 field containsga numb4rgof clausgbits-toat gnve extra2" id="L2" class="line" name="L2"> 2================80g Timer80Driver Core kernel API80 ocu clausgof toe ddogce (Like: isgtocution> tog/rline" name="L4"> 4 }1.6 alue="v2.6.12.8og Timer8 Driver Core kernel API8. 4 }1.6 alue="v2.6.12.8========8=======================8 2 2================82-May-20812 4 }1.6 alue="v2.6.12.8 alue8="v2.6.12.3" > v2.86.12.84ef="Doculis7gof tion> oper 4 2================83"L1" c"812.6.27.41 8 4 }1.6 alue="v2.6.12.86"L1" c"862.6.27.41 86 _ops {line" name="L4"> 4 }1.6 alue="v2.6.12.87"L1" c"872.6.27.41 87 4 }1.6 alue="v2.6.12.88"L1" c"882.6.27.41 88 4 }1.6 alue="v2.6.12.89"L1" c"892.6.27.41 89 _ddogce *)oline" name="L4"> 4 }1.6 alue="v2.6.12.90g Timer90Driver Core kernel API90 _ddogce *)oline" name="L4"> 4 }1.6 alue="v2.6.12.9og Timer9 Driver Core kernel API9. 4 }1.6 alue="v2.6.12.9========9=======================9 4 }1.6 alue="v2.6.12.92-May-20912 _ddogce *)oline" name="L4"> 4 }1.6 alue="v2.6.12.9 alue9="v2.6.12.3" > v2.96.12.94ef=" ia7 (* et_tog/out)(strunp tion> _ddogce *, unsigned ia7)oline" name="L4"> 4 }1.6 alue="v2.6.12.93"L1" c"912.6.27.41 9 _ddogce *)oline" name="L4"> 4 }1.6 alue="v2.6.12.96"L1" c"962.6.27.41 96 _ddogce *)oline" name="L4"> 4 }1.6 alue="v2.6.12.97"L1" c"972.6.27.41 97 _ddogce *)oline" name="L4"> 4 }1.6 alue="v2.6.12.98"L1" c"982.6.27.41 98 _ddogce *, unsigned ia7, unsigned lots)oline" name="L4"> 4 }1.6 alue="v2.6.12.99"L1" c"992.6.27.41 99 4 }1.6 alue="v2.6.12.100g Timer 00Driver Core kernel API.00 4 }1.6 alue="v2.6.12.10og Timer 0 Driver Core kernel API.01 4 }1.6 alue="v2.6.12.10========10=======================102 4 }1.6 alue="v2.6.12.102-May-201012 2 to avoid agsystem crash whe you unload tocline" name="L4"> 4 }1.6 alue="v2.6.12.10 alue10="v2.6.12.3" > v2.104 2 2================103"L1" c"1012.6.27.41 105 4 }1.6 alue="v2.6.12.106"L1" c"1062.6.27.41 106 _ddogce strunp-isgeyon>ically allocated, juatcbockltsgtocumoduleline" name="L4"> 4 }1.6 alue="v2.6.12.107"L1" c"1072.6.27.41 107 4 }1.6 alue="v2.6.12.108"L1" c"1082.6.27.41 108 ocu crunpure holdltsgtocution> _ddogce etes no ggo awayL2" id="L2" class="line" name="L2"> 2================109"L1" c"1092.6.27.41 109 4 }1.6 alue="v2.6.12.110g Timer 0Driver Core kernel API..0 4 to:2" id="L2" class="line" name="L2"> 2================11og Timer Driver Core kernel API..1 ocusn> crunpure which > holdltsgtocution> _ddogce2" id="L2" class="line" name="L2"> 2================11========11=======================11 2================112-May-201112 _regis74r_ddogce()line" name="L4"> 4 }1.6 alue="v2.6.12.11 alue11="v2.6.12.3" > v2.116.1211ass="4) Define a rea oper 4 4 }1.6 alue="v2.6.12.113"L1" c"1112.6.27.41 11 4 }1.6 alue="v2.6.12.116"L1" c"1162.6.27.41 116 2================117"L1" c"1172.6.27.41 117 oculwatckrea_e=""willndo tois!2" id="L2" class="line" name="L2"> 2================118"L1" c"1182.6.27.41 118 _unregis74r_ddogce()esall krea_e=""on toegkrealine" name="L4"> 4 }1.6 alue="v2.6.12.119"L1" c"1192.6.27.41 119 4 }1.6 alue="v2.6.12.1=0g Timer120Driver Core kernel API120 4 }1.6 alue="v2.6.12.1=og Timer 2 Driver Core kernel API12. 2================12========1========================1 4 }1.6 alue="v2.6.12.122-May-201212 2================12 alue12="v2.6.12.3" > v2.126.12124ef=" Docurout/op needs a poia74r to >ocution> tog/r ddogce strunpure as a2" id="L2" class="line" name="L2"> 2================123"L1" c"1212.6.27.41 12 74r. I gre"ajas zero on successgowaa neglinve errno codegfowafailureL2" id="L2" class="line" name="L2"> 2================126"L1" c"1262.6.27.41 126 ocution> tog/r ddogce isgbeitsg coppedL2" id="L2" class="line" name="L2"> 2================127"L1" c"1272.6.27.41 127 ocution> tog/r ddogce strunpure as a2" id="L2" class="line" name="L2"> 2================128"L1" c"1282.6.27.41 128 74r. I gre"ajas zero on successgowaa neglinve errno codegfowafailureL2" id="L2" class="line" name="L2"> 2================129"L1" c"1292.6.27.41 129 tog/r hardwarnesangonly be clrted and no gbe coppedL Doc2" id="L2" class="line" name="L2"> 2================120g Timer130Driver Core kernel API130 hardwarneneeds to make ure >oat at clrt and scop2" id="L2" class="line" name="L2"> 2================12og Timer 3 Driver Core kernel API13. ocudchdog2" id="L2" class="line" name="L2"> 2================12========13=======================13 2================122-May-201112 4 }1.6 alue="v2.6.12.13 alue13="v2.6.12.3" > v2.136.1213ass="Not all tion> tog/r hardwarnesupports >ocusn> funcref=alityL Doat's whyline" name="L4"> 4 }1.6 alue="v2.6.12.133"L1" c"1312.6.27.41 13 4 }1.6 alue="v2.6.12.136"L1" c"1362.6.27.41 136 2================137"L1" c"1372.6.27.41 137 >ocurout/op toat ends a keepalnve pltsgto >ocution> tog/r2" id="L2" class="line" name="L2"> 2================138"L1" c"1382.6.27.41 138 2================129"L1" c"1392.6.27.41 139 ocution> tog/r ddogce strunpure as a2" id="L2" class="line" name="L2"> 2================140g Timer140Driver Core kernel API140 74r. I gre"ajas zero on successgowaa neglinve errno codegfowafailureL2" id="L2" class="line" name="L2"> 2================14og Timer14 Driver Core kernel API14. 4 }1.6 alue="v2.6.12.14========14=======================14 4 }1.6 alue="v2.6.12.142-May-201412 ocution> tog/r dchdog-cerneetes: to end a keepalnve pltsgto >ocution> line" name="L4"> 4 }1.6 alue="v2.6.12.14 alue1=="v2.6.12.3" > v2.166.12144ef=" tog/r hardwarnei""willneith4rguse tocupltsgoper 4 4 }1.6 alue="v2.6.12.143"L1" c"1412.6.27.41 14 2================146"L1" c"1462.6.27.41 146 ocuWDIOC_KEEPALIVE ioctlesall willnonly be acinve whe toc2" id="L2" class="line" name="L2"> 2================147"L1" c"1472.6.27.41 147 ocu> field on toeg> 2 2================148"L1" c"1482.6.27.41 148 2================149"L1" c"1492.6.27.41 149 rout/op checks tocustlausgof toe tion> tog/r ddogceL Doc2" id="L2" class="line" name="L2"> 2================150g Timer150Driver Core kernel API150 reported tith > 2 2================15og Timer15 Driver Core kernel API15. rout/op checks and changes tocutog/out>of toe tion> 2" id="L2" class="line" name="L2"> 2================15========15=======================15 74rgout>of range"2" id="L2" class="line" name="L2"> 2================152-May-201512 ocution> ". On successgtois2" id="L2" class="line" name="L2"> 2================15 alue15="v2.6.12.3" > v2.156.12154ef=" rout/op shouldgset ""e tog/out> _ddogce to >oc2" id="L2" class="line" name="L2"> 2================153"L1" c"1112.6.27.41 1 gfrom tocu nque ced onc2" id="L2" class="line" name="L2"> 2================156"L1" c"1562.6.27.41 156 2 2================157"L1" c"1572.6.27.41 157 ocuWDIOF_SETTIMEOUTeneeds to be et in >ocu> field of toe2" id="L2" class="line" name="L2"> 2================158"L1" c"1582.6.27.41 158 's info strunpure)L2" id="L2" class="line" name="L2"> 2================159"L1" c"1592.6.27.41 159 rout/opsgre"ajas ""e tog/ethat's left befernea re etL2" id="L2" class="line" name="L2"> 2================160g Timer160Driver Core kernel API160 ocu> er 4ically2" id="L2" class="line" name="L2"> 2================16og Timer16 Driver Core kernel API16. _ddogce strunpL2" id="L2" class="line" name="L2"> 2================16========16=======================16 ically2" id="L2" class="line" name="L2"> 2================162-May-201612 _ddogce strunpL2" id="L2" class="line" name="L2"> 2================16 alue16="v2.6.12.3" > v2.166.12164ef="*Lioctl: if toisgrout/op isgpre e gtoe ip-willnbe called firstgbefernewneet2" id="L2" class="line" name="L2"> 2================163"L1" c"1612.6.27.41 16 2================166"L1" c"1662.6.27.41 166 74rs-toat arnepassed to toegioctl2" id="L2" class="line" name="L2"> 2================167"L1" c"1672.6.27.41 167 _ddogce, cmd and argL2" id="L2" class="line" name="L2"> 2================168"L1" c"1682.6.27.41 168 4 }1.6 alue="v2.6.12.169"L1" c"1692.6.27.41 169 4 }1.6 alue="v2.6.12.170g Timer170Driver Core kernel API170 2================17og Timer17 Driver Core kernel API17. clausgbiteiadicates wheth4rgowanot a tion> tog/r ddogce2" id="L2" class="line" name="L2"> 2================17========17=======================17 2================172-May-201712 clausgbite(Note:"whe you regis74rg>ocution> tog/r ddogce tith2" id="L2" class="line" name="L2"> 2================17 alue17="v2.6.12.3" > v2.176.12174ef=" ""> bit set,Ltocn openlts /ddo"> 2 4 }1.6 alue="v2.6.12.173"L1" c"1712.6.27.41 17 clausgbiteshows wheth4rgowanot tocu> 2 2================176"L1" c"1762.6.27.41 176 2 2================177"L1" c"1772.6.27.41 177 biteshouldgonly be used by tocuion/watchdog/watchdog-kern)L2" id="L2" class="line" name="L2"> 2================178"L1" c"1782.6.27.41 178 bitesterns wheth4rgowanot tocumagic.6.oseccharnct/r2" id="L2" class="line" name="L2"> 2================179"L1" c"1792.6.27.41 179 2================180g Timer180Driver Core kernel API180 biteshouldgonly be used by tocuion/watchdog/watchdog-kern)L2" id="L2" class="line" name="L2"> 2================18og Timer18 Driver Core kernel API18. bitesterns tocunowayo=""settltsgfowatocu> 2 2================18========18=======================18 biteisgset the tocu> 2 2================182-May-201812 bitegets set by tocuion/watchdog/watchdog-kernline" name="L4"> 4 }1.6 alue="v2.6.12.18 alue18="v2.6.12.3" > v2.186.12184ef=" af74r salllts tion> _unregis74r_ddogce, and the checked befernesalllts2" id="L2" class="line" name="L2"> 2================183"L1" c"1812.6.27.41 18 _ops, sogthat you cionbe ure >oat no oper 4 4 }1.6 alue="v2.6.12.186"L1" c"1862.6.27.41 186 2================187"L1" c"1872.6.27.41 187 2 2================188"L1" c"1882.6.27.41 188 4 }1.6 alue="v2.6.12.189"L1" c"1892.6.27.41 189 2 2================190g Timer190Driver Core kernel API190 2================19og Timer19 Driver Core kernel API19. 2 2================19========19=======================19 2================192-May-201912 willnset ""e as CONFIG_WATCHDOG_NOWAYOUT) ow2" id="L2" class="line" name="L2"> 2================19 alue19="v2.6.12.3" > v2.196.12194ef=" *guse tocufollowlts helper funcref=:2" id="L2" class="line" name="L2"> 2================193"L1" c"1912.6.27.41 19 _ et_nowayo="(strunp tion> _ddogce *wdd, ia7 nowayo=")line" name="L4"> 4 }1.6 alue="v2.6.12.196"L1" c"1962.6.27.41 196 4 }1.6 alue="v2.6.12.197"L1" c"1972.6.27.41 197 ocumagic.6.osecfeapuregandline" name="L4"> 4 }1.6 alue="v2.6.12.198"L1" c"1982.6.27.41 198 4 }1.6 alue="v2.6.12.199"L1" c"1992.6.27.41 199 ocu> field of toe tion> 's info strunpureL2" id="L2" class="line" name="L2"> 2=================00g Timer200Driver Core kernel API200 2=================0og Timer20 Driver Core kernel API201 2=================0=========0=======================202 4 }1.6 alue="v2.6.12.202-May-202012 2================20 alue20="v2.6.12.3" > v2.204 4 }1.6 alue="v2.6.12.203"L1" c"2012.6.27.41 205 _ et_drveata(strunp tion> _ddogce *wdd, void *data)line" name="L4"> 4 }1.6 alue="v2.6.12.206"L1" c"2062.6.27.41 206 _get_drveata(strunp tion> _ddogce *wdd)line" name="L4"> 4 }1.6 alue="v2.6.12.207"L1" c"2072.6.27.41 207 4 }1.6 alue="v2.6.12.208"L1" c"2082.6.27.41 208 _set_drveatagfuncref= allowsgyou to add dchdog-specific.dataL Doc2" id="L2" class="line" name="L2"> 2================209"L1" c"2092.6.27.41 209 2 4 }1.6 alue="v2.6.12.210g Timer2 0Driver Core kernel API2.0 4 }1.6 alue="v2.6.12.21og Timer2 Driver Core kernel API2.1 2=================1========21=======================21 2=================12-May-202112 2=================1 alue21="v2.6.12.3" > v2.216.1221ass="eatagfromL Docufuncref= re"ajas ""e poia74r to >ocudchdog-specific.dataL2" id="L2" class="line" name="L2"> 2=================13"L1" c"2112.6.27.41 21 DocuorigiaalLLXR softwarneby tocu" id="L2"http://sourceferge.net/projects/lxr">LXR communityon v, toisgexperiss="ll dogsef= by " id="L2"mailto:lxr@l"> .no">lxr@l"> .noon v. lxr.l"> .no kindly hosted by " id="L2"http://www.redpill-l">pro.no">Redpill L">pro ASon v, provieergof L"> conaultltsgand oper 4