linux/drivers/mfd/88pm860x-i2c.c
<<
2o v12./spa 12./form 12.a 2o v12 href="../linux+v3.12.1/drivers/mfd/88pm860x-i2c.c">2o v12.img src="../.static/gfx/right.png" alt=">>">2o./spa 2o.spa class="lxr_search">2o v ="+search" method="post" onsubmit="return do_search(this);">2o v12.input typn> hidden" namn> navtarget" otion> ">2o v12.input typn> text" namn> search" id> search">2o v12.butti2itypn> submit">Search2o v12Prefs 12./a>2o./spa v12 2./div v12 2.form ac > ="ajax+*" method="post" onsubmit="return false;">2o.input typn> hidden" namn> ajax_lookup" id> ajax_lookup" otion> ">2 v12 2./form 2 v12 2.div class="headingbottim">
search_results" class="search_results" 1 v12 2./div .div id> content"> .div id> file_contents"
cb/70/620763eae6fd1d3d8dacd9f3372df749dc7e_3/0" 
L1" class="line" namn>
L1">2 21./a>.spa
 class="comment">/*./spa
  
L2" class="line" namn>
L2">2 22./a>.spa
 class="comment"> * I2C driver for Marvell 88PM860x./spa
  
L3" class="line" namn>
L3">2 23./a>.spa
 class="comment"> *./spa
  
L4" class="line" namn>
L4">2 24./a>.spa
 class="comment"> * Copyright (C) 2009 Marvell Interna  >
al Ltd../spa
  
L5" class="line" namn>
L5">2 25./a>.spa
 class="comment"> *      Haojia
 Zhuang <haojia
.zhuang@marvell.com>./spa
  
L6" class="line" namn>
L6">2 26./a>.spa
 class="comment"> *./spa
  
L7" class="line" namn>
L7">2 27./a>.spa
 class="comment"> * This program is free software; you ca
 redistribute it and/or modify./spa
  
L8" class="line" namn>
L8">2 28./a>.spa
 class="comment"> * it under the terms of the GNU General Public License versti2i2 as./spa
  
L9" class="line" namn>
L9">2 29./a>.spa
 class="comment"> * published by the Free Software Founda  >
../spa
  
L10" class="line" namn>
L10">2 	  >a>.spa
 class="comment"> */./spa
  
L11" class="line" namn>
L11">2 11./a>#include <linux/kernel.h./a>> 
L12" class="line" namn>
L12">2 12./a>#include <linux/module.h./a>> 
L13" class="line" namn>
L13">2 13./a>#include <linux/i2c.h./a>> 
L14" class="line" namn>
L14">2 14./a>#include <linux/regmap.h./a>> 
L15" class="line" namn>
L15">2 15./a>#include <linux/mfd/88pm860x.h./a>> 
L16" class="line" namn>
L16">2 16./a> 
L17" class="line" namn>
L17">2 17./a>int2.a href="+code=pm860x_reg_read" class="sref">pm860x_reg_read./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>) 
L18" class="line" namn>
L18">2 18./a>{ 
L19" class="line" namn>
L19">2 19./a>        struct2.a href="+code=pm860x_chip" class="sref">pm860x_chip./a> *.a href="+code=chip" class="sref">chip./a> =2.a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a./a>(.a href="+code=i2c" class="sref">i2c./a>); 
L20" class="line" namn>
L20">2 20./a>        struct2.a href="+code=regmap" class="sref">regmap./a> *.a href="+code=map" class="sref">map./a> = (.a href="+code=i2c" class="sref">i2c./a> ==2.a href="+code=chip" class="sref">chip./a>->.a href="+code=client" class="sref">client./a>) ?2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap" class="sref">regmap./a> 
L21" class="line" namn>
L21">2 21./a>                                :2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap_compa
 >
" class="sref">regmap_compa
 >
./a>; 
L22" class="line" namn>
L22">2 22./a>        unsigned int2.a href="+code=da a" class="sref">da a./a>; 
L23" class="line" namn>
L23">2 23./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L24" class="line" namn>
L24">2 24./a> 
L25" class="line" namn>
L25">2 25./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=regmap_read" class="sref">regmap_read./a>(.a href="+code=map" class="sref">map./a>,2.a href="+code=reg" class="sref">reg./a>, &.a href="+code=da a" class="sref">da a./a>); 
L26" class="line" namn>
L26">2 26./a>        if (.a href="+code=ret" class="sref">ret./a> < 0) 
L27" class="line" namn>
L27">2 27./a>                return .a href="+code=ret" class="sref">ret./a>; 
L28" class="line" namn>
L28">2 28./a>        else 
L29" class="line" namn>
L29">2 29./a>                return (int).a href="+code=da a" class="sref">da a./a>; 
L30" class="line" namn>
L30">2 30./a>} 
L31" class="line" namn>
L31">2 31./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_reg_read" class="sref">pm860x_reg_read./a>); 
L32" class="line" namn>
L32">2 32./a> 
L33" class="line" namn>
L33">2 33./a>int2.a href="+code=pm860x_reg_write" class="sref">pm860x_reg_write./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L34" class="line" namn>
L34">2 34./a>                     unsigned char2.a href="+code=da a" class="sref">da a./a>) 
L35" class="line" namn>
L35">2 35./a>{ 
L36" class="line" namn>
L36">2 36./a>        struct2.a href="+code=pm860x_chip" class="sref">pm860x_chip./a> *.a href="+code=chip" class="sref">chip./a> =2.a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a./a>(.a href="+code=i2c" class="sref">i2c./a>); 
L37" class="line" namn>
L37">2 37./a>        struct2.a href="+code=regmap" class="sref">regmap./a> *.a href="+code=map" class="sref">map./a> = (.a href="+code=i2c" class="sref">i2c./a> ==2.a href="+code=chip" class="sref">chip./a>->.a href="+code=client" class="sref">client./a>) ?2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap" class="sref">regmap./a> 
L38" class="line" namn>
L38">2 38./a>                                :2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap_compa
 >
" class="sref">regmap_compa
 >
./a>; 
L39" class="line" namn>
L39">2 39./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L40" class="line" namn>
L40">2 40./a> 
L41" class="line" namn>
L41">2 41./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=regmap_write" class="sref">regmap_write./a>(.a href="+code=map" class="sref">map./a>,2.a href="+code=reg" class="sref">reg./a>, .a href="+code=da a" class="sref">da a./a>); 
L42" class="line" namn>
L42">2 42./a>        return .a href="+code=ret" class="sref">ret./a>; 
L43" class="line" namn>
L43">2 43./a>} 
L44" class="line" namn>
L44">2 44./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_reg_write" class="sref">pm860x_reg_write./a>); 
L45" class="line" namn>
L45">2 45./a> 
L46" class="line" namn>
L46">2 46./a>int2.a href="+code=pm860x_bulk_read" class="sref">pm860x_bulk_read./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L47" class="line" namn>
L47">2 47./a>                     int2.a href="+code=count" class="sref">count./a>, unsigned char2*.a href="+code=buf" class="sref">buf./a>) 
L48" class="line" namn>
L48">2 48./a>{ 
L49" class="line" namn>
L49">2 49./a>        struct2.a href="+code=pm860x_chip" class="sref">pm860x_chip./a> *.a href="+code=chip" class="sref">chip./a> =2.a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a./a>(.a href="+code=i2c" class="sref">i2c./a>); 
L50" class="line" namn>
L50">2 50./a>        struct2.a href="+code=regmap" class="sref">regmap./a> *.a href="+code=map" class="sref">map./a> = (.a href="+code=i2c" class="sref">i2c./a> ==2.a href="+code=chip" class="sref">chip./a>->.a href="+code=client" class="sref">client./a>) ?2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap" class="sref">regmap./a> 
L51" class="line" namn>
L51">2 51./a>                                :2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap_compa
 >
" class="sref">regmap_compa
 >
./a>; 
L52" class="line" namn>
L52">2 52./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L53" class="line" namn>
L53">2 53./a> 
L54" class="line" namn>
L54">2 54./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=regmap_raw_read" class="sref">regmap_raw_read./a>(.a href="+code=map" class="sref">map./a>,2.a href="+code=reg" class="sref">reg./a>, .a href="+code=buf" class="sref">buf./a>, .a href="+code=count" class="sref">count./a>); 
L55" class="line" namn>
L55">2 55./a>        return .a href="+code=ret" class="sref">ret./a>; 
L56" class="line" namn>
L56">2 56./a>} 
L57" class="line" namn>
L57">2 57./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_bulk_read" class="sref">pm860x_bulk_read./a>); 
L58" class="line" namn>
L58">2 58./a> 
L59" class="line" namn>
L59">2 59./a>int2.a href="+code=pm860x_bulk_write" class="sref">pm860x_bulk_write./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L60" class="line" namn>
L60">2 60./a>                      int2.a href="+code=count" class="sref">count./a>, unsigned char2*.a href="+code=buf" class="sref">buf./a>) 
L61" class="line" namn>
L61">2 61./a>{ 
L62" class="line" namn>
L62">2 62./a>        struct2.a href="+code=pm860x_chip" class="sref">pm860x_chip./a> *.a href="+code=chip" class="sref">chip./a> =2.a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a./a>(.a href="+code=i2c" class="sref">i2c./a>); 
L63" class="line" namn>
L63">2 63./a>        struct2.a href="+code=regmap" class="sref">regmap./a> *.a href="+code=map" class="sref">map./a> = (.a href="+code=i2c" class="sref">i2c./a> ==2.a href="+code=chip" class="sref">chip./a>->.a href="+code=client" class="sref">client./a>) ?2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap" class="sref">regmap./a> 
L64" class="line" namn>
L64">2 64./a>                                :2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap_compa
 >
" class="sref">regmap_compa
 >
./a>; 
L65" class="line" namn>
L65">2 65./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L66" class="line" namn>
L66">2 66./a> 
L67" class="line" namn>
L67">2 67./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=regmap_raw_write" class="sref">regmap_raw_write./a>(.a href="+code=map" class="sref">map./a>,2.a href="+code=reg" class="sref">reg./a>, .a href="+code=buf" class="sref">buf./a>, .a href="+code=count" class="sref">count./a>); 
L68" class="line" namn>
L68">2 68./a>        return .a href="+code=ret" class="sref">ret./a>; 
L69" class="line" namn>
L69">2 69./a>} 
L70" class="line" namn>
L70">2 70./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_bulk_write" class="sref">pm860x_bulk_write./a>); 
L71" class="line" namn>
L71">2 71./a> 
L72" class="line" namn>
L72">2 72./a>int2.a href="+code=pm860x_set_bits" class="sref">pm860x_set_bits./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L73" class="line" namn>
L73">2 73./a>                    unsigned char2.a href="+code=mask" class="sref">mask./a>, unsigned char2.a href="+code=da a" class="sref">da a./a>) 
L74" class="line" namn>
L74">2 74./a>{ 
L75" class="line" namn>
L75">2 75./a>        struct2.a href="+code=pm860x_chip" class="sref">pm860x_chip./a> *.a href="+code=chip" class="sref">chip./a> =2.a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a./a>(.a href="+code=i2c" class="sref">i2c./a>); 
L76" class="line" namn>
L76">2 76./a>        struct2.a href="+code=regmap" class="sref">regmap./a> *.a href="+code=map" class="sref">map./a> = (.a href="+code=i2c" class="sref">i2c./a> ==2.a href="+code=chip" class="sref">chip./a>->.a href="+code=client" class="sref">client./a>) ?2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap" class="sref">regmap./a> 
L77" class="line" namn>
L77">2 77./a>                                :2.a href="+code=chip" class="sref">chip./a>->.a href="+code=regmap_compa
 >
" class="sref">regmap_compa
 >
./a>; 
L78" class="line" namn>
L78">2 78./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L79" class="line" namn>
L79">2 79./a> 
L80" class="line" namn>
L80">2 80./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=regmap_upda e_bits" class="sref">regmap_upda e_bits./a>(.a href="+code=map" class="sref">map./a>,2.a href="+code=reg" class="sref">reg./a>, .a href="+code=mask" class="sref">mask./a>, .a href="+code=da a" class="sref">da a./a>); 
L81" class="line" namn>
L81">2 81./a>        return .a href="+code=ret" class="sref">ret./a>; 
L82" class="line" namn>
L82">2 82./a>} 
L83" class="line" namn>
L83">2 83./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_set_bits" class="sref">pm860x_set_bits./a>); 
L84" class="line" namn>
L84">2 84./a> 
L85" class="line" namn>
L85">2 85./a>static int2.a href="+code=read_device" class="sref">read_device./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L86" class="line" namn>
L86">2 86./a>                       int2.a href="+code=bytes" class="sref">bytes./a>, void *.a href="+code=dest" class="sref">dest./a>) 
L87" class="line" namn>
L87">2 87./a>{ 
L88" class="line" namn>
L88">2 88./a>        unsigned char2.a href="+code=msgbuf0" class="sref">msgbuf0./a>[.a href="+code=I2C_SMBUS_BLOCK_MAX" class="sref">I2C_SMBUS_BLOCK_MAX./a> + 3]; 
L89" class="line" namn>
L89">2 89./a>        unsigned char2.a href="+code=msgbuf1" class="sref">msgbuf1./a>[.a href="+code=I2C_SMBUS_BLOCK_MAX" class="sref">I2C_SMBUS_BLOCK_MAX./a> + 2]; 
L90" class="line" namn>
L90">2 90./a>        struct2.a href="+code=i2c_adapter" class="sref">i2c_adapter./a> *.a href="+code=adap" class="sref">adap./a> =2.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>; 
L91" class="line" namn>
L91">2 91./a>        struct2.a href="+code=i2c_msg" class="sref">i2c_msg./a> .a href="+code=msg" class="sref">msg./a>[2] =2{ 
L92" class="line" namn>
L92">2 92./a>                                        { 
L93" class="line" namn>
L93">2 93./a>                                                ..a href="+code=addr" class="sref">addr./a> =2.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=addr" class="sref">addr./a>, 
L94" class="line" namn>
L94">2 94./a>                                                ..a href="+code=flags" class="sref">flags./a> =20, 
L95" class="line" namn>
L95">2 95./a>                                                ..a href="+code=le
" class="sref">le
./a> =21, 
L96" class="line" namn>
L96">2 96./a>                                                ..a href="+code=buf" class="sref">buf./a> =2.a href="+code=msgbuf0" class="sref">msgbuf0./a> 
L97" class="line" namn>
L97">2 97./a>                                        }, 
L98" class="line" namn>
L98">2 98./a>                                        {       ..a href="+code=addr" class="sref">addr./a> =2.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=addr" class="sref">addr./a>, 
L99" class="line" namn>
L99">2 99./a>                                                ..a href="+code=flags" class="sref">flags./a> =2.a href="+code=I2C_M_RD" class="sref">I2C_M_RD./a>, 
L100" class="line" namn>
L100">2100./a>                                                ..a href="+code=le
" class="sref">le
./a> =20, 
L101" class="line" namn>
L101">2101./a>                                                ..a href="+code=buf" class="sref">buf./a> =2.a href="+code=msgbuf1" class="sref">msgbuf1./a> 
L102" class="line" namn>
L102">2102./a>                                        }, 
L103" class="line" namn>
L103">2103./a>                                }; 
L104" class="line" namn>
L104">2104./a>        int2.a href="+code=num" class="sref">num./a> =21, .a href="+code=ret" class="sref">ret./a> =20; 
L105" class="line" namn>
L105">2105./a> 
L106" class="line" namn>
L106">2106./a>        if (.a href="+code=dest" class="sref">dest./a> ==2.a href="+code=NULL" class="sref">NULL./a>) 
L107" class="line" namn>
L107">2107./a>                return -.a href="+code=EINVAL" class="sref">EINVAL./a>; 
L108" class="line" namn>
L108">2108./a>        .a href="+code=msgbuf0" class="sref">msgbuf0./a>[0] =2(unsigned char).a href="+code=reg" class="sref">reg./a>;        .spa
 class="comment">/* command */./spa
  
L109" class="line" namn>
L109">2109./a>        .a href="+code=msg" class="sref">msg./a>[1]..a href="+code=le
" class="sref">le
./a> =2.a href="+code=bytes" class="sref">bytes./a>; 
L110" class="line" namn>
L110">2110./a> 
L111" class="line" namn>
L111">2111./a>        .spa
 class="comment">/* if da a needs to read back, num should be 2 */./spa
  
L112" class="line" namn>
L112">2112./a>        if (.a href="+code=bytes" class="sref">bytes./a> > 0) 
L113" class="line" namn>
L113">2113./a>                .a href="+code=num" class="sref">num./a> =22; 
L114" class="line" namn>
L114">2114./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=adap" class="sref">adap./a>->.a href="+code=algo" class="sref">algo./a>->.a href="+code=master_xfer" class="sref">master_xfer./a>(.a href="+code=adap" class="sref">adap./a>, .a href="+code=msg" class="sref">msg./a>, .a href="+code=num" class="sref">num./a>); 
L115" class="line" namn>
L115">2115./a>        .a href="+code=memcpy" class="sref">memcpy./a>(.a href="+code=dest" class="sref">dest./a>, .a href="+code=msgbuf1" class="sref">msgbuf1./a>, .a href="+code=bytes" class="sref">bytes./a>); 
L116" class="line" namn>
L116">2116./a>        if (.a href="+code=ret" class="sref">ret./a> < 0) 
L117" class="line" namn>
L117">2117./a>                return .a href="+code=ret" class="sref">ret./a>; 
L118" class="line" namn>
L118">2118./a>        return 0; 
L119" class="line" namn>
L119">2119./a>} 
L120" class="line" namn>
L120">2120./a> 
L121" class="line" namn>
L121">2121./a>static int2.a href="+code=write_device" class="sref">write_device./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L122" class="line" namn>
L122">2122./a>                        int2.a href="+code=bytes" class="sref">bytes./a>, void *.a href="+code=src" class="sref">src./a>) 
L123" class="line" namn>
L123">2123./a>{ 
L124" class="line" namn>
L124">2124./a>        unsigned char2.a href="+code=buf" class="sref">buf./a>[.a href="+code=bytes" class="sref">bytes./a> + 1]; 
L125" class="line" namn>
L125">2125./a>        struct2.a href="+code=i2c_adapter" class="sref">i2c_adapter./a> *.a href="+code=adap" class="sref">adap./a> =2.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>; 
L126" class="line" namn>
L126">2126./a>        struct2.a href="+code=i2c_msg" class="sref">i2c_msg./a> .a href="+code=msg" class="sref">msg./a>; 
L127" class="line" namn>
L127">2127./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L128" class="line" namn>
L128">2128./a> 
L129" class="line" namn>
L129">2129./a>        .a href="+code=buf" class="sref">buf./a>[0] =2(unsigned char).a href="+code=reg" class="sref">reg./a>; 
L130" class="line" namn>
L130">2130./a>        .a href="+code=memcpy" class="sref">memcpy./a>(&.a href="+code=buf" class="sref">buf./a>[1], .a href="+code=src" class="sref">src./a>, .a href="+code=bytes" class="sref">bytes./a>); 
L131" class="line" namn>
L131">2131./a>        .a href="+code=msg" class="sref">msg./a>..a href="+code=addr" class="sref">addr./a> =2.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=addr" class="sref">addr./a>; 
L132" class="line" namn>
L132">2132./a>        .a href="+code=msg" class="sref">msg./a>..a href="+code=flags" class="sref">flags./a> =20; 
L133" class="line" namn>
L133">2133./a>        .a href="+code=msg" class="sref">msg./a>..a href="+code=le
" class="sref">le
./a> =2.a href="+code=bytes" class="sref">bytes./a> + 1; 
L134" class="line" namn>
L134">2134./a>        .a href="+code=msg" class="sref">msg./a>..a href="+code=buf" class="sref">buf./a> =2.a href="+code=buf" class="sref">buf./a>; 
L135" class="line" namn>
L135">2135./a> 
L136" class="line" namn>
L136">2136./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=adap" class="sref">adap./a>->.a href="+code=algo" class="sref">algo./a>->.a href="+code=master_xfer" class="sref">master_xfer./a>(.a href="+code=adap" class="sref">adap./a>, &.a href="+code=msg" class="sref">msg./a>, 1); 
L137" class="line" namn>
L137">2137./a>        if (.a href="+code=ret" class="sref">ret./a> < 0) 
L138" class="line" namn>
L138">2138./a>                return .a href="+code=ret" class="sref">ret./a>; 
L139" class="line" namn>
L139">2139./a>        return 0; 
L140" class="line" namn>
L140">2140./a>} 
L141" class="line" namn>
L141">2141./a> 
L142" class="line" namn>
L142">2142./a>int2.a href="+code=pm860x_page_reg_read" class="sref">pm860x_page_reg_read./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>) 
L143" class="line" namn>
L143">2143./a>{ 
L144" class="line" namn>
L144">2144./a>        unsigned char2.a href="+code=zero" class="sref">zero./a> =20; 
L145" class="line" namn>
L145">2145./a>        unsigned char2.a href="+code=da a" class="sref">da a./a>; 
L146" class="line" namn>
L146">2146./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L147" class="line" namn>
L147">2147./a> 
L148" class="line" namn>
L148">2148./a>        .a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L149" class="line" namn>
L149">2149./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFA, 0, &.a href="+code=zero" class="sref">zero./a>); 
L150" class="line" namn>
L150">2150./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFB, 0, &.a href="+code=zero" class="sref">zero./a>); 
L151" class="line" namn>
L151">2151./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFF, 0, &.a href="+code=zero" class="sref">zero./a>); 
L152" class="line" namn>
L152">2152./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, .a href="+code=reg" class="sref">reg./a>,21, &.a href="+code=da a" class="sref">da a./a>); 
L153" class="line" namn>
L153">2153./a>        if (.a href="+code=ret" class="sref">ret./a> >= 0) 
L154" class="line" namn>
L154">2154./a>                .a href="+code=ret" class="sref">ret./a> =2(int).a href="+code=da a" class="sref">da a./a>; 
L155" class="line" namn>
L155">2155./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFE, 0, &.a href="+code=zero" class="sref">zero./a>); 
L156" class="line" namn>
L156">2156./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFC, 0, &.a href="+code=zero" class="sref">zero./a>); 
L157" class="line" namn>
L157">2157./a>        .a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L158" class="line" namn>
L158">2158./a>        return .a href="+code=ret" class="sref">ret./a>; 
L159" class="line" namn>
L159">2159./a>} 
L160" class="line" namn>
L160">2160./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_page_reg_read" class="sref">pm860x_page_reg_read./a>); 
L161" class="line" namn>
L161">2161./a> 
L162" class="line" namn>
L162">2162./a>int2.a href="+code=pm860x_page_reg_write" class="sref">pm860x_page_reg_write./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L163" class="line" namn>
L163">2163./a>                          unsigned char2.a href="+code=da a" class="sref">da a./a>) 
L164" class="line" namn>
L164">2164./a>{ 
L165" class="line" namn>
L165">2165./a>        unsigned char2.a href="+code=zero" class="sref">zero./a>; 
L166" class="line" namn>
L166">2166./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L167" class="line" namn>
L167">2167./a> 
L168" class="line" namn>
L168">2168./a>        .a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L169" class="line" namn>
L169">2169./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFA, 0, &.a href="+code=zero" class="sref">zero./a>); 
L170" class="line" namn>
L170">2170./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFB, 0, &.a href="+code=zero" class="sref">zero./a>); 
L171" class="line" namn>
L171">2171./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFF, 0, &.a href="+code=zero" class="sref">zero./a>); 
L172" class="line" namn>
L172">2172./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=write_device" class="sref">write_device./a>(.a href="+code=i2c" class="sref">i2c./a>, .a href="+code=reg" class="sref">reg./a>,21, &.a href="+code=da a" class="sref">da a./a>); 
L173" class="line" namn>
L173">2173./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFE, 0, &.a href="+code=zero" class="sref">zero./a>); 
L174" class="line" namn>
L174">2174./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFC, 0, &.a href="+code=zero" class="sref">zero./a>); 
L175" class="line" namn>
L175">2175./a>        .a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L176" class="line" namn>
L176">2176./a>        return .a href="+code=ret" class="sref">ret./a>; 
L177" class="line" namn>
L177">2177./a>} 
L178" class="line" namn>
L178">2178./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_page_reg_write" class="sref">pm860x_page_reg_write./a>); 
L179" class="line" namn>
L179">2179./a> 
L180" class="line" namn>
L180">2180./a>int2.a href="+code=pm860x_page_bulk_read" class="sref">pm860x_page_bulk_read./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L181" class="line" namn>
L181">2181./a>                          int2.a href="+code=count" class="sref">count./a>, unsigned char2*.a href="+code=buf" class="sref">buf./a>) 
L182" class="line" namn>
L182">2182./a>{ 
L183" class="line" namn>
L183">2183./a>        unsigned char2.a href="+code=zero" class="sref">zero./a> =20; 
L184" class="line" namn>
L184">2184./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L185" class="line" namn>
L185">2185./a> 
L186" class="line" namn>
L186">2186./a>        .a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L187" class="line" namn>
L187">2187./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xfa, 0, &.a href="+code=zero" class="sref">zero./a>); 
L188" class="line" namn>
L188">2188./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xfb, 0, &.a href="+code=zero" class="sref">zero./a>); 
L189" class="line" namn>
L189">2189./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xff, 0, &.a href="+code=zero" class="sref">zero./a>); 
L190" class="line" namn>
L190">2190./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, .a href="+code=reg" class="sref">reg./a>,2.a href="+code=count" class="sref">count./a>, .a href="+code=buf" class="sref">buf./a>); 
L191" class="line" namn>
L191">2191./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFE, 0, &.a href="+code=zero" class="sref">zero./a>); 
L192" class="line" namn>
L192">2192./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFC, 0, &.a href="+code=zero" class="sref">zero./a>); 
L193" class="line" namn>
L193">2193./a>        .a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L194" class="line" namn>
L194">2194./a>        return .a href="+code=ret" class="sref">ret./a>; 
L195" class="line" namn>
L195">2195./a>} 
L196" class="line" namn>
L196">2196./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_page_bulk_read" class="sref">pm860x_page_bulk_read./a>); 
L197" class="line" namn>
L197">2197./a> 
L198" class="line" namn>
L198">2198./a>int2.a href="+code=pm860x_page_bulk_write" class="sref">pm860x_page_bulk_write./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L199" class="line" namn>
L199">2199./a>                           int2.a href="+code=count" class="sref">count./a>, unsigned char2*.a href="+code=buf" class="sref">buf./a>) 
L200" class="line" namn>
L200">2200./a>{ 
L201" class="line" namn>
L201">2201./a>        unsigned char2.a href="+code=zero" class="sref">zero./a> =20; 
L202" class="line" namn>
L202">2202./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L203" class="line" namn>
L203">2203./a> 
L204" class="line" namn>
L204">2204./a>        .a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L205" class="line" namn>
L205">2205./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFA, 0, &.a href="+code=zero" class="sref">zero./a>); 
L206" class="line" namn>
L206">2206./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFB, 0, &.a href="+code=zero" class="sref">zero./a>); 
L207" class="line" namn>
L207">2207./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFF, 0, &.a href="+code=zero" class="sref">zero./a>); 
L208" class="line" namn>
L208">2208./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=write_device" class="sref">write_device./a>(.a href="+code=i2c" class="sref">i2c./a>, .a href="+code=reg" class="sref">reg./a>,2.a href="+code=count" class="sref">count./a>, .a href="+code=buf" class="sref">buf./a>); 
L209" class="line" namn>
L209">2209./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFE, 0, &.a href="+code=zero" class="sref">zero./a>); 
L210" class="line" namn>
L210">2210./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFC, 0, &.a href="+code=zero" class="sref">zero./a>); 
L211" class="line" namn>
L211">2211./a>        .a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L212" class="line" namn>
L212">2212./a>        .a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L213" class="line" namn>
L213">2213./a>        return .a href="+code=ret" class="sref">ret./a>; 
L214" class="line" namn>
L214">2214./a>} 
L215" class="line" namn>
L215">2215./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_page_bulk_write" class="sref">pm860x_page_bulk_write./a>); 
L216" class="line" namn>
L216">2216./a> 
L217" class="line" namn>
L217">2217./a>int2.a href="+code=pm860x_page_set_bits" class="sref">pm860x_page_set_bits./a>(struct2.a href="+code=i2c_client" class="sref">i2c_client./a> *.a href="+code=i2c" class="sref">i2c./a>, int2.a href="+code=reg" class="sref">reg./a>, 
L218" class="line" namn>
L218">2218./a>                         unsigned char2.a href="+code=mask" class="sref">mask./a>, unsigned char2.a href="+code=da a" class="sref">da a./a>) 
L219" class="line" namn>
L219">2219./a>{ 
L220" class="line" namn>
L220">2220./a>        unsigned char2.a href="+code=zero" class="sref">zero./a>; 
L221" class="line" namn>
L221">2221./a>        unsigned char2.a href="+code=value" class="sref">value./a>; 
L222" class="line" namn>
L222">2222./a>        int2.a href="+code=ret" class="sref">ret./a>; 
L223" class="line" namn>
L223">2223./a> 
L224" class="line" namn>
L224">2224./a>        .a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L225" class="line" namn>
L225">2225./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFA, 0, &.a href="+code=zero" class="sref">zero./a>); 
L226" class="line" namn>
L226">2226./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFB, 0, &.a href="+code=zero" class="sref">zero./a>); 
L227" class="line" namn>
L227">2227./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFF, 0, &.a href="+code=zero" class="sref">zero./a>); 
L228" class="line" namn>
L228">2228./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, .a href="+code=reg" class="sref">reg./a>,21, &.a href="+code=value" class="sref">value./a>); 
L229" class="line" namn>
L229">2229./a>        if (.a href="+code=ret" class="sref">ret./a> < 0) 
L230" class="line" namn>
L230">2230./a>                goto .a href="+code=out" class="sref">out./a>; 
L231" class="line" namn>
L231">2231./a>        .a href="+code=value" class="sref">value./a> &= ~.a href="+code=mask" class="sref">mask./a>; 
L232" class="line" namn>
L232">2232./a>        .a href="+code=value" class="sref">value./a> |=2.a href="+code=da a" class="sref">da a./a>; 
L233" class="line" namn>
L233">2233./a>        .a href="+code=ret" class="sref">ret./a> =2.a href="+code=write_device" class="sref">write_device./a>(.a href="+code=i2c" class="sref">i2c./a>, .a href="+code=reg" class="sref">reg./a>,21, &.a href="+code=value" class="sref">value./a>); 
L234" class="line" namn>
L234">2234./a>.a href="+code=out" class="sref">out./a>: 
L235" class="line" namn>
L235">2235./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFE, 0, &.a href="+code=zero" class="sref">zero./a>); 
L236" class="line" namn>
L236">2236./a>        .a href="+code=read_device" class="sref">read_device./a>(.a href="+code=i2c" class="sref">i2c./a>, 0xFC, 0, &.a href="+code=zero" class="sref">zero./a>); 
L237" class="line" namn>
L237">2237./a>        .a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter./a>(.a href="+code=i2c" class="sref">i2c./a>->.a href="+code=adapter" class="sref">adapter./a>); 
L238" class="line" namn>
L238">2238./a>        return .a href="+code=ret" class="sref">ret./a>; 
L239" class="line" namn>
L239">2239./a>} 
L240" class="line" namn>
L240">2240./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=pm860x_page_set_bits" class="sref">pm860x_page_set_bits./a>); 
L241" class="line" namn>
L241">2241./a>
lxr.linux.no kindly hosted by Redpill Linpro AS./a>, provider of Linux consulting and operations services since21995.