linux/drivers/watchdog/w83697ug_wdt.c
<<
22.3 22.322o/spa> 22ospa> class="lxr_search">22.3="+search" method="post" onsubmit="return do_search(this);">22.322.322.3 typ Search 22ospa> class="lxr_prefs" 22.322o/spa> .3="ajax+*" method="post" onsubmit="return false;">22oinput typ 2.3
odiv id/ /1o/a>ospa> class="comment">/*o/spa> / /2o/a>ospa> class="comment"> *.3 / /3o/a>ospa> class="comment"> *o/spa> / /4o/a>ospa> class="comment"> *.3 / /5o/a>ospa> class="comment"> *.3 / /6o/a>ospa> class="comment"> *o/spa> / /7o/a>ospa> class="comment"> *.3 / /8o/a>ospa> class="comment"> *.3 / /9o/a>ospa> class="comment"> *.3 / . va>ospa> class="comment"> *o/spa> / 11o/a>ospa> class="comment"> *.3 / 12o/a>ospa> class="comment"> *.3 / 13o/a>ospa> class="comment"> *o/spa> / 14o/a>ospa> class="comment"> *.3 / 15o/a>ospa> class="comment"> *o/spa> / 16o/a>ospa> class="comment"> *.3 / 17o/a>ospa> class="comment"> *o/spa> / 18o/a>ospa> class="comment"> *.3 Cox <ala>@redhat.com>, All Rights Reserved.o/spa> / 19o/a>ospa> class="comment"> *.3 / 2 va>ospa> class="comment"> *o/spa> / 21o/a>ospa> class="comment"> *.3 redistribute it and/oro/spa> / 22o/a>ospa> class="comment"> *.3 / 23o/a>ospa> class="comment"> *//////as published by the Free Software Founda3 >; either vers >o/spa> / 24o/a>ospa> class="comment"> *.3) any later vers >.o/spa> / 25o/a>ospa> class="comment"> *o/spa> / 26o/a>ospa> class="comment"> *.3 Cox nor CymruNet Ltd./admit liability nor provideo/spa> / 27o/a>ospa> class="comment"> *.3 / 28o/a>ospa> class="comment"> *.3 / 29o/a>ospa> class="comment"> *o/spa> / 3 va>ospa> class="comment"> *.3 Cox <ala>@redhat.com>o/spa> / 31o/a>ospa> class="comment"> */o/spa> / 32o/a> / 33o/a>#define/oa href="+code=pr_fmt" class="sref">pr_fmto/a>(oa href="+code=fmt" class="sref">fmto/a>)/oa href="+code=KBUILD_MODNAME" class="sref">KBUILD_MODNAMEo/a> ospa> class="string">":/"o/spa> /oa href="+code=fmt" class="sref">fmto/a> / 34o/a> / 35o/a>#include <linux/module.ho/a>> / 36o/a>#include <linux/moduleparam.ho/a>> / 37o/a>#include <linux/typ s.ho/a>> / 38o/a>#include <linux/miscdevice.ho/a>> / 39o/a>#include <linux/watchdog.ho/a>> / 40o/a>#include <linux/fs.ho/a>> / 41o/a>#include <linux/ioport.ho/a>> / 42o/a>#include <linux/notifier.ho/a>> / 43o/a>#include <linux/reboot.ho/a>> / 44o/a>#include <linux/init.ho/a>> / 45o/a>#include <linux/spinlock.ho/a>> / 46o/a>#include <linux/io.ho/a>> / 47o/a>#include <linux/uaccess.ho/a>> / 48o/a> / 49o/a> / 50o/a>#define/oa href="+code=WATCHDOG_NAME" class="sref">WATCHDOG_NAMEo/a> ospa> class="string">"w83697ug/uf WDT"o/spa> / 51o/a>#define/oa href="+code=WATCHDOG_TIMEOUT" class="sref">WATCHDOG_TIMEOUTo/a> 60/////////////ospa> class="comment">/* 60/sec default timeout */o/spa> / 52o/a> / 53o/a>static unsigned long/oa href="+code=wdt_is_open" class="sref">wdt_is_openo/a>; / 54o/a>static char/oa href="+code=expect_close" class="sref">expect_closeo/a>; / 55o/a>static oa href="+code=DEFINE_SPINLOCK" class="sref">DEFINE_SPINLOCKo/a>(oa href="+code=io_lock" class="sref">io_locko/a>); / 56o/a> / 57o/a>static int/oa href="+code=wdt_io" class="sref">wdt_ioo/a> = 0x2e; / 58o/a>oa href="+code=module_param" class="sref">module_paramo/a>(oa href="+code=wdt_io" class="sref">wdt_ioo/a>, int, 0); / 59o/a>oa href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESCo/a>(oa href="+code=wdt_io" class="sref">wdt_ioo/a>, ospa> class="string">"w83697ug/uf WDT io port/(default 0x2e)"o/spa> ); / 60o/a> / 61o/a>static int/oa href="+code=timeout" class="sref">timeouto/a> = oa href="+code=WATCHDOG_TIMEOUT" class="sref">WATCHDOG_TIMEOUTo/a>;//ospa> class="comment">/* in/seconds */o/spa> / 62o/a>oa href="+code=module_param" class="sref">module_paramo/a>(oa href="+code=timeout" class="sref">timeouto/a>, int, 0); / 63o/a>oa href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESCo/a>(oa href="+code=timeout" class="sref">timeouto/a>, / 64o/a>////////ospa> class="string">"Watchdog timeout in/seconds. 1<= timeout <=255/(default="o/spa> / 65o/a>////////////////////////////////oa href="+code=__MODULE_STRING" class="sref">__MODULE_STRINGo/a>(oa href="+code=WATCHDOG_TIMEOUT" class="sref">WATCHDOG_TIMEOUTo/a>)/ospa> class="string">")"o/spa> ); / 66o/a> / 67o/a>static oa href="+code=bool" class="sref">boolo/a> oa href="+code=nowayout" class="sref">nowayouto/a> = oa href="+code=WATCHDOG_NOWAYOUT" class="sref">WATCHDOG_NOWAYOUTo/a>; / 68o/a>oa href="+code=module_param" class="sref">module_paramo/a>(oa href="+code=nowayout" class="sref">nowayouto/a>, oa href="+code=bool" class="sref">boolo/a>, 0); / 69o/a>oa href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESCo/a>(oa href="+code=nowayout" class="sref">nowayouto/a>, / 70o/a>////////ospa> class="string">"Watchdog cannot be stopped once started (default="o/spa> / 71o/a>////////////////////////////////oa href="+code=__MODULE_STRING" class="sref">__MODULE_STRINGo/a>(oa href="+code=WATCHDOG_NOWAYOUT" class="sref">WATCHDOG_NOWAYOUTo/a>)/ospa> class="string">")"o/spa> ); / 72o/a> / 73o/a>ospa> class="comment">/*o/spa> / 74o/a>ospa> class="comment"> *.3 / 75o/a>ospa> class="comment"> */o/spa> / 76o/a> / 77o/a>#define/oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>/(oa href="+code=wdt_io" class="sref">wdt_ioo/a>+0)///ospa> class="comment">/* Extended Func3 > Enable Registers */o/spa> / 78o/a>#define/oa href="+code=WDT_EFIR" class="sref">WDT_EFIRo/a>/(oa href="+code=wdt_io" class="sref">wdt_ioo/a>+0)///ospa> class="comment">/* Extended Func3 > Index Registero/spa> / 79o/a>ospa> class="comment"> (sam /as EFER) */o/spa> / 80o/a>#define/oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>/(oa href="+code=WDT_EFIR" class="sref">WDT_EFIRo/a>+1)/ospa> class="comment">/* Extended Func3 > Data Register */o/spa> / 81o/a> / 82o/a>static int/oa href="+code=w83697ug_select_wd_register" class="sref">w83697ug_select_wd_registero/a>(void) / 83o/a>{ / 84o/a>////////unsigned char/oa href="+code=c" class="sref">co/a>; / 85o/a>////////unsigned char/oa href="+code=vers >" class="sref">vers >o/a>; / 86o/a> / 87o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(0x87, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>);/ospa> class="comment">/* Enter extended func3 > mode */o/spa> / 88o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(0x87, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>);/ospa> class="comment">/* Again according to manual */o/spa> / 89o/a> / 90o/a>////////oa href="+code=outb" class="sref">outbo/a>(0x20, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>);///ospa> class="comment">/* check chip vers >///*/o/spa> / 91o/a>////////oa href="+code=vers >" class="sref">vers >o/a> = oa href="+code=inb" class="sref">inbo/a>(oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); / 92o/a> / 93o/a>////////if/(oa href="+code=vers >" class="sref">vers >o/a> == 0x68) {//ospa> class="comment">/* W83697UG */o/spa> / 94o/a>////////////////oa href="+code=pr_info" class="sref">pr_infoo/a>(ospa> class="string">"Watchdog chip vers >/0x%02x = W83697UG/UF found at 0x%04x\n"o/spa> , / 95o/a>////////////////////////oa href="+code=vers >" class="sref">vers >o/a>, oa href="+code=wdt_io" class="sref">wdt_ioo/a>); / 96o/a> / 97o/a>////////////////oa href="+code=outb_p" class="sref">outb_po/a>(0x2b, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>); / 98o/a>////////////////oa href="+code=c" class="sref">co/a> = oa href="+code=inb_p" class="sref">inb_po/a>(oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); ///ospa> class="comment">/* select WDT0 */o/spa> / 99o/a>////////////////oa href="+code=c" class="sref">co/a> &= ~0x04; /100o/a>////////////////oa href="+code=outb_p" class="sref">outb_po/a>(0x2b, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>); /101o/a>////////////////oa href="+code=outb_p" class="sref">outb_po/a>(oa href="+code=c" class="sref">co/a>, oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); ///ospa> class="comment">/* set pin118 to WDT0 */o/spa> /102o/a> /103o/a>////////} else { /104o/a>////////////////oa href="+code=pr_err" class="sref">pr_erro/a>(ospa> class="string">"No W83697UG/UF could be found\n"o/spa> ); /105o/a>////////////////return -oa href="+code=ENODEV" class="sref">ENODEVo/a>; /106o/a>////////} /107o/a> /108o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(0x07, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>);/ospa> class="comment">/* point/to logical device number reg */o/spa> /109o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(0x08, oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); ospa> class="comment">/* select logical device 8 (GPIO2) */o/spa> /110o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(0x30, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>);/ospa> class="comment">/* select CR30 */o/spa> /111o/a>////////oa href="+code=c" class="sref">co/a> = oa href="+code=inb_p" class="sref">inb_po/a>(oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); /112o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(oa href="+code=c" class="sref">co/a> | 0x01, oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); ospa> class="comment">/* set bit 0/to ac3 vate GPIO2 */o/spa> /113o/a> /114o/a>////////return 0; /115o/a>} /116o/a> /117o/a>static void/oa href="+code=w83697ug_unselect_wd_register" class="sref">w83697ug_unselect_wd_registero/a>(void) /118o/a>{ /119o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(0xAA, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>);/ospa> class="comment">/* Leave extended func3 > mode */o/spa> /12 va>} /121o/a> /122o/a>static int/oa href="+code=w83697ug_init" class="sref">w83697ug_inito/a>(void) /123o/a>{ /124o/a>////////int/oa href="+code=ret" class="sref">reto/a>; /125o/a>////////unsigned char/oa href="+code=t" class="sref">to/a>; /126o/a> /127o/a>////////oa href="+code=ret" class="sref">reto/a> = oa href="+code=w83697ug_select_wd_register" class="sref">w83697ug_select_wd_registero/a>(); /128o/a>////////if/(oa href="+code=ret" class="sref">reto/a> != 0) /129o/a>////////////////return oa href="+code=ret" class="sref">reto/a>; /130o/a> /131o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(0xF6, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>);/ospa> class="comment">/* Select CRF6 */o/spa> /132o/a>////////oa href="+code=t" class="sref">to/a> = oa href="+code=inb_p" class="sref">inb_po/a>(oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); ///ospa> class="comment">/* read CRF6 */o/spa> /133o/a>////////if/(oa href="+code=t" class="sref">to/a> != 0) { /134o/a>////////////////oa href="+code=pr_info" class="sref">pr_infoo/a>(ospa> class="string">"Watchdog already running. Resetting timeout to %d/sec\n"o/spa> , /135o/a>////////////////////////oa href="+code=timeout" class="sref">timeouto/a>); /136o/a>////////////////oa href="+code=outb_p" class="sref">outb_po/a>(oa href="+code=timeout" class="sref">timeouto/a>, oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); ///ospa> class="comment">/* Write back to CRF6 */o/spa> /137o/a>////////} /138o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(0xF5, oa href="+code=WDT_EFER" class="sref">WDT_EFERo/a>);/ospa> class="comment">/* Select CRF5 */o/spa> /139o/a>////////oa href="+code=t" class="sref">to/a> = oa href="+code=inb_p" class="sref">inb_po/a>(oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); ///ospa> class="comment">/* read CRF5 */o/spa> /140o/a>////////oa href="+code=t" class="sref">to/a> &= ~0x0C;/////////////ospa> class="comment">/* set second mode &o/spa> /141o/a>ospa> class="comment"> disable keyboard turning off watchdog */o/spa> /142o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(oa href="+code=t" class="sref">to/a>, oa href="+code=WDT_EFDR" class="sref">WDT_EFDRo/a>); ///ospa> class="comment">/* Write back to CRF5 */o/spa> /143o/a> /144o/a>////////oa href="+code=w83697ug_unselect_wd_register" class="sref">w83697ug_unselect_wd_registero/a>(); /145o/a>////////return 0; /146o/a>} /147o/a> /148o/a>static void/oa href="+code=wdt_ctrl" class="sref">wdt_ctrlo/a>(int/oa href="+code=timeout" class="sref">timeouto/a>) /149o/a>{ /150o/a>////////oa href="+code=spin_lock" class="sref">spin_locko/a>(&oa href="+code=io_lock" class="sref">io_locko/a>); /151o/a> /152o/a>////////if/(oa href="+code=w83697ug_select_wd_register" class="sref">w83697ug_select_wd_registero/a>() < 0) { /12.c#L153 hre &= ~0x0C;/////////////ospa> class="commnam//if/(oa href="+code=w83697ug_select_wd_register" disabl150">/150o/a>////////oan>" nam /151o/a> /oL145" disabl150">/150o/a>////////oan>" nam hdog/w8363697ug_wdt.c#L55" id/146o/a>} / 56o/a> / 87o/a>////////oa href="+code=outb_p" claF4ss="sref">outbo/a>(0x20, oa href="+code=WDT_EFER" class="s="sref">WDT_EFERo/a>);/ospa> class=4">/* Write back to CRF5 */o/spa> /138o/a>////////oa href="+code=outb_p" class="sref">outb_po/a>(oa href="+code=timeout" class="sref">timeouto/a>, oa href="+code=WDT_EFDR" classref">WDT_EFDRo/a>); ///ospa> clTdy runncoua> clcommen4">/* Write back to CRF5 */o/spa> / 89o/a> /150o/a>////////oa href="+code=w83697ug_unselect_wd_register" class="sref">w83697ug_unselect_wd_registero/a>(); /151o/a> /142o/a>mp;= ~0x0C;/////////////ospa> class="commnam//if/(oa href="+code=w83697ug_select_wd_register" disabl150">/150o/a>////////oan>" nam /146o/a>} / 34o/a> / 57o/a>static pfoo/a href="+code=wdt_pfooss="sref">w83697ug_inito/a>(void) / 87o/a>ic void/oa href="+code=wdt_ctrl" cla///////////////////////oa href="+code=timeout" class="sref">timeouto/a>); /145o/a>////////return 0; /146o/a>} /130o/a> / 61o/a>stawdt_ oa href="+code=wdt_ ss="sref">w83697ug_inito/a>(void) / 87o/a>ic void/oa href="+code=wdt_ctrl" claclass="sref">boolo/a>, 0); /114o/a>////////return 0; /115o/a>} / 76o/a> / 57o/a>static set_heartbearef="+code=w83697ic set_heartbear" class="sref">wdt_ctrlo/_po/a>(oa href="+cod>w83697ug_inito/a>(void) /118o/a>{ /133o/a>////////if/(oa href="+codelect_1 ||/140o/a>////////oa href="+code=gct_255>w83697ug_inito/a>(void) /105o/a>////////////////rINVAL///////oa href=rINVALe=ret" class="sref">reto/a>; / 81o/a> /132o/a>/ic int/oa href="+code=timeout" class="sref">timeoued char/oa href="+code=t" class="sref">to/a>; /114o/a>////////return 0; /115o/a>} /115o/a>} / 67o/assize_ed char/oa href=ssize_e"line57">/ 57o/a>static wa> cef="+code=w83697ic wa> c" clastruc="sref">wdt_ctrlodwdt_ctrlod////////unsign__us97ug_unselect_wd___us97"line*sref">wdt_ctrlobufug_unselect_wd_buf"lin," nam /115o/a>} ///////////////////////////////// / 67o/asize_ed char/oa href=size_e"line57">/ 57o/a>stacoua>d char/oa href=coua>t" class="sref">timeoloff_ed char/oa href=loff_e"line*sref">wdt_ctrlopposd char/oa href=ppos+cod>w83697ug_inito/a>(void) /118o/a>{ /133o/a>////coua>d char/oa href=coua>t" cd_registero/a>() < 0) { /oL13!3">/133o/a>////ESCo/a>(oa href="+code=nowayout" cld_registero/a>() < 0) { / 71o/a>/ / 67o/asize_ed char/oa href=size_e"line57">/ 57o/a>stai97ug_select_wd_r+code=t" class="sref">to/a>; / 92o/a> /1 71o/a>/ / 67o/aic char/oa href="+code=expect_close" class=clase=t" class="sref">to/a>; / 34o/a> / 95o/a>/mentef">DEFINE_SPINLO97ug_select_wd_r+codclasee57">/ 57o/a>stai97ug_select_wd_r+code=t"3">/133o/a>////coua>d char/oa href=coua>t" cee57">/ 57o/a>stai97ug_select_wd_r+cod++d_registero/a>() < 0) { /////////////////84o/a>////////unsigned char/oa href="+code=c" class="sref">co/a>; /e" nam /oL13>////////unsignget_us97ug_unselect_wd_get_us97" cla///////////////b_po/a>(oa href="+code=c" class="sref"bufug_unselect_wd_buf"lin +e57">/ 57o/a>stai97ug_select_wd_r+cod)>w83697ug_inito/a>(void) /////////////////////////105o/a>////////////////rFAUL"+code=WATCHDOG_rFAUL"+code=c" class="sref">co/a>; /e" nam /oL13>////////unsign////////oa href="+code==>WATCHDOG_NOWAYOUTo/a>)#39;V)#39; could b=c" class="sref">co/a>; ///////////////////////// / 67o/aic char/oa href="+code=expect_close" class=cla42e=c" class="sref">co/a>; /////////e" nam /115o/a>} /e" nam /115o/a>} /12.c#L153 hre &atic pfoo/a href="+code=wdt_pfooss="slass="sref">boolo/a>, 0); /115o/a>} 3">/133o/a>////coua>d char/oa href=coua>t" ce" nam /115o/a>} /146o/a>} /107o/a> static unsigned looct/oa href="+code=wdt_ooct/" clastruc="sref">wdt_ctrlodwdt_ctrlod/1ss="sref">wdt_ctrlocmdd char/oa href=cmd"lin,noL125">/1 53o/a>static unsignaro/a href="+code=aro+cod>w83697ug_inito/a>(void) /149o/a>{ /148o/a>stat__us97ug_unselect_wd___us97"line*sref">wdt_ctrloaro///oa href="+codaro/ass=cla(/148o/a>stat__us97ug_unselect_wd___us97"line*)a>static unsignaro/a href="+code=aro+code" nam /115o/a>} wdt_ctrlo__us97ug_unselect_wd___us97"line*sref">wdt_ctrlo///oa href="+cod/ass=clasref">wdt_ctrloaro///oa href="+codaro/ass=e" nam /115o/a>} wdt_ctrlonew_/ic int/oa href="+codenew_/ic intass=e" nam /115o/a>} wdt_ctrloo/a>} / 57o/a>staidea>d char/oa href=idea>ass=clae" nam /149o/a>{ /.oL138">/138o/a>/ Licesd char/oa href=/ Licesass=clanam /12.c#L153 hre &aWDIOF_KEEPALIVEPref="+code=__MODULWDIOF_KEEPALIVEPrefass=c|" nam /149o/a>{ / 65o/a>/////////oL14">/12.c#L153 hre &aWDIOF_SETa href="+code=WATCHDOG_DIOF_SETa href=ass=c|" nam /149o/a>{ /////////////////oL14">/12.c#L153 hre &aWDIOF_MAGICCLOSE"+code=WATCHDOG_DIOF_MAGICCLOSE"lin," nam /115o/a>} /.oL138">/138o/a>firmty f_////////oa href="+codefirmty f_///////ass=clanam 1," nam /115o/a>} /.oL138">/138o/a>idea>ityd char/oa href=idea>ityass=clanam /ass="sref">pr_infoo/a>(ospa>ass="string">"w8369," nam /115o/a>} /115o/a>} /130o/a> 13>////////unsign/mdd char/oa href=cmd"lind_registero/a>() < 0) { / 80o/a>#dIOC_GETSUPPOR="+code=WATCHDOG_DIOC_GETSUPPOR="lin:egistero/a>() < 0) { /1oL133">/133o/a>////copy_to_us97ug_unselect_wd_copy_to_us97" cla///////////////aro///oa href="+codaro/ass=, am//if/(oa href="+coddea>d char/oa href=idea>ass=, sizeofef">DEFINE_SPINLOdea>d char/oa href=idea>ass=))>w83697ug_inito/a>(void) /////////105o/a>////////////////rFAUL"+code=WATCHDOG_rFAUL"+code=c" class="sref">co/a>; /breake=c" class="sref">co/a>; /126o/a> / 80o/a>#dIOC_GETSTATUS"+code=WATCHDOG_DIOC_GETSTATUS"lin:egistero/a>() < 0) { / 80o/a>#dIOC_GETBOOTSTATUS"+code=WATCHDOG_DIOC_GETBOOTSTATUS"lin:egistero/a>() < 0) { /129o/a>///////////////put_us97ug_unselect_wd_put_us97" clace=c" class="sref"///oa href="+cod/ass=lass="sref">boolo/a>, 0); /130o/a> / 80o/a>#dIOC_SETOPTIONS"+code=WATCHDOG_DIOC_SETOPTIONS"lin:egistero/a>() < 0) { () < 0) { /1os="sref">wdt_ctrlo/ Licesd char/oa href=/ Licesass=e=c" class="sref"129va/oa href="+code=129va/ass=cla////////////////rINVAL///////oa href=rINVALe=ret" class="sref">reto/a>; / 34o/a> /oL13>////////unsignget_us97ug_unselect_wd_get_us97" cla//////////////// Licesd char/oa href=/ Licesass=e=c" class="sref"///oa href="+cod/ass=l>w83697ug_inito/a>(void) /////////105o/a>////////////////rFAUL"+code=WATCHDOG_rFAUL"+code=c" class="sref">co/a>; /107o/a> /oL13>////////unsign/ Licesd char/oa href=/ Licesass=cam//i / 80o/a>#dIOS_DISABLECARD"+code=WATCHDOG_DIOS_DISABLECARD"lind_registero/a>() < 0) { /e" nam static unsigned l oa href="+code=wdt_ ss="slass="sref">boolo/a>, 0); /////////c" class="sref"129va/oa href="+code=129va/ass=clase=t" class="sref">to/a>; /e" nam /146o/a>} / 92o/a> /1oL133">/133o/a>///// Licesd char/oa href=/ Licesass=cam//i / 80o/a>#dIOS_ENABLECARD"+code=WATCHDOG_DIOS_ENABLECARD"lind_registero/a>() < 0) { /////////2.c#L153 hre &atic pfoo/a href="+code=wdt_pfooss="slass="sref">boolo/a>, 0); /135o/a>////////////////129va/oa href="+code=129va/ass=clase=t" class="sref">to/a>; /e" nam /146o/a>} /147o/a> /129o/a>////////////////reva/oa href="+code=129va/ass=e=t" class="sref">to/a>; to/a>; /130o/a> / 80o/a>#dIOC_KEEPALIVE"+code=WATCHDOG_DIOC_KEEPALIVE"lin:egistero/a>() < 0) { /2.c#L153 hre &atic pfoo/a href="+code=wdt_pfooss="slass="sref">boolo/a>, 0); /1breake=c" class="sref">co/a>; ); / 34o/a> / 80o/a>#dIOC_SETa href="+code=WATCHDOG_DIOC_SETa href=ass=:egistero/a>() < 0) { /oL13>////////unsignget_us97ug_unselect_wd_get_us97" cla///////////////new_/ic int/oa href="+codenew_/ic intass=e=c" class="sref"///oa href="+cod/ass=l>w83697ug_inito/a>(void) /e" nam <105o/a>////////////////rFAUL"+code=WATCHDOG_rFAUL"+code=c" class="sref">co/a>; /oL13>////////unsigntic set_heartbearef="+code=w83697ic set_heartbear" cla///////////////new_/ic int/oa href="+codenew_/ic intass=l>w83697ug_inito/a>(void) /e" nam <105o/a>////////////////rINVAL///////oa href=rINVALe=ret" class="sref">reto/a>; /2.c#L153 hre &atic pfoo/a href="+code=wdt_pfooss="slass="sref">boolo/a>, 0); /1ef">WDT_EFDRo/a>); ///osFalgain according to manual */o/spa> / 92o/a> / 80o/a>#dIOC_GETa href="+code=WATCHDOG_DIOC_GETa href=ass=:egistero/a>() < 0) { /oL145">///////////////put_us97ug_unselect_wd_put_us97" cla///////////////b_po/a>(oa href="+code=timeout" class="sref">timeo///oa href="+cod/ass=lass="sref">boolo/a>, 0); /115o/a>} () < 0) { /105o/a>////////////////retTTY///////oa href=retTTYe=ret" class="sref">reto/a>; to/a>; /114o/a>////////return 0; /12 va>} / 81o/a> /122o/a>statdt_ope//oa href="+codetdt_ope/" clastruc="sref">wdt_ctrlointrld char/oa href=intrl"line*sref">wdt_ctrlointrld char/oa href=intrl"lin,1struc="sref">wdt_ctrlodwdt_ctrlodw83697ug_inito/a>(void) /123o/a>{ /133o/a>/////est_and set_bhref="+code=w8369/est_and set_bhr" clace=am//if/(oa href="+cowdt_os_ope//oa href="+codetdt_os_ope/ass=l>w83697ug_inito/a>(void) /105o/a>////////////////rBUSY///////oa href=rBUSYe=ret" class="sref">reto/a>; WDT_EFDRo/a>); ///o according to manual */o/spa> /141o/a>ospa> cl*pa> clAment">/ according to manual */o/spa> /141o/a>ospa> cl*n according to manual */o/spa> / 89o/a> /150o/a>/ic pfoo/a href="+code=wdt_pfooss="slass="sref">boolo/a>, 0); ///////////////nonseek _ope//oa href="+codenonseek _ope/" cla///////////////intrld char/oa href=intrl"lin,1sref">wdt_ctrlodass="sref">boolo/a>, 0); /12 va>} /143o/a> /122o/a>statdt_/oa href="+code=expetdt_/oa h" clastruc="sref">wdt_ctrlointrld char/oa href=intrl"line*sref">wdt_ctrlointrld char/oa href=intrl"lin,1struc="sref">wdt_ctrlodwdt_ctrlodw83697ug_inito/a>(void) /123o/a>{ /133o/a>////ic char/oa href="+code=expect_close" class=clla42>w83697ug_inito/a>(void) /a>static unsigned l oa href="+code=wdt_ ss="slass="sref">boolo/a>, 0); /103o/a>////////} else { / 99o/a>////////pr_crhref="+code=w8369pr_crhr" cla/ss="sref">pr_infoo/a>(ospaUnct_clo>/12" cl, not1stoppfoole keyboa!697UG/UF could be found\n"o/spa> ); /oL150">/150o/a>/ic pfoo/a href="+code=wdt_pfooss="slass="sref">boolo/a>, 0); /12 va>} /132o/a>ic char/oa href="+code=expect_close" class=clase=t" class="sref">to/a>; / 87o/a>clear_bhref="+code=w8369clear_bhr" clace=am//if/(oa href="+cowdt_os_ope//oa href="+codetdt_os_ope/ass=le=t" class="sref">to/a>; /114o/a>////////return 0; /115o/a>} /126o/a> /141o/a/o according to manual */o/spa> /141o/a>*pa> clNotifier/mentsystem down according to manual */o/spa> /141o/a>*n according to manual */o/spa> /130o/a> / 61o/a>stawdt_notify_sys/oa href="+codetdt_notify_sys" clastruc="sref">wdt_ctrlonotifier_bw83697ug_select_wd_notifier_bw836"line*sref">wdt_ctrlothis/oa href="+codethis"lin,1oL125">/1 53o/a>static unsignctrld char/oa href=ctrl"lin,e" nam /130o/a> wdt_ctrlounusedd char/oa href=unused"lin>w83697ug_inito/a>(void) /123o/a>{ /133o/a>////ctrld char/oa href=ctrl"line==>W">/133o/a>////SYS_DOWNd char/oa href=SYS_DOWN"line||/140o/a>ctrld char/oa href=ctrl"line==>W">/133o/a>////SYS_HAL"+code=WATCHDOG_SYS_HAL""lin>w83697ug_inito/a>(void) /a>static unsigned l oa href="+code=wdt_ ss="sla>/1ef">WDT_EFDRo/a>); ///osT14">theringisabl*n according to manual */o/spa> /126o/a> a>static unsignNOTIFY_DONE"+code=WATCHDOGNOTIFY_DONEe=ret" class="sref">reto/a>; /115o/a>} / 89o/a> /141o/a/o according to manual */o/spa> /141o/a>*pa> clKernel Ia> cfaces according to manual */o/spa> /141o/a>*n according to manual */o/spa> /113o/a> wdt_ctrlodstatic unsigned lfops/oa href="+codetdt_fopsass=clae" nam /123o/a>{ /138o/a>/wn97ug_unselect_wd_/wn97"line" nam W">/133o/a>////THIS_MODULE"+code=WATCHDOGTHIS_MODULE"lin,e" nam /130o/a> /138o/a>llseek"+code=WATCHDOGllseek"line" nam W">/133o/a>////no_llseek"+code=WATCHDOGno_llseek"lin,e" nam /130o/a> /138o/a>wa> cef="+code=w83697a> c" cle" nam W">/133o/a>////wic wa> cef="+code=w83697ic wa> c" cl,e" nam /130o/a> /138o/a>lass="edlooct/oa href="+code=lass="edlooct/ass=claf/(oa href="+cowdt_ooct/oa href="+code=wdt_ooct/" cl,e" nam /130o/a> /138o/a>/ e//oa href="+codeope/ass= e" nam W">/133o/a>////wic ope//oa href="+codetdt_ope/" cl,e" nam /130o/a> /138o/a>relea href="+code=experelea h"line" nam <=>W">/133o/a>////wic /oa href="+code=expetdt_/oa h" cl,e" nam /130o/a> /115o/a>} / 92o/a> wdt_ctrlomiscdevichref="+code=expemiscdevich"linea>static unsigned lmiscdevref="+code=expetdt_miscdevass=clae" nam /123o/a>{ /138o/a>mino7ug_unselect_wd_mino7ass=claf/(oa href="+coWATCHDOG_MINO oa href="+code=WATCHDOG_MINO " cl,e" nam /130o/a> /138o/a>idpr_infoo/a>(ospa0o/a> "w8369," nam /115o/a>} /138o/a>fops/oa href="+codefopsass=claam//if/(oa href="+cowdt_fops/oa href="+codetdt_fopsass=," nam /115o/a>} /115o/a>} /115o/a>} /141o/a/o according to manual */o/spa> /141o/a>*pa> clTheringineedslcomlearn abrunnsofnnshutdowns in ord clco according to manual */o/spa> /141o/a>*pa> clt14">ther=timbomb ">w83697sisab. according to manual */o/spa> /141o/a>*n according to manual */o/spa> /113o/a> wdt_ctrlonotifier_bw83697ug_select_wd_notifier_bw836"line61">/ 61o/a>stawdt_notifi97ug_unselect_wd_rdt_notifi97ass=clae" nam /123o/a>{ /138o/a>iotifier_cal/oa href="+code=iotifier_cal/ass=claf/(oa href="+cowdt_notify_sys/oa href="+codetdt_notify_sys" cl," nam /115o/a>} /115o/a>} /107o/a> wdt_ctrlo__inhref="+code=w8369__inhr"line61">/ 61o/a>stawdt_inhref="+code=w8369wdt_inhrss="sref">w83697ug_inito/a>(void) /149o/a>{ wdt_ctrloreref="+code=w8369rere=ret" class="sref">reto/a>; / 81o/a> /142o/a>pr//////oa href="+codepr/////" cla/ss="sref">pr_infoo/a>(ospaingiL81">//menttheriinbond(TM) >ass="st/UF Sup>//I/O chip inhrialisfoo697UG/UF could be found\n"o/spa> ); /143o/a> /133o/a>////tic set_heartbearef="+code=w83697ic set_heartbear" cla///////////////////////oa href="+code=timeout" cld_registero/a>() < 0) { /3">/133o/a>////tic set_heartbearef="+code=w83697ic set_heartbear" cla///////////////WATCHDOG_a href="+code=WATCHDOG_ATCHDOG_a href=ass=le=t" class="sref">to/a>; /oL142">/142o/a>pr//////oa href="+codepr/////" cla/ss="sref">pr_infoo/a>(ospa=timeou value must be 1lect////////lect/255, usfoo %d697UG/UF could ," nam /115o/a>} /e" nam to/a>; to/a>; / 89o/a> /133o/a>////request_">w8///oa href="+coderequest_">w8//" cla///////////////wdt_oooa href="+code=wdt_oo"lin,11lass="sref">timeo_ATCHDOGe=wdt_oo"code=wdt_oo"lin,11lass="sref">timeo_ATCHDOGe=wdt_oo"code=wdt_oo"lin,11lass="sref">timeo_ATCHDOGe=wdtvers/wa2chdog/wc#L141" id/ 81o/a> , 0); timeo_ATCHDOGe="drivers/wa3chdog/w83397ug_wdt.c#L149" id, 0); ); 3a hr2f="dr25s="line" nam3/ 34o/a> /3">/133o/a>wdt_ctrloo/a>} / 80o/a>#3IOC_S3m /146wa3chdog/w83397ug_wdt.c#L150" id() &3t; 0) { /149o/a>{ 3697ug_wm ; /115o/aunHDOCHDOGe= _ctrloo/a>} ; *n accCHDboo"line" nam .oL138">/138o/a>*n accCHDboo"line" nam href23" cla3s="lin}e" nam /138o/a>iotifier_cal/o="drivers/wa2tchdog/w823697ug_wdt.c#L92" id() < 0) { / 80o/a>#3IOC_G36wdt.c#L153" id, 0); ); 3t; 0) { /115o/aunHDOCHDOGe= _ctrloo/a>} /146wa3chdog/w83397ug_wdt.c#L150" id()3< 3) { /10536=c" class="sr cla2s="line" n 81o/a> *n acc3chdog/w83397ug_wdt_a>*n acc href23" cla3s="lin}e" nam /138o/a>mino7ug_unsele="drivers/wa2tchdog/w823697ug_wdt.c#L92" id /114o3a>///36denew_/ic intass=l>w8 cla2s="line" n," era>, 0); /1236g/w823697ug_wdt.c#L60" id
    /138o/a>id / 81o/a> /115o/aunHDOCHDboo"_ctrloo/a>} /122o/a>statdt3ope//37ar/oa href="+code=expect_close" class=clase=t" class="sre3trld char3oa href=intrl"line*sref"3wdt_c37chref="+code=expemiscdevich"linea>static unsigned7="line" 3am /133o/a>/////3st_an3c#L74" id/115o/a>} /143o/zed. "line" =am / 6=am /115onam / 71o/a>/ / 67o/asloo/a>} /3">/133o/a>wdt_ctrtTTY///////oa href=retTTYe=ret" class="sref"3drivers/w32tchdog/w823697ug_wdt.c#378" i37ug_wdt.c#L108" id/115o/aunHDOCHDboo"_ctrtTTY///////oa href=retTTYe=ret" class="sref"3d"line" nam /150o/a>/ic pf3o/a h379L74" id/138o/unHDOn accCHDboo"line" nam href23" cla3s="lin}e" nam /138o/a>iotifier_cal/o="drivers/wa2tchdog/w823697ug_wdt.c#L92" id/115o/aunHDOCHDOGe= _ctrtTTY///////oa href=retTTYe=ret" class="sref"3/////////3/intrld char/oa href=int3l"lin31sref">wdt_ctr> tims/wa3oo"lin,wdt_oo"code=wdt_oo"lin,11lass="sref">timeo_ATCHDOGe=wd="drivers/wa2tchdog/w823697ug_wdt.c#L92" id/143o/a> /3">/133o/a>wdt_ctrloo/a>} /122o/a>statdt3/oa h3ef="+ccode=expect_close" class=clase=t" class="sre3intrld ch3r/oa href=intrl"line*sre3">wdt38a href="+code=WATCHDOG_DIOC_SETa href=ass=:egist386"line" 3am /133o/a>////i3 char3oa hreoid) (3oid) *n acc3chdog/w83397ug_wdt_dea>*n acc href23" cla3s="lin}e" nam /138o/a>mino7ug_unsele="drivers/wa2tchdog/w823697ug_wdt.c#L92" id3 99o/3>////////pr_cr4" cl17="line" unHDOn accCHDboo"line" nam .oL138">/138o/unHDOn accCHDboo"line" nam href23" cla3s="lin}e" nam /138o/a>iotifier_cal/o="drivers/wa2tchdog/w823697ug_wdt.c#L92" id/12" cl, not1stoppf3ole k389L74" idtims/wa3oo"lin,wdt_oo"code=wdt_oo"lin,11lass="sref">timeo_ATCHDOGe=wd="drivers/wa2tchdog/w823697ug_wdt.c#L92" id, 0); /132o3a>ic 39f="+codepr/////" cla/ss="sref">pr_infoo/a>(ospain">to/a>; 3a href="drivers/wa2tchdo3/w823397ug_w cla3s="line" noodulewm /149o/a>{oodulewm /149o/a>{ ="lie" n3oa href="+codetdt_os_ope3ass=l3=t" cl cla3s="line" noodulewex/w83397ug_wdt.c#Loodulewex/wwdt_oo"code=wdt_oo"lin,1ex/w83397ug_wdt.c#L" naex/w="dr="drivers/wa2tchdog/w823697ug_wdt.c#L92" idntrld ch35" cl29="line" nam /1139a href="+code=WATCHDOG_DIOC_SETa href=ass=:egist39="line" 3am /126o/a> /.oL13+code=_LICENnaref="drivers/wa3chdog/w83397ug_wGPLhref="drivers/wa3chdog/w83397ug_wdt.c#L144" id/141o/a/o acco3ding 39lie" href="drivers/w+code=_AUTHm .oL138">/138o/a+code=_AUTHm ref="drivers/wa3chdog/w83397ug_wFlemme" nFrandsen nam ff@nrvis/e" .net>href="drivers/wa3chdog/w83397ug_wdt.c#L144" id, 3c#L98" id/138o/a+code=_DESCRI{ /138o/a+code=_ALIAS_MISCDEVdt.c#L146" id/138o/a>id 1/div> idLXRo clri hreal 7ug_in, byd3chdog/w8mailto:lxm@L10ux.no">lxm@L10ux.not.c#. 1/div> lxm.L10ux.no kindly hosl29=byd3chdog/w8http://www.redpill-L10pro.no">Redpill L10pro ASt.c#, provilt14of L10ux" namulte" nand #L115" id< ser#L12< since 1995. 1/div>