linux/drivers/char/tb0219.c
<<
="v34="v34="o/spa326="ospa3 class="lxr_search">="v3="v34="v34="v34 typ Search26 4="v34="o/spa326v34< ="oinput typ =v34< 6 odiv id< <1o/a>ospa3 class="comment">/*o/spa326< <2o/a>ospa3 class="comment"> * Driver for TANBAC TB0219 base board.o/spa326< <3o/a>ospa3 class="comment"> *o/spa326< <4o/a>ospa3 class="comment"> * Copyright (C) 2005 Yoichi Yuasa <yuasa@linux-mips.org>o/spa326< <5o/a>ospa3 class="comment"> *o/spa326< <6o/a>ospa3 class="comment"> * This program is free software; you ca3 redistribute it and/or modifyo/spa326< <7o/a>ospa3 class="comment"> * it under the terms of the GNU General Public License as published byo/spa326< <8o/a>ospa3 class="comment"> * the Free Software Founda v3; either verson> 2 of the License, oro/spa326< <9o/a>ospa3 class="comment"> * (at your > v3) any later verson>.o/spa326< > a>ospa3 class="comment"> *o/spa326< 11o/a>ospa3 class="comment"> * This program is distributed in the hope th"co <2pt16 4 va<4ll219.c#L6" ido1spa3 class="comment"> *1 Dri1er for TANBAC TB0219 base board4 v WITHOUT ANY WARRANTY; cl">= v evel219.cimplia<4f tranty"dr9.c#L11" ido1spa3 class="comment"> *1o/spa126o1spa3 class="comment"> *1 Cop1right (C) 2005 Yoichi Yuasa &lshed byo/spa326o1spa3 class="comment"> *1o/spa126<1 <6o/a>o1spa3 class="comment"> *1 Thi1 program is free software; you Yyo/s>= ld have326cess=d a c;yuas published byo/spa326<1 <7o/a>o1spa3 class="comment"> *1 it 1nder the terms of the GNU Generalong cl"> tope th"co ; if not, wri"drtoer verson> 2 of th9.c#L6" id<1 <8o/a>o1spa3 class="comment"> *1 the1Free Software Founda v3; eithe License, , Inc., 59 Temple Plactb0Sui"dr330, Bput, , MA <1 <9o/a>o1spa3 class="comment"> *1 (at1your > v3) any later verson/9.c#L2" id< >< > a2ospa3 class="comment"> 2o/spa226="v3/perstnm"_devef=.hspa3 clas itf">>="v3/perstnm"_devef=.h6< >< 11o/a2ospa3 class="comment"> 2 Thi216="v3/fs.hspa3 clas itf">>="v3/fs.h6< <2o/a>osspa3 class="comment"> * Dri226="v3/init.hspa3 clas itf">>="v3/init.h6< <3o/a>o2spa3 class="comment"> *2o/spa236="v3//tbul=.hspa3 clas itf">>="v3//tbul=.h6< <4o/a>o2spa3 class="comment"> *2 Cop2right id< <5o/a>o2spa3 class="comment"> *2o/spa256< <6o/a>o2spa3 class="comment"> *2 Thi266< <7o/a>o2spa3 class="comment"> *2 it 276< <8o/a>o2spa3 class="comment"> *2 the286< <9o/a>o2spa3 class="comment"> *2 (at29ight id<3>< > a3ospa3 class="comment"> 3o/spa326MODULE_AUTHOR6 v3) any lt16 ng">"rg>o/spa326<3>< 11o/a3ospa3 class="comment"> 3 Thi316MODULE_DESCRIPTION6 v3) any lt16 ng">" href="drivers/char/tb02 lass=""9.c#L2")1 id<3 <2o/a>o3spa3 class="comment"> *3 Dri326MODULE_LICENSE6 v3) any lt16 ng">"GPL"9.c#L2")1 id<3 <3o/a>osspa3 class="comment"> *oo/spa33ight id<3 <4o/a>o3spa3 class="comment"> *3 Cop3right"> int hdmajoright; div id major devef= numberon/9.c#L2" id<3 <5o/a>o3spa3 class="comment"> *3o/spa356mtbul=_#Lram6dmajoright, int, 0)1 id<3 <6o/a>o3spa3 class="comment"> *3 Thi366MODULE_PARM_DESC6dmajoright, > v3) any lt16 ng">"Major devef= number"9.c#L2")1 id<3 <7o/a>o3spa3 class="comment"> *3 it 37ight id<3 <8o/a>o3spa3 class="comment"> *3 the38ight"> void (*>dold_magt;ned/chaandight)1 id<3 <9o/a>o3spa3 class="comment"> *3 (at39ight"> void >d__iomemight *>dam < >< > a4ospa3 class="comment"> 4o/spa40ight"> >dDEFINE_SPINLOCK6dam <4>< 11o/a4ospa3 class="comment"> 4 Thi41ight id<4 <2o/a>o4spa3 class="comment"> *4 Dri426dam doffsetight) >dreadw6dam doffsetight)) id<4 <3o/a>o4spa3 class="comment"> *4o/spa436dam doffsetight, >d clasight) >dwri"dw6d clasight), >dam doffsetight)) id<4 <4o/a>osspa3 class="comment"> * Cop4right id<4 <5o/a>o4spa3 class="comment"> *4o/spa456ddriver_STARTight 0x0a000000UL id<4 <6o/a>o4spa3 class="comment"> *4 Thi466ddriver_SIZEight 0x20UL id<4 <7o/a>o4spa3 class="comment"> *4 it 47ight id<4 <8o/a>o4spa3 class="comment"> *4 the486ddriver_LEDight 0x00 id<4 <9o/a>o4spa3 class="comment"> *4 (at496ddriver_GPIO_INPUTight 0x02 id< >< > a5ospa3 class="comment"> 5o/spa506ddriver_GPIO_OUTPUTight 0x04 id< >< 11o/a5ospa3 class="comment"> 5 Thi516ddriver_DIP_SWITCHight 0x06 id< <2o/a>o5spa3 class="comment"> *5 Dri526ddriver_MISCight 0x08 id< <3o/a>o5spa3 class="comment"> *5o/spa536ddriver_RESETight 0x0e id< <4o/a>o5spa3 class="comment"> *5 Cop546ddriver_PCI_SLOT1_IRQ_STATUSight 0x10 id<5 <5o/a>osspa3 class="comment"> *oo/spa556ddriver_PCI_SLOT2_IRQ_STATUSight 0x12 id< <6o/a>o5spa3 class="comment"> *5 Thi566ddriver_PCI_SLOT3_IRQ_STATUSight 0x14 id< <7o/a>o5spa3 class="comment"> *5 it 57ight id<5 <8o/a>o5spa3 class="comment"> *5 the586<5 <9o/a>o5spa3 class="comment"> *5 (at59ight >ddYPE_LEDight, id< >< > a6ospa3 class="comment"> 6o/spa60ight >ddYPE_GPIO_OUTPUTight, id< >< 11o/a6ospa3 class="comment"> 6 Thi616dam <6 <2o/a>o6spa3 class="comment"> *6 Dri62ight id<6 <3o/a>o6spa3 class="comment"> *6o/spa626<6 <4o/a>o6spa3 class="comment"> *6 Cop6right (C) 2005 Yoichi Yuasa &Minor devef= number9.c#L2" id<6 <5o/a>o6spa3 class="comment"> *6o/spa626<6 <6o/a>osspa3 class="comment"> * Thi6 program is free software; yoigc#L2" id<6 <7o/a>o6spa3 class="comment"> *6 it 6nder the terms of the GNU Generrrrr16 = GPIO IN 0igc#L2" id<6 <8o/a>o6spa3 class="comment"> *6 the6Free Software Founda v3; eitherrrr17 = GPIO IN 1igc#L2" id<6 <9o/a>o6spa3 class="comment"> *6 (at6your > v3) any later verson>.rrrr18 = GPIO IN 29.c#L7" id< >< > a7ospa3 class="comment"> 7o/spa726< >< 11o/a7ospa3 class="comment"> 7 Thi7 program is distributed in the 20 = GPIO IN 49.c#L7" id< <2o/a>o7spa3 class="comment"> *7 Dri7er for TANBAC TB0219 base board 21 = GPIO IN 59.c#L7" id< <3o/a>o7spa3 class="comment"> *7o/spa726< <4o/a>o7spa3 class="comment"> *7 Cop7right (C) 2005 Yoichi Yuasa &l 23 = GPIO IN 79.c#L7" id< <5o/a>o7spa3 class="comment"> *7o/spa726<7 <6o/a>o7spa3 class="comment"> *7 Thi7 program is free software; you 32 = GPIO OUT 0igc#L2" id<7 <7o/a>osspa3 class="comment"> * it 7nder the terms of the GNU Generrrrr33 = GPIO OUT 1igc#L2" id<7 <8o/a>o7spa3 class="comment"> *7 the7Free Software Founda v3; eitherrrr34 = GPIO OUT 29.c#L7" id< <9o/a>o7spa3 class="comment"> *7 (at7your > v3) any later verson>.rrrr35 = GPIO OUT 39.c#L7" id<8>< > a8ospa3 class="comment"> 8o/spa826<8>< 11o/a8ospa3 class="comment"> 8 Thi8 program is distributed in the 37 = GPIO OUT 59.c#L7" id<8 <2o/a>o8spa3 class="comment"> *8 Dri8er for TANBAC TB0219 base board 38 = GPIO OUT 69.c#L7" id<8 <3o/a>o8spa3 class="comment"> *8o/spa826<8 <4o/a>o8spa3 class="comment"> *8 Cop8right (C) 2005 Yoichi Yuasa 9.c#L7" id<8 <5o/a>o8spa3 class="comment"> *8o/spa826<8 <6o/a>o8spa3 class="comment"> *8 Thi8 program is free software; you 49 = DIP switch 29.c#L7" id<8 <7o/a>o8spa3 class="comment"> *8 it 8nder the terms of the GNU Generrrrr50 = DIP switch 39.c#L7" id<8 <8o/a>osspa3 class="comment"> * the8Free Software Founda v3; eitherrrr51 = DIP switch 49.c#L7" id<8 <9o/a>o8spa3 class="comment"> *8 (at8your > v3) any later verson>.rrrr52 = DIP switch 59.c#L7" id<9>< > a9ospa3 class="comment"> 9o/spa926<9>< 11o/a9ospa3 class="comment"> 9 Thi9 program is distributed in the 54 = DIP switch 79.c#L7" id<9 <2o/a>o9spa3 class="comment"> *9 Dri9er for TANBAC TB0219 base board 55 = DIP switch 89.c#L7" id<9 <3o/a>o9spa3 class="comment"> *9o/spa926<9 <4o/a>o9spa3 class="comment"> *9 Cop9right id<9 <5o/a>o9spa3 class="comment"> *9o/spa95ight"> >din="coight ne" >dget_led6<9 <6o/a>o9spa3 class="comment"> *9 Thi9 prog{ id<9 <7o/a>o9spa3 class="comment"> *9 it 97ight n" nam (ne" )>dam ddriver_LEDight)1 id<9 <8o/a>o9spa3 class="comment"> *9 the9Free } id<9 <9o/a>osspa3 class="comment"> * (at99ight id<10>< > a>oospa3 class="comment"> *oo/sp*ooight"> >din="coight ne" >dget_gpio_up" i_pin6pin6<10>< 11o/a>0ospa3 class="comment"> *01/sp*o1prog{ id<10 <2o/a>o10spa3 class="comment"> *102/sp*o2ight >dullt16_tight >d classight; id<10 <3o/a>o10spa3 class="comment"> *103/sp*o3ight id<10 <4o/a>o10spa3 class="comment"> *104/sp*o4ight >d classight = >dam ddriver_GPIO_INPUTight)1 id<10 <5o/a>o10spa3 class="comment"> *105/sp*o5ight if (>d classight & (126pin6<10 <6o/a>o10spa3 class="comment"> *106/sp*o6ight n" nam > v3) any lt16 ng">'1'9.c#L2"1 id<10 <7o/a>o10spa3 class="comment"> *107/sp*o7ight id<10 <8o/a>o10spa3 class="comment"> *108/sp*o8ight n" nam > v3) any lt16 ng">'0'9.c#L2"1 id<10 <9o/a>o10spa3 class="comment"> *109/sp*o9ree } id<1">< > a>>ospa3 class="comment"> **o/sp1326<1">< 11o/a>oospa3 class="comment"> * 1/sp*s prog"> >din="coight ne" >dget_gpio_out" i_pin6pin6<1" <2o/a>o11spa3 class="comment"> *11 Dr11er fo{ id<1" <3o/a>o11spa3 class="comment"> *11o/sp1126dullt16_tight >d classight; id<1" <4o/a>o11spa3 class="comment"> *11 Co11right id<1" <5o/a>o11spa3 class="comment"> *11o/sp115ight >d classight = >dam ddriver_GPIO_OUTPUTight)1 id<11 <6o/a>o11spa3 class="comment"> *11 Th116ight if (>d classight & (126pin6<11 <7o/a>o11spa3 class="comment"> *11 it117ight n" nam > v3) any lt16 ng">'1'9.c#L2"1 id<11 <8o/a>o11spa3 class="comment"> *11 th11Free id<11 <9o/a>o11spa3 class="comment"> *11 (a119ight n" nam > v3) any lt16 ng">'0'9.c#L2"1 id<1 >< > a12ospa3 class="comment"> 12o/sp1226<1 >< 11o/a12ospa3 class="comment"> 12 Th121ight id<12 <2o/a>o1sspa3 class="comment"> *1 Dr1226 >din="coight ne" >dget_dip_switch6pin6<1 <3o/a>o12spa3 class="comment"> *12o/sp1236<1 <4o/a>o12spa3 class="comment"> *12 Co124ight >dullt16_tight >d classight; id<1 <5o/a>o12spa3 class="comment"> *12o/sp1256<1 <6o/a>o12spa3 class="comment"> *12 Th126ight >d classight = >dam ddriver_DIP_SWITCHight)1 id<1 <7o/a>o12spa3 class="comment"> *12 it127ight if (>d classight & (126pin6<1 <8o/a>o12spa3 class="comment"> *12 th128ight n" nam > v3) any lt16 ng">'1'9.c#L2"1 id<1 <9o/a>o12spa3 class="comment"> *12 (a129ight id<13>< > a13ospa3 class="comment"> 13o/sp130ight n" nam > v3) any lt16 ng">'0'9.c#L2"1 id<13>< 11o/a13ospa3 class="comment"> 13 Th1316<13 <2o/a>o13spa3 class="comment"> *13 Dr132ight id<13 <3o/a>o1sspa3 class="comment"> *1oo/sp133ight"> >din="coight llt hdset_led6d/chaandight) id<13 <4o/a>o13spa3 class="comment"> *13 Co13right{ id<13 <5o/a>o13spa3 class="comment"> *13o/sp135ight >dam ddriver_LEDight, >d/chaandight)1 id<13 <6o/a>o13spa3 class="comment"> *13 Th1366<13 <7o/a>o13spa3 class="comment"> *13 it137ight n" nam 01 id<13 <8o/a>o13spa3 class="comment"> *13 th13Free } id<13 <9o/a>o13spa3 class="comment"> *13 (a139ight id<1 >< > a14ospa3 class="comment"> 14o/sp140ight"> >din="coight llt hdset_gpio_out" i_pin6pin6d/chaandight) id<14>< 11o/a14ospa3 class="comment"> 14 Th141prog{ id<14 <2o/a>o14spa3 class="comment"> *14 Dr142ight unsigna<4long >dflagsight; id<14 <3o/a>o14spa3 class="comment"> *14o/sp1426dullt16_tight >d clasight; id<14 <4o/a>o1sspa3 class="comment"> *1 Co14right id<14 <5o/a>o14spa3 class="comment"> *14o/sp145ight if (>d/chaandight != > v3) any lt16 ng">'0'9.c#L2" && >d/chaandight != > v3) any lt16 ng">'1'9.c#L2") id<14 <6o/a>o14spa3 class="comment"> *14 Th146ight n" nam ->dEINVALight; id<14 <7o/a>o14spa3 class="comment"> *14 it147ight id<14 <8o/a>o14spa3 class="comment"> *14 th1486dspin_lock_irqsavs6dam dflagsight)1 id<14 <9o/a>o14spa3 class="comment"> *14 (a149ight >d clasight = >dam ddriver_GPIO_OUTPUTight)1 id<1 >< > a15ospa3 class="comment"> 15o/sp150ight if (>d/chaandight == > v3) any lt16 ng">'0'9.c#L2") id<1 >< 11o/a15ospa3 class="comment"> 15 Th1516d clasight &= ~(126pin6<1 <2o/a>o15spa3 class="comment"> *15 Dr152ight else id<1 <3o/a>o15spa3 class="comment"> *15o/sp1536d clasight |= 126pin6<1 <4o/a>o15spa3 class="comment"> *15 Co154ight >dam ddriver_GPIO_OUTPUTight, >d clasight)1 id<1 <5o/a>o1sspa3 class="comment"> *1oo/sp155ight >dspin_unlock_irqocotors6dam dflagsight)1 id<1 <6o/a>o15spa3 class="comment"> *15 Th1566<1 <7o/a>o15spa3 class="comment"> *15 it157ight n" nam 01 id<15 <8o/a>o15spa3 class="comment"> *15 th15Free id<15 <9o/a>o15spa3 class="comment"> *15 (a159ree } id<1 >< > a16ospa3 class="comment"> 16o/sp1626<1 >< 11o/a16ospa3 class="comment"> 16 Th16 prog"> >dssizj_tight >daanbac_am fo59ight *>dfo59ight, ne" >d__useright *>dbufight, >dsizj_tight >dlenight, id<1 <2o/a>o16spa3 class="comment"> *16 Dr1626dloff_tight *>dpposight) id<16 <3o/a>o16spa3 class="comment"> *16o/sp1636<16 <4o/a>o16spa3 class="comment"> *16 Co164ight unsigna<4llt hdminor6<16 <5o/a>o16spa3 class="comment"> *16o/sp165ight ne" >d clasight; id<16 <6o/a>o1sspa3 class="comment"> *1 Th1666<16 <7o/a>o16spa3 class="comment"> *16 it167ight >dminor6diminor6dfo59ight-b0219d<_pathight.9ddentryight-b0219dd_inod9ight)1 id<16 <8o/a>o16spa3 class="comment"> *16 th1686dminor6<16 <9o/a>o16spa3 class="comment"> *16 (a169ight cchar0: id<1: idso/div26 oditf"> clasight = >dget_led6<16 <8o/a>o16spa3 class="comme1nt"> 7 Thi7 program is 1distr17 >d<16 <8o/a>o16spa3 class="comment"> *7 Dri7er for TANBA1C TB0172 id<1: id *7o/spa726 clasight |= 126g26 oditf">get_gpio_up" i_pin6minor6d<16 <8o/a>o16spa3 class="comment"> *7 Cop7right (C) 20105 Y174 >d<16 <8o/a>o16spa3 class="comment"> *7o/spa726<1: id *7 Thi7 program is 1free 17 n" nam ->d clasight |= 126g26 odditf">get_gpio_out" i_pin6minor6d<16 <8o/a>o16spa3 clas="comment""> *1 it 1nder the terms>d v3) any boL2kne" nam <16 <8o/a>o16spa3 class="comment"> *7 the7Free Softwar1e Fou178 id<1: id *7 (at7your > v3)1 any 179 n" nam ->d clasight |= 126gditf">get_dip_switch6minor6d<16 <8o/a>o16spa3 class="comme1nt"> 8o/spa826<16 <8o/a>o16spa3 class="comme1nt"> 8 Thi8 program is 1distr18 >d<1: id *8 Dri8er for TANBA1C TB018 >ode=EINVALo/div26 oditf"BADFALight; id<16 <6o/a>o1sspa3 clas="commen1t"> *8o/spa826<1 >< > a16ospa3 cls="commen1t"> *8 Cop8right (C) 20105 Y18="line" nam <14 <5o/a>o14spa3 clas="commen1t"> *8o/spa826<16 <3o/a>o16spa3 clas="commen1t"> *8 Thi8 program is 1free 18 n" nam ->d<16 <6o/a>o1sspa3 clas="commentt"> *8 it 8nder the ter1ms of18="line" nam <14 <8o/a>o14spa3 clas="commen1t"> * the8Free Softwar1e Fou188oL2" c+code=/chaando/div26 odit<4ll__useright *>d clasight |= 126d<1 <8o/a>o12spa3 clas="commen1t"> *8 (at8your > v3)1 any 189 n" nam ->d<16 <6o/a>o1sspa3 class="comme1nt"> 9o/spa926<1 >< 11o/a16ospa3 clss="comme1nt"> 9 Thi9 program is 1distr19 >d<16 <6o/a>o1sspa3 clas="commen1t"> *9 Dri9er for TANBA1C TB0119 basne" nam <1 >< > a16ospa3 cls="commen1t"> *9o/spa926<10 <4o/a>o10spa3 clas="commen1t"> *9 Cop9right idssizj_tight >d>am d>am < c+code=fo59ight *>dfo59ight, ne" >d__useright *>dbdataod9ight)1 id<1 <2o/a>o16spa3 clas="commen1t"> *9o/spa95ight"> 1>ddsizj_tight >dlenight, idloff_tight *>dpposight) id<16 <3o/a>o16spa3 clas="commen1t"> *9 Thi9 prog{ id<9 <7o/a>o9spa3 clas1s="commen1t"> *9 it 97ight 1 n" n1m (ne" )>dminor6<16 <5o/a>o16spa3 clas="commen1t"> *9 the9Free } id">am <16 <5o/a>o16spa3 clas="comment""> *1 (at1your > v3) aany 19" c+code= claso/div26 oditf"">sizj_tight >dlior6d<16 <5o/a>o16spa3 cl2ass="comm2nt"> *oo/sp*ooight">2>dd<15 <8o/a>o15spa3 cl2ass="comm2nt"> *01/sp*o1prog{ idd v="line" nam <16 <5o/a>o16spa3 cl2a="commentt"> *102/sp*o2ight 2 >d<13 <3o/a>o1sspa3 cl2ss="comme2t"> *103/sp*o3ight idminor6diminor6dfo59ight-b0219d<_pathight.9ddentryight-b0219dd_inod9ight)1 id<16 <8o/a>o16spa3 cl2ss="comme2t"> *104/sp*o4ight 2 >dminor6<16 <9o/a>o16spa3 cl2ss="comme2t"> *105/sp*o5ight 2 if (205 id<1: id *106/sp*o6ight 2 2 n" nam > v3) any _lock_irqsavso/oclaoL_dYPE_LEDight, id<16 <8o/a>o16spa3 cl2s="commentt"> *107/sp*o7ight id v3) any boL2kne" nam <16 <8o/a>o16spa3 cl2ss="comme2t"> *108/sp*o8ight 2 n" n208 id<1: id *109/sp*o9ree } idddoditf">dYPE_GPIO_OUTPUTight, id< >< 11o/a2ospa3 classss="comm2nt"> **o/sp1326boL2kne" nam <16 <8o/a>o16spa3 cl2ass="comm2nt"> * 1/sp*s prog">2>dd<1: id *11 Dr11er fo{ idode=EINVALo/div26 oditf"BADFALight; id<16 <6o/a>o1sspa3 cl2ss="comme2t"> *11o/sp1126dd<1 >< > a16ospa3 c2ss="comme2t"> *11 Co11right id<1" <5o/a>o11spa3 cl2ss="comme2t"> *11o/sp115ight 2 >ddlior6dpenight, idlior6d<16 <9o/a>o16spa3 cl2ss="comme2t"> *11 Th116ight 2 if (21 n" nam > v3) any /chaando/div26 oditunsi__useright *>dfandight == > v="linf_to/div26 oditfdataod9ight)1 idlior6d<1 <8o/a>o12spa3 cl2ss="comme2t"> *11 it117ight 2 2 n" nam > v3) any >ode=EINVALo/div26 oditf"FAULver_GPIO_OUTPUTi"FAULv="line" nam <16 <6o/a>o1sspa3 cl2ss="comme2t"> *11 th11Free id<11 <9o/a>o11spa3 cl2ss="comme2t"> *11 (a119ight 2 n" n219 n" nam ->d<16 <9o/a>o16spa3 cl2ass="comm2nt"> 12o/sp1226ss="loro/div26 oditftf">dYPE_LEDight, id<1: id 12 Th121ight idddset_led6dfandight == > v="liine" nam <16 <8o/a>o16spa3 cl2ss="comme2t"> *1 Dr12262>dd<16 <8o/a>o16spa3 cl2ss="comme2t"> *12o/sp1236ddoditf">dYPE_GPIO_OUTPUTight, id<1: id *12 Co124ight 2 >dddsv26 oditf">set_gpio_out" i_pin6minor6d v="liine" nam <16 <8o/a>o16spa3 cl2ss="comme2t"> *12o/sp1256d<16 <8o/a>o16spa3 cl2ss="comme2t"> *12 Th126ight 2 >d v3) any ne" nam <1 >< > a16ospa3 c2s="commentt"> *2 it 276<14 <8o/a>o14spa3 cl2s="commentt"> *2 the286 v3) any /chaando/div26 oditode6d<16 <3o/a>o16spa3 cl2s="commentt"> *2 (at29ight idd<16 <8o/a>o16spa3 cl2ass="comm2nt"> 13o/sp130ight 2 n" n2m > v3) any ne" nam <1 >< > a16ospa3 c2ass="comm2nt"> 13 Th1316<12 <2o/a>o1sspa3 cl2ss="comme2t"> *13 Dr132ight idlior6d<16 <5o/a>o16spa3 cl2ss="comme2t"> *1oo/sp133ight">2>d<1 >< > a16ospa3 c2as="comme2t"> *13 Co13right{ id<1" <5o/a>o11spa3 cl2ss="comme2t"> *13o/sp135ight 2 >dopnight, idopni c+code=>d_inod9ight)1 id
    >d_inod9ight)1 id
      fo59ight *>dfo59ight, ne" >d<16 <3o/a>o16spa3 cl2ss="comme2t"> *13 Th1366<9 <7o/a>o9spa3 clas2ss="comme2t"> *13 it137ight 2 n" n23 (ne" )>dminor6<16 <5o/a>o16spa3 cl2ss="comme2t"> *13 th13Free } id<11 <9o/a>o11spa3 cl2ss="comme2t"> *13 (a139ight idminor6diminor6d>d_inod9ight)1 id
        <16 <8o/a>o16spa3 cl2ass="comm2nt"> 14o/sp140ight">2>d v3) any ode=minoro/div26 oditf">minor6<16 <9o/a>o16spa3 cl2ass="comm2nt"> 14 Th141prog{ idd<1: id *14 Dr142ight 2 unsi242 id<1: id *14o/sp1426d<1: id *1 Co14right id<1: id *14o/sp145ight 2 if (245 n" nam ->dlnonseekable>opnight, idopni=>d_inod9ight)1 id
          o59ight, ne" >d<16 <8o/a>o16spa3 cl2as="comme2t"> *14 Th146ight 2 2 n" nam ->d<1: id *14 it147ight id v3) any boL2kne" nam <16 <8o/a>o16spa3 cl2ss="comme2t"> *14 th1486d<1 >< > a16ospa3 c2ss="comme2t"> *14 (a149ight 2 >d<1 >< > a14ospa3 c2ass="comm2nt"> 15o/sp150ight 2 if (25 > v3) any lt16 ngVALo/div26 oditf"BADFALight; id<16 <6o/a>o1sspa3 cl2ass="comm2nt"> 15 Th1516<13 <2o/a>o13spa3 cl2ss="comme2t"> *15 Dr152ight 2 else25="line" nam <13 <3o/a>o1sspa3 cl2ss="comme2t"> *15o/sp1536relem div26 oditf">relem < c+code=>d_inod9ight)1 id
            >d_inod9ight)1 id
              fo59ight *>dfo59ight, ne" >d<16 <3o/a>o16spa3 cl2ss="comme2t"> *15 Co154ight 2 >d<13 <5o/a>o13spa3 cl2ss="comme2t"> *1oo/sp155ight 2 >d<15 <8o/a>o15spa3 cl2ss="comme2t"> *15 Th1566<13 <2o/a>o13spa3 cl2ss="comme2t"> *15 it157ight 2 n" n2s="line" nam <5 <8o/a>o5spa3 clas2ss="comme2t"> *15 th15Free idfo59>opnr=inonsight, ne" >dopnr=inons="lin_lock_irqsavso/oditf">fopsight, ne" >dfopsde=iminne" nam <13 <5o/a>o13spa3 cl2ss="comme2t"> *15 (a159ree } idd v3inoro/div26 oditftHIS_MODULE_GPIO_OUTPUTightHIS_MODULEs="l,e" nam <13 <5o/a>o13spa3 cl2ass="comm2nt"> 16o/sp1626 v3inoro/div26 oditf/div26 oditf">aanbac_am <13 <5o/a>o13spa3 cl2ass="comm2nt"> 16 Th16 prog">2>dam d>am < c+cnam > v3inoro/div26 oditf/div26 oditf">>am d>am < c+c,e" nam <13 <5o/a>o13spa3 cl2as="comme2t"> *16 Dr1626 v3inoro/div26 oditf/div26 oditf">opnight, idopni c+c,e" nam <13 <5o/a>o13spa3 cl2as="comme2t"> *16o/sp1636 v3inoro/div26 oditf/div26 oditf">aalem div26 oditf">relem < c+c,e" nam <13 <5o/a>o13spa3 cl2as="comme2t"> *16 Co164ight 2 unsi2na<4llt hd inoro/div26 oditfno_llseekght, id<13 <5o/a>o13spa3 cl2as="comme2t"> *16o/sp165ight 2 ne" 2>d<15 <8o/a>o15spa3 cl2ss="comme2t"> *1 Th1666<16 <7o/a>o16spa3 cl2ss="comme2t"> *16 it167ight 2 >damde=rf">/chaandight) id<14>< 11o/a14ospa3 c2ss="comme2t"> *16 th1686d<13 <5o/a>o13spa3 cl2ss="comme2t"> *16 (a169ight 2 ccha26" c+code= claso/div26 oditf"oditf">>am d>am < c+cooro/div26 oditftBitf">>driver_RESETight , 0nne" nam <16 <8o/a>o16spa3 cl2)vr41xx/a2 <1 >< 11o/a12ospa3 c2ss="comme2nt"> 7 Thi7 program is 2distr27="line" nam <12 <2o/a>o1sspa3 cl2ss="comme2t"> *7 Dri7er for TANBA2C TB0272 c+cde=in="="lipcip;>d_inid_ini< c+co="line" nam <9 <6o/a>o9spa3 clas2)s="comme2t"> *7o/spa726<16 <4o/a>o16spa3 cl2ss="comme2t"> *7 Cop7right (C) 20205 Y274 >d<9 <4o/a>o9spa3 clas2ss="comme2t"> *7o/spa726d_trigguseright *>dd_triggus c+cooro/div26 oditftBitf">Sight PINer_RESETight Sight PINs="lagso/div26 oditf"0x14TRIGGER_LEVEVALight; id<16 <8o/a>o16spa3 cl2)s="comme2t"> *7 Thi7 program is 2free 27" c+code= classo/div26 oditf"r41xx_6d_leveaor6dd_levea c+cooro/div26 oditftBitf">Sight PINer_RESETight Sight PINs="lagso/div26 oditf"0x14LEVEV_LOWer_DIP_SWITCHig0x14LEVEV_LOWc+conne" nam <16 <8o/a>o16spa3 cl2)s="comme2""> *1 it 1nder the ter2s>d<5 <8o/a>o5spa3 clas2ss="comme2t"> *7 the7Free Softwar2e Fou278 id<9 <4o/a>o9spa3 clas2ss="comme2t"> *7 (at7your > v3)2 any 27" c+code= claso/div26 oditf">r41xx_6d_trigguseright *>dd_triggus c+cooro/div26 oditftBitf">Sight 2 PINer_RESETight Sight 2 PINs="lagso/div26 oditf"0x14TRIGGER_LEVEVALight; id<16 <8o/a>o16spa3 cl2ss="comme2nt"> 8o/spa826d_leveaor6dd_levea c+cooro/div26 oditftBitf">Sight 2 PINer_RESETight Sight 2 PINs="lagso/div26 oditf"0x14LEVEV_LOWer_DIP_SWITCHig0x14LEVEV_LOWc+conne" nam <16 <8o/a>o16spa3 cl2ss="comme2nt"> 8 Thi8 program is 2distr28="line" nam <12 <2o/a>o1sspa3 cl2s="commen2t"> *8 Dri8er for TANBA2C TB028 tb0219.c#L2" id<9 <4o/a>o9spa3 clas2s="commen2t"> *8o/spa826r41xx_6d_trigguseright *>dd_triggus c+cooro/div26 oditftBitf">Sight 3 PINer_RESETight Sight 3 PINs="lagso/div26 oditf"0x14TRIGGER_LEVEVALight; id<16 <8o/a>o16spa3 cl2ss="comme2t"> *8 Cop8right (C) 20205 Y28" c+code= classo/div26 oditf"r41xx_6d_leveaor6dd_levea c+cooro/div26 oditftBitf">Sight 3 PINer_RESETight Sight 3 PINs="lagso/div26 oditf"0x14LEVEV_LOWer_DIP_SWITCHig0x14LEVEV_LOWc+conne" nam <16 <8o/a>o16spa3 cl2ss="comme2t"> *8o/spa826<1 >< 11o/a12ospa3 c2s="commen2t"> *8 Thi8 program is 2free 28="line" nam <16 <7o/a>o16spa3 cl2s="commen2t"> *8 it 8nder the ter2ms of28" c+cde=in="/inoro/div26 oditf"__deviniprobdprob< c+code=platform_devicdplatform_devicdevoL_wri"d6ddev="line" nam <14>< 11o/a14ospa3 c2s="commen2t"> * the8Free Softwar2e Fou28 (>d<13 <5o/a>o13spa3 cl2s="commen2t"> *8 (at8your > v3)2 any 289 n" nam ->dd<16 <8o/a>o16spa3 cl2ss="comme2nt"> 9o/spa926<1 >< 11o/a16ospa3 c2ss="comme2nt"> 9 Thi9 program is 2distr29 >dSTARver_RESETight STARvs="lagso/div26 oditf" SIZE_GPIO_OUTPUTight SIZEs="lags>'0'9.c#L2") quot;t quot;ass="lin6 ng"o/div26 oditf"NULVALight; id<14>< 11o/a14ospa3 c2s="commen2t"> *9 Dri9er for TANBA2C TB029 >ode=EINVALo/div26 oditf"BUSYALight; id<16 <8o/a>o16spa3 cl2s="commen2t"> *9o/spa926<10 <4o/a>o10spa3 cl2s="commen2t"> *9 Cop9right idoditf"bm STARver_RESETight STARvs="lagso/div26 oditf" SIZE_GPIO_OUTPUTight SIZEs="lnne" nam <16 <8o/a>o16spa3 cl2s="commen2t"> *9o/spa95ight"> 2>ddoditf"bm <13 <5o/a>o13spa3 cl2s="commen2t"> *9 Thi9 prog{ id v3) any _lock_irqsavso/relem <_mem_regioight, idSTARver_RESETight STARvs="lagso/div26 oditf" SIZE_GPIO_OUTPUTight SIZEs="lnne" nam <16 <8o/a>o16spa3 cl2s="commen2t"> *9 it 97ight 2 n" n29 n" nam > v3) any lt16 ngVALo/div26 oditf"NOMEMALight; id<16 <8o/a>o16spa3 cl2s="commen2t"> *9 the9Free } id<1 >< > a16ospa3 c2s="commen2""> *1 (at1your > v3)2aany 2s="line" nam <10>< > a>oospa3 c3ass="comm3nt"> *oo/sp*ooight">3>dddregister_chrdev c+cooro/div26 oditfmajnor6fopsight, ne" >dfopsde=inne" nam <16 <8o/a>o16spa3 cl3ass="comm3nt"> *01/sp*o1prog{ iddd<13 <5o/a>o13spa3 cl3a="commen3t"> *102/sp*o2ight 3 >doro/div26 oditf"ounmapod9ight)1 id
                oditf"bm <16 <8o/a>o16spa3 cl3a3"commen3t"> *9o/spa926doditf"bm <16 <8o/a>o16spa3 cl3a4"commen3t"> *9 Cop9right idddSTARver_RESETight STARvs="lagso/div26 oditf" SIZE_GPIO_OUTPUTight SIZEs="lnne" nam <16 <8o/a>o16spa3 cl3ss="comme3t"> *105/sp*o5ight 3 if (305 n" nam ->dlode6d<16 <8o/a>o16spa3 cl3ss="comme3t"> *106/sp*o6ight 3 3 n" nam > ne" nam <1 >< > a16ospa3 c3s="commen3t"> *107/sp*o7ight id<10 <8o/a>o10spa3 cl3ss="comme3t"> *108/sp*o8ight 3 n" n30" c+code=spin_lock_irqsavso/old_macho8i>amde=ramde=ramde=ramde=r<16 <8o/a>o16spa3 cl3s9="comme3t"> *1 (at1your > v3)32" cl30" c+code= claso/div26 oditf"_macho8i>amde=ramde=ramde=r<16 <8o/a>o16spa3 cl3sss="comm3nt"> **o/sp1326<1">< 11o/a>oospa3 c3ass="comm3nt"> * 1/sp*s prog">3>ddpcip;>d_inid_ini< c+conne" nam <16 <8o/a>o16spa3 cl3ss="comme3t"> *11 Dr11er fo{ id<13 <3o/a>o1sspa3 cl3ss="comme3t"> *11o/sp1126dd<13 <5o/a>o13spa3 cl3ss="comme3t"> *11 Co11right iddlode6d<16 <8o/a>o16spa3 cl3ss="comme3t"> *11o/sp115ight 3 >ddpc#Ltkght, id<16 <8o/a>o16spa3 cl3ss="comme3t"> *11 Th116ight 3 if (31 n" nam > ne" nam <1 >< > a16ospa3 c3ss="comme3t"> *11 it117ight 3 31="line" nam <10 <8o/a>o10spa3 cl3ss="comme3t"> *11 th11Free id<15 <8o/a>o15spa3 cl3ss="comme3t"> *11 (a119ight 3 n" n31s="line" nam <1 >< > a16ospa3 c3ass="comm3nt"> 12o/sp1226<1">< 11o/a>oospa3 c3ass="comm3nt"> 12 Th121ight idremoin_lock_irqsavs6remoin c+code=platform_devicdplatform_devicdevoL_wri"d6ddev="line" nam <14>< 11o/a14ospa3 c3ss="comme3t"> *1 Dr12263>d<13 <5o/a>o13spa3 cl3ss="comme3t"> *12o/sp1236amde=ramde=ramde=ramde=r<15 <8o/a>o15spa3 cl3as="comme3t"> *12 Co124ight 3 >d<1" <5o/a>o11spa3 cl3ss="comme3t"> *12o/sp1256oditf"bm <16 <8o/a>o16spa3 cl3ss="comme3t"> *12 Th126ight 3 >doditf"bm <16 <8o/a>o16spa3 cl3s="commen3t"> *2 it 276<14 <8o/a>o14spa3 cl3s="commen3t"> *2 the286STARver_RESETight STARvs="lagso/div26 oditf" SIZE_GPIO_OUTPUTight SIZEs="lnne" nam <16 <8o/a>o16spa3 cl3s="commen3t"> *2 (at29ight id<13>< > a13ospa3 c3ass="comm3nt"> 13o/sp130ight 3 n" n3m > v3) any lt16 ngine" nam <15 <8o/a>o15spa3 cl3ass="comm3nt"> 13 Th1316<13 <2o/a>o13spa3 cl3ss="comme3t"> *13 Dr132ight id<13 <3o/a>o1sspa3 cl3ss="comme3t"> *1oo/sp133ight">3>dplatform_devicdplatform_deviciddid<16 <8o/a>o16spa3 cl3as="comme3t"> *13 Co13right{ id<1" <5o/a>o11spa3 cl3ss="comme3t"> *13o/sp135ight 3 >dplatform_d"><1"oL_wri"d6dplatform_d"><1"="lin_lock_irqsavso/oditf">devic<_d"><1"oL_wri"d6doditf">devic<_d"><1"de=iminne" nam <13 <5o/a>o13spa3 cl3ss="comme3t"> *13 Th1366dprob< c+cdprobdprob< c+c,e" nam <13 <5o/a>o13spa3 cl3ss="comme3t"> *13 it137ight 3 n" n33 (ne" )>dremoin c+c),e" nam <13 <5o/a>o13spa3 cl3s="commen3t"> *13 th13Free } idd<1"oL_wri"d6dd"><1"de=imoL2" c+c <13 <5o/a>o13spa3 cl3s="commen3t"> *13 (a139ight idddt id n" namng">'0'9.c#L2") quot;t quot;ass="li,e" nam <13 <5o/a>o13spa3 cl3ass="comm3nt"> 14o/sp140ight">3>dtryo/div26 oditfownuseright *>d<13 <5o/a>o13spa3 cl3ass="comm3nt"> 14 Th141prog{ idd<13 <5o/a>o13spa3 cl3as="comme3t"> *14 Dr142ight 3 unsi342 id<}ne" nam <15 <8o/a>o15spa3 cl3ss="comme3t"> *14o/sp1426d<10 <4o/a>o10spa3 cl3ss="comme3t"> *1 Co14right idiniini< c+co="line" nam <9 <6o/a>o9spa3 clas3ss="comme3t"> *14o/sp145ight 3 if (345 n" ne" nam <13 <5o/a>o13spa3 cl3as="comme3t"> *14 Th146ight 3 3 n" nam ->dd<16 <8o/a>o16spa3 cl3ss="comme3t"> *14 it147ight id<14 <8o/a>o14spa3 cl3ss="comme3t"> *14 th1486ddid platform_devic<_allof c+coo>'0'9.c#L2") quot;t quot;ass="li, -1nne" nam <16 <8o/a>o16spa3 cl3ss="comme3t"> *14 (a149ight 3 >ddid<9 <6o/a>o9spa3 clas3ass="comm3nt"> 15o/sp150ight 3 if (35 >lt16 ngVALo/div26 oditf"NOMEMALight; id<16 <8o/a>o16spa3 cl3ass="comm3nt"> 15 Th1516<12 <2o/a>o1sspa3 cl3ss="comme3t"> *15 Dr152ight 3 else3idddid<16 <8o/a>o16spa3 cl3as="comme3t"> *15o/sp1536dd<13 <5o/a>o13spa3 cl3ss="comme3t"> *15 Co154ight 3 >dddid<16 <8o/a>o16spa3 cl3as="comme3t"> *1oo/sp155ight 3 >ddlode6d<16 <8o/a>o16spa3 cl3ss="comme3t"> *15 Th1566 ne" nam <1 >< > a16ospa3 c3ss="comme3t"> *15 it157ight 3 n" n3s="line" nam <5 <8o/a>o5spa3 clas3ss="comme3t"> *15 th15Free idd<5 _registeroL_wri"d6dplatform_d"><1"_register c+co=am devic<_d"><1"oL_wri"d6doditf">devic<_d"><1"de=inne" nam <16 <8o/a>o16spa3 cl3as="comme3t"> *15 (a159ree } idd<16 <8o/a>o16spa3 cl3ass="comm3nt"> 16o/sp1626so/div26 oditf"platform_devic<_unregisteroL_wri"d6dplatform_devic<_unregister c+cooro/div26 oditf oditf"platform_devicdid<16 <8o/a>o16spa3 cl3ass="comm3nt"> 16 Th16 prog">3>d<12 <2o/a>o1sspa3 cl3as="comme3t"> *16 Dr1626lode6d<16 <8o/a>o16spa3 cl3as="comme3t"> *16o/sp1636<1 >< > a16ospa3 c3as="comme3t"> *16 Co164ight 3 unsi36="line" nam <1" <5o/a>o11spa3 cl3as="comme3t"> *16o/sp165ight 3 ne" 36 c+code=in="="liexiexi< c+co="line" nam <9 <6o/a>o9spa3 clas3ss="comme3t"> *1 Th1666<9 <7o/a>o9spa3 clas3ss="comme3t"> *16 it167ight 3 >d<1"_unregisteroL_wri"d6dplatform_d"><1"_unregister c+co=am devic<_d"><1"oL_wri"d6doditf">devic<_d"><1"de=inne" nam <16 <8o/a>o16spa3 cl3ss="comme3t"> *16 th1686dplatform_devic<_unregister c+cooro/div26 oditf oditf"platform_devicdid<16 <8o/a>o16spa3 cl3as="comme3t"> *16 (a169ight 3 ccha36s="line" nam <1 >< > a16ospa3 c3)vr41xx/a3 <1">< 11o/a>oospa3 c3ss="comme3nt"> 7 Thi7 program is 3distr37="lin_lock_irqsavso/module>iniini< c+cooro/div26 oditf div26 oditf">iniini< c+cnne" nam <16 <8o/a>o16spa3 cl3ss="comme3t"> *7 Dri7er for TANBA3C TB0372 c+c_lock_irqsavso/module>exiexi< c+cooro/div26 oditf div26 oditf">exiexi< c+cnne" nam <16 <8o/a>o16spa3 cl3ss="comme3t"> *7o/spa726
The original LXR software by th"loro/div26http://sourceforge.net/projects/lxro>LXR idlxr@726ux.nos="l.
lxr.726ux.no kindly hosted by oro/div26http://www.redpill-726pro.no">Redpill L26pro ASs="lagprovider of L26ux"=onsulting and opnr=inons servic