linux/drivers/mfd/88pm860x-i2c.c
<<
hidden" nam> navtarget" > "> text" nam> search" id search"> submit">Search hidden" nam> ajax_lookup" id ajax_lookup" > ">e 6div id file_contents"u
 L1">. .16/a>6spal class="comment">/*6/spalue
 L2">. .26/a>6spal class="comment"> * I2C driver for Marvell 88PM860x6/spalue
 L3">. .36/a>6spal class="comment"> *6/spalue
 L4">. .46/a>6spal class="comment"> * Copyright (C) 2009 Marvell Interna valal Ltd.6/spalue
 L5">. .56/a>6spal class="comment"> *      Haojial Zhuang <haojial.zhuang@marvell.com>6/spalue
 L6">. .66/a>6spal class="comment"> *6/spalue
 L7">. .76/a>6spal class="comment"> * This program is free software; you cal redistribute it and/or modify6/spalue
 L8">. .86/a>6spal class="comment"> * it under the terms of the GNU General Public License vers.12"2 as6/spalue
 L9">. .96/a>6spal class="comment"> * published by the Free Software Founda val.6/spalue
 L10">.   
 a>6spal class="comment"> */6/spalue
 L11">. 116/a>#include <linux/kernel.h6/a>>e
 L12">. 126/a>#include <linux/module.h6/a>>e
 L13">. 136/a>#include <linux/i2c.h6/a>>e
 L14">. 146/a>#include <linux/regmap.h6/a>>e
 L15">. 156/a>#include <linux/mfd/88pm860x.h6/a>>e
 L16">. 166/a>e
 L17">. 176/a>int.6a href="+code=pm860x_reg_read" class="sref">pm860x_reg_read6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>)e
 L18">. 186/a>{e
 L19">. 196/a>        struct.6a href="+code=pm860x_chip" class="sref">pm860x_chip6/a> *6a href="+code=chip" class="sref">chip6/a> =.6a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a6/a>(6a href="+code=i2c" class="sref">i2c6/a>);e
 L20">. 206/a>        struct.6a href="+code=regmap" class="sref">regmap6/a> *6a href="+code=map" class="sref">map6/a> = (6a href="+code=i2c" class="sref">i2c6/a> ==.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=client" class="sref">client6/a>) ?.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap" class="sref">regmap6/a>e
 L21">. 216/a>                                :.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap_compalval" class="sref">regmap_compalval6/a>;e
 L22">. 226/a>        unsigned int.6a href="+code=da a" class="sref">da a6/a>;e
 L23">. 236/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L24">. 246/a>e
 L25">. 256/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=regmap_read" class="sref">regmap_read6/a>(6a href="+code=map" class="sref">map6/a>,.6a href="+code=reg" class="sref">reg6/a>, &6a href="+code=da a" class="sref">da a6/a>);e
 L26">. 266/a>        if (6a href="+code=ret" class="sref">ret6/a> < 0)e
 L27">. 276/a>                return 6a href="+code=ret" class="sref">ret6/a>;e
 L28">. 286/a>        elsee
 L29">. 296/a>                return (int)6a href="+code=da a" class="sref">da a6/a>;e
 L30">. 306/a>}e
 L31">. 316/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_reg_read" class="sref">pm860x_reg_read6/a>);e
 L32">. 326/a>e
 L33">. 336/a>int.6a href="+code=pm860x_reg_write" class="sref">pm860x_reg_write6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L34">. 346/a>                     unsigned char.6a href="+code=da a" class="sref">da a6/a>)e
 L35">. 356/a>{e
 L36">. 366/a>        struct.6a href="+code=pm860x_chip" class="sref">pm860x_chip6/a> *6a href="+code=chip" class="sref">chip6/a> =.6a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a6/a>(6a href="+code=i2c" class="sref">i2c6/a>);e
 L37">. 376/a>        struct.6a href="+code=regmap" class="sref">regmap6/a> *6a href="+code=map" class="sref">map6/a> = (6a href="+code=i2c" class="sref">i2c6/a> ==.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=client" class="sref">client6/a>) ?.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap" class="sref">regmap6/a>e
 L38">. 386/a>                                :.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap_compalval" class="sref">regmap_compalval6/a>;e
 L39">. 396/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L40">. 406/a>e
 L41">. 416/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=regmap_write" class="sref">regmap_write6/a>(6a href="+code=map" class="sref">map6/a>,.6a href="+code=reg" class="sref">reg6/a>, 6a href="+code=da a" class="sref">da a6/a>);e
 L42">. 426/a>        return 6a href="+code=ret" class="sref">ret6/a>;e
 L43">. 436/a>}e
 L44">. 446/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_reg_write" class="sref">pm860x_reg_write6/a>);e
 L45">. 456/a>e
 L46">. 466/a>int.6a href="+code=pm860x_bulk_read" class="sref">pm860x_bulk_read6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L47">. 476/a>                     int.6a href="+code=count" class="sref">count6/a>, unsigned char.*6a href="+code=buf" class="sref">buf6/a>)e
 L48">. 486/a>{e
 L49">. 496/a>        struct.6a href="+code=pm860x_chip" class="sref">pm860x_chip6/a> *6a href="+code=chip" class="sref">chip6/a> =.6a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a6/a>(6a href="+code=i2c" class="sref">i2c6/a>);e
 L50">. 506/a>        struct.6a href="+code=regmap" class="sref">regmap6/a> *6a href="+code=map" class="sref">map6/a> = (6a href="+code=i2c" class="sref">i2c6/a> ==.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=client" class="sref">client6/a>) ?.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap" class="sref">regmap6/a>e
 L51">. 516/a>                                :.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap_compalval" class="sref">regmap_compalval6/a>;e
 L52">. 526/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L53">. 536/a>e
 L54">. 546/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=regmap_raw_read" class="sref">regmap_raw_read6/a>(6a href="+code=map" class="sref">map6/a>,.6a href="+code=reg" class="sref">reg6/a>, 6a href="+code=buf" class="sref">buf6/a>, 6a href="+code=count" class="sref">count6/a>);e
 L55">. 556/a>        return 6a href="+code=ret" class="sref">ret6/a>;e
 L56">. 566/a>}e
 L57">. 576/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_bulk_read" class="sref">pm860x_bulk_read6/a>);e
 L58">. 586/a>e
 L59">. 596/a>int.6a href="+code=pm860x_bulk_write" class="sref">pm860x_bulk_write6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L60">. 606/a>                      int.6a href="+code=count" class="sref">count6/a>, unsigned char.*6a href="+code=buf" class="sref">buf6/a>)e
 L61">. 616/a>{e
 L62">. 626/a>        struct.6a href="+code=pm860x_chip" class="sref">pm860x_chip6/a> *6a href="+code=chip" class="sref">chip6/a> =.6a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a6/a>(6a href="+code=i2c" class="sref">i2c6/a>);e
 L63">. 636/a>        struct.6a href="+code=regmap" class="sref">regmap6/a> *6a href="+code=map" class="sref">map6/a> = (6a href="+code=i2c" class="sref">i2c6/a> ==.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=client" class="sref">client6/a>) ?.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap" class="sref">regmap6/a>e
 L64">. 646/a>                                :.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap_compalval" class="sref">regmap_compalval6/a>;e
 L65">. 656/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L66">. 666/a>e
 L67">. 676/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=regmap_raw_write" class="sref">regmap_raw_write6/a>(6a href="+code=map" class="sref">map6/a>,.6a href="+code=reg" class="sref">reg6/a>, 6a href="+code=buf" class="sref">buf6/a>, 6a href="+code=count" class="sref">count6/a>);e
 L68">. 686/a>        return 6a href="+code=ret" class="sref">ret6/a>;e
 L69">. 696/a>}e
 L70">. 706/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_bulk_write" class="sref">pm860x_bulk_write6/a>);e
 L71">. 716/a>e
 L72">. 726/a>int.6a href="+code=pm860x_set_bits" class="sref">pm860x_set_bits6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L73">. 736/a>                    unsigned char.6a href="+code=mask" class="sref">mask6/a>, unsigned char.6a href="+code=da a" class="sref">da a6/a>)e
 L74">. 746/a>{e
 L75">. 756/a>        struct.6a href="+code=pm860x_chip" class="sref">pm860x_chip6/a> *6a href="+code=chip" class="sref">chip6/a> =.6a href="+code=i2c_get_clientda a" class="sref">i2c_get_clientda a6/a>(6a href="+code=i2c" class="sref">i2c6/a>);e
 L76">. 766/a>        struct.6a href="+code=regmap" class="sref">regmap6/a> *6a href="+code=map" class="sref">map6/a> = (6a href="+code=i2c" class="sref">i2c6/a> ==.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=client" class="sref">client6/a>) ?.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap" class="sref">regmap6/a>e
 L77">. 776/a>                                :.6a href="+code=chip" class="sref">chip6/a>->6a href="+code=regmap_compalval" class="sref">regmap_compalval6/a>;e
 L78">. 786/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L79">. 796/a>e
 L80">. 806/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=regmap_upda e_bits" class="sref">regmap_upda e_bits6/a>(6a href="+code=map" class="sref">map6/a>,.6a href="+code=reg" class="sref">reg6/a>, 6a href="+code=mask" class="sref">mask6/a>, 6a href="+code=da a" class="sref">da a6/a>);e
 L81">. 816/a>        return 6a href="+code=ret" class="sref">ret6/a>;e
 L82">. 826/a>}e
 L83">. 836/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_set_bits" class="sref">pm860x_set_bits6/a>);e
 L84">. 846/a>e
 L85">. 856/a>static int.6a href="+code=read_device" class="sref">read_device6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L86">. 866/a>                       int.6a href="+code=bytes" class="sref">bytes6/a>, void *6a href="+code=dest" class="sref">dest6/a>)e
 L87">. 876/a>{e
 L88">. 886/a>        unsigned char.6a href="+code=msgbuf0" class="sref">msgbuf06/a>[6a href="+code=I2C_SMBUS_BLOCK_MAX" class="sref">I2C_SMBUS_BLOCK_MAX6/a> + 3];e
 L89">. 896/a>        unsigned char.6a href="+code=msgbuf1" class="sref">msgbuf16/a>[6a href="+code=I2C_SMBUS_BLOCK_MAX" class="sref">I2C_SMBUS_BLOCK_MAX6/a> + 2];e
 L90">. 906/a>        struct.6a href="+code=i2c_adapter" class="sref">i2c_adapter6/a> *6a href="+code=adap" class="sref">adap6/a> =.6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>;e
 L91">. 916/a>        struct.6a href="+code=i2c_msg" class="sref">i2c_msg6/a> 6a href="+code=msg" class="sref">msg6/a>[2] =.{e
 L92">. 926/a>                                        {e
 L93">. 936/a>                                                .6a href="+code=addr" class="sref">addr6/a> =.6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=addr" class="sref">addr6/a>,e
 L94">. 946/a>                                                .6a href="+code=flags" class="sref">flags6/a> =.0,e
 L95">. 956/a>                                                .6a href="+code=lel" class="sref">lel6/a> =.1,e
 L96">. 966/a>                                                .6a href="+code=buf" class="sref">buf6/a> =.6a href="+code=msgbuf0" class="sref">msgbuf06/a>e
 L97">. 976/a>                                        },e
 L98">. 986/a>                                        {       .6a href="+code=addr" class="sref">addr6/a> =.6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=addr" class="sref">addr6/a>,e
 L99">. 996/a>                                                .6a href="+code=flags" class="sref">flags6/a> =.6a href="+code=I2C_M_RD" class="sref">I2C_M_RD6/a>,e
 L100">.1006/a>                                                .6a href="+code=lel" class="sref">lel6/a> =.0,e
 L101">.1016/a>                                                .6a href="+code=buf" class="sref">buf6/a> =.6a href="+code=msgbuf1" class="sref">msgbuf16/a>e
 L102">.1026/a>                                        },e
 L103">.1036/a>                                };e
 L104">.1046/a>        int.6a href="+code=num" class="sref">num6/a> =.1, 6a href="+code=ret" class="sref">ret6/a> =.0;e
 L105">.1056/a>e
 L106">.1066/a>        if (6a href="+code=dest" class="sref">dest6/a> ==.6a href="+code=NULL" class="sref">NULL6/a>)e
 L107">.1076/a>                return -6a href="+code=EINVAL" class="sref">EINVAL6/a>;e
 L108">.1086/a>        6a href="+code=msgbuf0" class="sref">msgbuf06/a>[0] =.(unsigned char)6a href="+code=reg" class="sref">reg6/a>;        6spal class="comment">/* command */6/spalue
 L109">.1096/a>        6a href="+code=msg" class="sref">msg6/a>[1].6a href="+code=lel" class="sref">lel6/a> =.6a href="+code=bytes" class="sref">bytes6/a>;e
 L110">.1106/a>e
 L111">.1116/a>        6spal class="comment">/* if da a needs to read back, num should be 2 */6/spalue
 L112">.1126/a>        if (6a href="+code=bytes" class="sref">bytes6/a> > 0)e
 L113">.1136/a>                6a href="+code=num" class="sref">num6/a> =.2;e
 L114">.1146/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=adap" class="sref">adap6/a>->6a href="+code=algo" class="sref">algo6/a>->6a href="+code=master_xfer" class="sref">master_xfer6/a>(6a href="+code=adap" class="sref">adap6/a>, 6a href="+code=msg" class="sref">msg6/a>, 6a href="+code=num" class="sref">num6/a>);e
 L115">.1156/a>        6a href="+code=memcpy" class="sref">memcpy6/a>(6a href="+code=dest" class="sref">dest6/a>, 6a href="+code=msgbuf1" class="sref">msgbuf16/a>, 6a href="+code=bytes" class="sref">bytes6/a>);e
 L116">.1166/a>        if (6a href="+code=ret" class="sref">ret6/a> < 0)e
 L117">.1176/a>                return 6a href="+code=ret" class="sref">ret6/a>;e
 L118">.1186/a>        return 0;e
 L119">.1196/a>}e
 L120">.1206/a>e
 L121">.1216/a>static int.6a href="+code=write_device" class="sref">write_device6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L122">.1226/a>                        int.6a href="+code=bytes" class="sref">bytes6/a>, void *6a href="+code=src" class="sref">src6/a>)e
 L123">.1236/a>{e
 L124">.1246/a>        unsigned char.6a href="+code=buf" class="sref">buf6/a>[6a href="+code=bytes" class="sref">bytes6/a> + 1];e
 L125">.1256/a>        struct.6a href="+code=i2c_adapter" class="sref">i2c_adapter6/a> *6a href="+code=adap" class="sref">adap6/a> =.6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>;e
 L126">.1266/a>        struct.6a href="+code=i2c_msg" class="sref">i2c_msg6/a> 6a href="+code=msg" class="sref">msg6/a>;e
 L127">.1276/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L128">.1286/a>e
 L129">.1296/a>        6a href="+code=buf" class="sref">buf6/a>[0] =.(unsigned char)6a href="+code=reg" class="sref">reg6/a>;e
 L130">.1306/a>        6a href="+code=memcpy" class="sref">memcpy6/a>(&6a href="+code=buf" class="sref">buf6/a>[1], 6a href="+code=src" class="sref">src6/a>, 6a href="+code=bytes" class="sref">bytes6/a>);e
 L131">.1316/a>        6a href="+code=msg" class="sref">msg6/a>.6a href="+code=addr" class="sref">addr6/a> =.6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=addr" class="sref">addr6/a>;e
 L132">.1326/a>        6a href="+code=msg" class="sref">msg6/a>.6a href="+code=flags" class="sref">flags6/a> =.0;e
 L133">.1336/a>        6a href="+code=msg" class="sref">msg6/a>.6a href="+code=lel" class="sref">lel6/a> =.6a href="+code=bytes" class="sref">bytes6/a> + 1;e
 L134">.1346/a>        6a href="+code=msg" class="sref">msg6/a>.6a href="+code=buf" class="sref">buf6/a> =.6a href="+code=buf" class="sref">buf6/a>;e
 L135">.1356/a>e
 L136">.1366/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=adap" class="sref">adap6/a>->6a href="+code=algo" class="sref">algo6/a>->6a href="+code=master_xfer" class="sref">master_xfer6/a>(6a href="+code=adap" class="sref">adap6/a>, &6a href="+code=msg" class="sref">msg6/a>, 1);e
 L137">.1376/a>        if (6a href="+code=ret" class="sref">ret6/a> < 0)e
 L138">.1386/a>                return 6a href="+code=ret" class="sref">ret6/a>;e
 L139">.1396/a>        return 0;e
 L140">.1406/a>}e
 L141">.1416/a>e
 L142">.1426/a>int.6a href="+code=pm860x_page_reg_read" class="sref">pm860x_page_reg_read6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>)e
 L143">.1436/a>{e
 L144">.1446/a>        unsigned char.6a href="+code=zero" class="sref">zero6/a> =.0;e
 L145">.1456/a>        unsigned char.6a href="+code=da a" class="sref">da a6/a>;e
 L146">.1466/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L147">.1476/a>e
 L148">.1486/a>        6a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L149">.1496/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFA, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L150">.1506/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFB, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L151">.1516/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFF, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L152">.1526/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 6a href="+code=reg" class="sref">reg6/a>,.1, &6a href="+code=da a" class="sref">da a6/a>);e
 L153">.1536/a>        if (6a href="+code=ret" class="sref">ret6/a> >= 0)e
 L154">.1546/a>                6a href="+code=ret" class="sref">ret6/a> =.(int)6a href="+code=da a" class="sref">da a6/a>;e
 L155">.1556/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFE, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L156">.1566/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFC, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L157">.1576/a>        6a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L158">.1586/a>        return 6a href="+code=ret" class="sref">ret6/a>;e
 L159">.1596/a>}e
 L160">.1606/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_page_reg_read" class="sref">pm860x_page_reg_read6/a>);e
 L161">.1616/a>e
 L162">.1626/a>int.6a href="+code=pm860x_page_reg_write" class="sref">pm860x_page_reg_write6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L163">.1636/a>                          unsigned char.6a href="+code=da a" class="sref">da a6/a>)e
 L164">.1646/a>{e
 L165">.1656/a>        unsigned char.6a href="+code=zero" class="sref">zero6/a>;e
 L166">.1666/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L167">.1676/a>e
 L168">.1686/a>        6a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L169">.1696/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFA, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L170">.1706/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFB, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L171">.1716/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFF, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L172">.1726/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=write_device" class="sref">write_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 6a href="+code=reg" class="sref">reg6/a>,.1, &6a href="+code=da a" class="sref">da a6/a>);e
 L173">.1736/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFE, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L174">.1746/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFC, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L175">.1756/a>        6a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L176">.1766/a>        return 6a href="+code=ret" class="sref">ret6/a>;e
 L177">.1776/a>}e
 L178">.1786/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_page_reg_write" class="sref">pm860x_page_reg_write6/a>);e
 L179">.1796/a>e
 L180">.1806/a>int.6a href="+code=pm860x_page_bulk_read" class="sref">pm860x_page_bulk_read6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L181">.1816/a>                          int.6a href="+code=count" class="sref">count6/a>, unsigned char.*6a href="+code=buf" class="sref">buf6/a>)e
 L182">.1826/a>{e
 L183">.1836/a>        unsigned char.6a href="+code=zero" class="sref">zero6/a> =.0;e
 L184">.1846/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L185">.1856/a>e
 L186">.1866/a>        6a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L187">.1876/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xfa, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L188">.1886/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xfb, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L189">.1896/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xff, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L190">.1906/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 6a href="+code=reg" class="sref">reg6/a>,.6a href="+code=count" class="sref">count6/a>, 6a href="+code=buf" class="sref">buf6/a>);e
 L191">.1916/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFE, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L192">.1926/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFC, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L193">.1936/a>        6a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L194">.1946/a>        return 6a href="+code=ret" class="sref">ret6/a>;e
 L195">.1956/a>}e
 L196">.1966/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_page_bulk_read" class="sref">pm860x_page_bulk_read6/a>);e
 L197">.1976/a>e
 L198">.1986/a>int.6a href="+code=pm860x_page_bulk_write" class="sref">pm860x_page_bulk_write6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L199">.1996/a>                           int.6a href="+code=count" class="sref">count6/a>, unsigned char.*6a href="+code=buf" class="sref">buf6/a>)e
 L200">.2006/a>{e
 L201">.2016/a>        unsigned char.6a href="+code=zero" class="sref">zero6/a> =.0;e
 L202">.2026/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L203">.2036/a>e
 L204">.2046/a>        6a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L205">.2056/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFA, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L206">.2066/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFB, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L207">.2076/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFF, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L208">.2086/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=write_device" class="sref">write_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 6a href="+code=reg" class="sref">reg6/a>,.6a href="+code=count" class="sref">count6/a>, 6a href="+code=buf" class="sref">buf6/a>);e
 L209">.2096/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFE, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L210">.2106/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFC, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L211">.2116/a>        6a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L212">.2126/a>        6a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L213">.2136/a>        return 6a href="+code=ret" class="sref">ret6/a>;e
 L214">.2146/a>}e
 L215">.2156/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_page_bulk_write" class="sref">pm860x_page_bulk_write6/a>);e
 L216">.2166/a>e
 L217">.2176/a>int.6a href="+code=pm860x_page_set_bits" class="sref">pm860x_page_set_bits6/a>(struct.6a href="+code=i2c_client" class="sref">i2c_client6/a> *6a href="+code=i2c" class="sref">i2c6/a>, int.6a href="+code=reg" class="sref">reg6/a>,e
 L218">.2186/a>                         unsigned char.6a href="+code=mask" class="sref">mask6/a>, unsigned char.6a href="+code=da a" class="sref">da a6/a>)e
 L219">.2196/a>{e
 L220">.2206/a>        unsigned char.6a href="+code=zero" class="sref">zero6/a>;e
 L221">.2216/a>        unsigned char.6a href="+code=value" class="sref">value6/a>;e
 L222">.2226/a>        int.6a href="+code=ret" class="sref">ret6/a>;e
 L223">.2236/a>e
 L224">.2246/a>        6a href="+code=i2c_lock_adapter" class="sref">i2c_lock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L225">.2256/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFA, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L226">.2266/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFB, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L227">.2276/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFF, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L228">.2286/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 6a href="+code=reg" class="sref">reg6/a>,.1, &6a href="+code=value" class="sref">value6/a>);e
 L229">.2296/a>        if (6a href="+code=ret" class="sref">ret6/a> < 0)e
 L230">.2306/a>                goto 6a href="+code=out" class="sref">out6/a>;e
 L231">.2316/a>        6a href="+code=value" class="sref">value6/a> &= ~6a href="+code=mask" class="sref">mask6/a>;e
 L232">.2326/a>        6a href="+code=value" class="sref">value6/a> |=.6a href="+code=da a" class="sref">da a6/a>;e
 L233">.2336/a>        6a href="+code=ret" class="sref">ret6/a> =.6a href="+code=write_device" class="sref">write_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 6a href="+code=reg" class="sref">reg6/a>,.1, &6a href="+code=value" class="sref">value6/a>);e
 L234">.2346/a>6a href="+code=out" class="sref">out6/a>:e
 L235">.2356/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFE, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L236">.2366/a>        6a href="+code=read_device" class="sref">read_device6/a>(6a href="+code=i2c" class="sref">i2c6/a>, 0xFC, 0, &6a href="+code=zero" class="sref">zero6/a>);e
 L237">.2376/a>        6a href="+code=i2c_unlock_adapter" class="sref">i2c_unlock_adapter6/a>(6a href="+code=i2c" class="sref">i2c6/a>->6a href="+code=adapter" class="sref">adapter6/a>);e
 L238">.2386/a>        return 6a href="+code=ret" class="sref">ret6/a>;e
 L239">.2396/a>}e
 L240">.2406/a>6a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL6/a>(6a href="+code=pm860x_page_set_bits" class="sref">pm860x_page_set_bits6/a>);e
 L241">.2416/a>
lxr.linux.no kindly hosted by Redpill Linpro AS6/a>, provider of Linux consulting and operations services since.1995.