[];va://spnstclass=" ge_s=arg= [ /spnstclass=" ge_logo" targs,fname">LXRdr vers/regulaype/[ //spns [ /!-- -- [];va:/://spnstid=" ge_pri} "[];va:/:/t xt ://jxCo aethod="+pri} =dr vers/regulaype/lp8788-buck.c ){ var a", re"tid="pri} _jxCo= [ :/ buttod;ux.no/submie"tclass="pri} " [];va:/ va:/://imget" href="../.stavascpri} // .4"[];;/spatho ];;/formho ];;a .4"[]; href="../linux+v];v0.2/drivers/regulator/lp8788-buck.c">.4"[];;img src="../.static/gfx/right.png" alt=">>">.4;/spatho.4;spat class="lxr_search">.4"[
.4"[];;input typ[0]hidden" nam[0]navtarget" od;t[0]">.4"[];;input typ[0]text" nam[0]search" id0]search">.4"[];;buttpthtyp[0]submit">Search.4"[];Prefso ];;/a>.4;/spatho"[]; ;;/divho"[]; ;;form ac/opt="ajax+*" method="post" onsubmit="return false;">.4;input typ[0]hidden" nam[0]ajax_lookup" id0]ajax_lookup" od;t[0]">."[]; ;;/formho."[]; ;;div class="headingbottpm">o ;div id0]file_contents"h
; ;1;/a>;spat class="comment">/*;/spatho; ;2;/a>;spat class="comment"> * TI LP8788 MFD - buck regulator driver;/spatho; ;3;/a>;spat class="comment"> *;/spatho; ;4;/a>;spat class="comment"> * Copyright 2012 Texas Instruments;/spatho; ;5;/a>;spat class="comment"> *;/spatho; ;6;/a>;spat class="comment"> * Author: Milo(Woogyom) Kim <milo.kim@ti.com>;/spatho; ;7;/a>;spat class="comment"> *;/spatho; ;8;/a>;spat class="comment"> * This program is free software; you cat redistribute it and/or modify;/spatho; ;9;/a>;spat class="comment"> * it under the terms of the GNU General Public License versopth2 as;/spatho; 18n.a>;spat class="comment"> * published by the Free Software Founda/opt.;/spatho; 11;/a>;spat class="comment"> *;/spatho; 12;/a>;spat class="comment"> */;/spatho; 13;/a>o; 14;/a>#include <linux/module.h;/a>>o; 15;/a>#include <linux/slab.h;/a>>o; 16;/a>#include <linux/err.h;/a>>o; 17;/a>#include <linux/platform_device.h;/a>>o; 18;/a>#include <linux/regulator/driver.h;/a>>o; 19;/a>#include <linux/mfd/lp8788.h;/a>>o; 20;/a>#include <linux/gpio.h;/a>>o; 21;/a>o; 22;/a>;spat class="comment">/* register address */;/spatho; 23;/a>#define;;a href="+code=LP8788_EN_BUCK" class="sref">LP8788_EN_BUCK;/a>                  0x0Co; 24;/a>#define;;a href="+code=LP8788_BUCK_DVS_SEL" class="sref">LP8788_BUCK_DVS_SEL;/a>             0x1Do; 25;/a>#define;;a href="+code=LP8788_BUCK1_VOUT0" class="sref">LP8788_BUCK1_VOUT0;/a>              0x1Eo; 26;/a>#define;;a href="+code=LP8788_BUCK1_VOUT1" class="sref">LP8788_BUCK1_VOUT1;/a>              0x1Fo; 27;/a>#define;;a href="+code=LP8788_BUCK1_VOUT2" class="sref">LP8788_BUCK1_VOUT2;/a>              0x20o; 28;/a>#define;;a href="+code=LP8788_BUCK1_VOUT3" class="sref">LP8788_BUCK1_VOUT3;/a>              0x21o; 29;/a>#define;;a href="+code=LP8788_BUCK2_VOUT0" class="sref">LP8788_BUCK2_VOUT0;/a>              0x22o; 30;/a>#define;;a href="+code=LP8788_BUCK2_VOUT1" class="sref">LP8788_BUCK2_VOUT1;/a>              0x23o; 31;/a>#define;;a href="+code=LP8788_BUCK2_VOUT2" class="sref">LP8788_BUCK2_VOUT2;/a>              0x24o; 32;/a>#define;;a href="+code=LP8788_BUCK2_VOUT3" class="sref">LP8788_BUCK2_VOUT3;/a>              0x25o; 33;/a>#define;;a href="+code=LP8788_BUCK3_VOUT" class="sref">LP8788_BUCK3_VOUT;/a>               0x26o; 34;/a>#define;;a href="+code=LP8788_BUCK4_VOUT" class="sref">LP8788_BUCK4_VOUT;/a>               0x27o; 35;/a>#define;;a href="+code=LP8788_BUCK1_TIMESTEP" class="sref">LP8788_BUCK1_TIMESTEP;/a>           0x28o; 36;/a>#define;;a href="+code=LP8788_BUCK_PWM" class="sref">LP8788_BUCK_PWM;/a>                 0x2Do; 37;/a>o; 38;/a>;spat class="comment">/* mask/shift bits */;/spatho; 39;/a>#define;;a href="+code=LP8788_EN_BUCK1_M" class="sref">LP8788_EN_BUCK1_M;/a>               ;a href="+code=BIT" class="sref">BIT;/a>(0)  ;spat class="comment">/* Addr 0Ch */;/spatho; 40;/a>#define;;a href="+code=LP8788_EN_BUCK2_M" class="sref">LP8788_EN_BUCK2_M;/a>               ;a href="+code=BIT" class="sref">BIT;/a>(1)o; 41;/a>#define;;a href="+code=LP8788_EN_BUCK3_M" class="sref">LP8788_EN_BUCK3_M;/a>               ;a href="+code=BIT" class="sref">BIT;/a>(2)o; 42;/a>#define;;a href="+code=LP8788_EN_BUCK4_M" class="sref">LP8788_EN_BUCK4_M;/a>               ;a href="+code=BIT" class="sref">BIT;/a>(3)o; 43;/a>#define;;a href="+code=LP8788_BUCK1_DVS_SEL_M" class="sref">LP8788_BUCK1_DVS_SEL_M;/a>          0x04    ;spat class="comment">/* Addr 1Dh */;/spatho; 44;/a>#define;;a href="+code=LP8788_BUCK1_DVS_M" class="sref">LP8788_BUCK1_DVS_M;/a>              0x03o; 45;/a>#define;;a href="+code=LP8788_BUCK1_DVS_S" class="sref">LP8788_BUCK1_DVS_S;/a>              0o; 46;/a>#define;;a href="+code=LP8788_BUCK2_DVS_SEL_M" class="sref">LP8788_BUCK2_DVS_SEL_M;/a>          0x40o; 47;/a>#define;;a href="+code=LP8788_BUCK2_DVS_M" class="sref">LP8788_BUCK2_DVS_M;/a>              0x30o; 48;/a>#define;;a href="+code=LP8788_BUCK2_DVS_S" class="sref">LP8788_BUCK2_DVS_S;/a>              4o; 49;/a>#define;;a href="+code=LP8788_BUCK1_DVS_I2C" class="sref">LP8788_BUCK1_DVS_I2C;/a>            ;a href="+code=BIT" class="sref">BIT;/a>(2)o; 50;/a>#define;;a href="+code=LP8788_BUCK2_DVS_I2C" class="sref">LP8788_BUCK2_DVS_I2C;/a>            ;a href="+code=BIT" class="sref">BIT;/a>(6)o; 51;/a>#define;;a href="+code=LP8788_BUCK1_DVS_PIN" class="sref">LP8788_BUCK1_DVS_PIN;/a>            (0 << 2)o; 52;/a>#define;;a href="+code=LP8788_BUCK2_DVS_PIN" class="sref">LP8788_BUCK2_DVS_PIN;/a>            (0 << 6)o; 53;/a>#define;;a href="+code=LP8788_VOUT_M" class="sref">LP8788_VOUT_M;/a>                   0x1F    ;spat class="comment">/* Addr 1Eh ~ 27h */;/spatho; 54;/a>#define;;a href="+code=LP8788_STARTUP_TIME_M" class="sref">LP8788_STARTUP_TIME_M;/a>           0xF8    ;spat class="comment">/* Addr 28h ~ 2Bh */;/spatho; 55;/a>#define;;a href="+code=LP8788_STARTUP_TIME_S" class="sref">LP8788_STARTUP_TIME_S;/a>           3o; 56;/a>#define;;a href="+code=LP8788_FPWM_BUCK1_M" class="sref">LP8788_FPWM_BUCK1_M;/a>             ;a href="+code=BIT" class="sref">BIT;/a>(0)  ;spat class="comment">/* Addr 2Dh */;/spatho; 57;/a>#define;;a href="+code=LP8788_FPWM_BUCK1_S" class="sref">LP8788_FPWM_BUCK1_S;/a>             0o; 58;/a>#define;;a href="+code=LP8788_FPWM_BUCK2_M" class="sref">LP8788_FPWM_BUCK2_M;/a>             ;a href="+code=BIT" class="sref">BIT;/a>(1)o; 59;/a>#define;;a href="+code=LP8788_FPWM_BUCK2_S" class="sref">LP8788_FPWM_BUCK2_S;/a>             1o; 60;/a>#define;;a href="+code=LP8788_FPWM_BUCK3_M" class="sref">LP8788_FPWM_BUCK3_M;/a>             ;a href="+code=BIT" class="sref">BIT;/a>(2)o; 61;/a>#define;;a href="+code=LP8788_FPWM_BUCK3_S" class="sref">LP8788_FPWM_BUCK3_S;/a>             2o; 62;/a>#define;;a href="+code=LP8788_FPWM_BUCK4_M" class="sref">LP8788_FPWM_BUCK4_M;/a>             ;a href="+code=BIT" class="sref">BIT;/a>(3)o; 63;/a>#define;;a href="+code=LP8788_FPWM_BUCK4_S" class="sref">LP8788_FPWM_BUCK4_S;/a>             3o; 64;/a>o; 65;/a>#define;;a href="+code=INVALID_ADDR" class="sref">INVALID_ADDR;/a>                    0xFFo; 66;/a>#define;;a href="+code=LP8788_FORCE_PWM" class="sref">LP8788_FORCE_PWM;/a>                1o; 67;/a>#define;;a href="+code=LP8788_AUTO_PWM" class="sref">LP8788_AUTO_PWM;/a>                 0o; 68;/a>#define;;a href="+code=PIN_LOW" class="sref">PIN_LOW;/a>                         0o; 69;/a>#define;;a href="+code=PIN_HIGH" class="sref">PIN_HIGH;/a>                        1o; 70;/a>#define;;a href="+code=ENABLE_TIME_USEC" class="sref">ENABLE_TIME_USEC;/a>                32o; 71;/a>o; 72;/a>#define;;a href="+code=BUCK_FPWM_MASK" class="sref">BUCK_FPWM_MASK;/a>(;a href="+code=x" class="sref">x;/a>)               (1 << (;a href="+code=x" class="sref">x;/a>))o; 73;/a>#define;;a href="+code=BUCK_FPWM_SHIFT" class="sref">BUCK_FPWM_SHIFT;/a>(;a href="+code=x" class="sref">x;/a>)              (;a href="+code=x" class="sref">x;/a>)o; 74;/a>o; 75;/a>enum;;a href="+code=lp8788_dvs_state" class="sref">lp8788_dvs_state;/a> {o; 76;/a>        ;a href="+code=DVS_LOW" class="sref">DVS_LOW;/a>  = ;a href="+code=GPIOF_OUT_INIT_LOW" class="sref">GPIOF_OUT_INIT_LOW;/a>,o; 77;/a>        ;a href="+code=DVS_HIGH" class="sref">DVS_HIGH;/a> = ;a href="+code=GPIOF_OUT_INIT_HIGH" class="sref">GPIOF_OUT_INIT_HIGH;/a>,o; 78;/a>};o; 79;/a>o; 80;/a>enum;;a href="+code=lp8788_dvs_mode" class="sref">lp8788_dvs_mode;/a> {o; 81;/a>        ;a href="+code=REGISTER" class="sref">REGISTER;/a>,o; 82;/a>        ;a href="+code=EXTPIN" class="sref">EXTPIN;/a>,o; 83;/a>};o; 84;/a>o; 85;/a>enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> {o; 86;/a>        ;a href="+code=BUCK1" class="sref">BUCK1;/a>,o; 87;/a>        ;a href="+code=BUCK2" class="sref">BUCK2;/a>,o; 88;/a>        ;a href="+code=BUCK3" class="sref">BUCK3;/a>,o; 89;/a>        ;a href="+code=BUCK4" class="sref">BUCK4;/a>,o; 90;/a>};o; 91;/a>o; 92;/a>struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> {o; 93;/a>        struct;;a href="+code=lp8788" class="sref">lp8788;/a> *;a href="+code=lp" class="sref">lp;/a>;o; 94;/a>        struct;;a href="+code=regulator_dev" class="sref">regulator_dev;/a> *;a href="+code=regulator" class="sref">regulator;/a>;o; 95;/a>        void *;a href="+code=dvs" class="sref">dvs;/a>;o; 96;/a>};o; 97;/a>o; 98;/a>;spat class="comment">/* BUCK 1 ~ 4 voltage table */;/spatho; 99;/a>static const int;;a href="+code=lp8788_buck_vtbl" class="sref">lp8788_buck_vtbl;/a>[] = {o;100;/a>         500000,; 800000,; 850000,; 900000,; 950000,;1000000,;1050000,;1100000,o;101;/a>        1150000,;1200000,;1250000,;1300000,;1350000,;1400000,;1450000,;1500000,o;102;/a>        1550000,;1600000,;1650000,;1700000,;1750000,;1800000,;1850000,;1900000,o;103;/a>        1950000,;2000000,o;104;/a>};o;105;/a>o;106;/a>static void ;a href="+code=lp8788_buck1_set_dvs" class="sref">lp8788_buck1_set_dvs;/a>(struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a>)o;107;/a>{o;108;/a>        struct;;a href="+code=lp8788_buck1_dvs" class="sref">lp8788_buck1_dvs;/a> *;a href="+code=dvs" class="sref">dvs;/a> = (struct;;a href="+code=lp8788_buck1_dvs" class="sref">lp8788_buck1_dvs;/a> *);a href="+code=buck" class="sref">buck;/a>->;a href="+code=dvs" class="sref">dvs;/a>;o;109;/a>        enum;;a href="+code=lp8788_dvs_state" class="sref">lp8788_dvs_state;/a> ;a href="+code=pinstate" class="sref">pinstate;/a>;o;118n.a>o;111;/a>        if (!;a href="+code=dvs" class="sref">dvs;/a>)o;112;/a>                return;o;113;/a>o;114;/a>        ;a href="+code=pinstate" class="sref">pinstate;/a> = ;a href="+code=dvs" class="sref">dvs;/a>->;a href="+code=vsel" class="sref">vsel;/a> == ;a href="+code=DVS_SEL_V0" class="sref">DVS_SEL_V0;/a> ? ;a href="+code=DVS_LOW" class="sref">DVS_LOW;/a> : ;a href="+code=DVS_HIGH" class="sref">DVS_HIGH;/a>;o;115;/a>        if (;a href="+code=gpio_is_valid" class="sref">gpio_is_valid;/a>(;a href="+code=dvs" class="sref">dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>))o;116;/a>                ;a href="+code=gpio_set_od;t[" class="sref">gpio_set_od;t[;/a>(;a href="+code=dvs" class="sref">dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>, ;a href="+code=pinstate" class="sref">pinstate;/a>);o;117;/a>}o;118;/a>o;119;/a>static void ;a href="+code=lp8788_buck2_set_dvs" class="sref">lp8788_buck2_set_dvs;/a>(struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a>)o;120;/a>{o;121;/a>        struct;;a href="+code=lp8788_buck2_dvs" class="sref">lp8788_buck2_dvs;/a> *;a href="+code=dvs" class="sref">dvs;/a> = (struct;;a href="+code=lp8788_buck2_dvs" class="sref">lp8788_buck2_dvs;/a> *);a href="+code=buck" class="sref">buck;/a>->;a href="+code=dvs" class="sref">dvs;/a>;o;122;/a>        enum;;a href="+code=lp8788_dvs_state" class="sref">lp8788_dvs_state;/a> ;a href="+code=pin1" class="sref">pin1;/a>, ;a href="+code=pin2" class="sref">pin2;/a>;o;123;/a>o;124;/a>        if (!;a href="+code=dvs" class="sref">dvs;/a>)o;125;/a>                return;o;126;/a>o;127;/a>        switch (;a href="+code=dvs" class="sref">dvs;/a>->;a href="+code=vsel" class="sref">vsel;/a>) {o;128;/a>        case;;a href="+code=DVS_SEL_V0" class="sref">DVS_SEL_V0;/a>:o;129;/a>                ;a href="+code=pin1" class="sref">pin1;/a> = ;a href="+code=DVS_LOW" class="sref">DVS_LOW;/a>;o;130;/a>                ;a href="+code=pin2" class="sref">pin2;/a> = ;a href="+code=DVS_LOW" class="sref">DVS_LOW;/a>;o;131;/a>                break;o;132;/a>        case;;a href="+code=DVS_SEL_V1" class="sref">DVS_SEL_V1;/a>:o;133;/a>                ;a href="+code=pin1" class="sref">pin1;/a> = ;a href="+code=DVS_HIGH" class="sref">DVS_HIGH;/a>;o;134;/a>                ;a href="+code=pin2" class="sref">pin2;/a> = ;a href="+code=DVS_LOW" class="sref">DVS_LOW;/a>;o;135;/a>                break;o;136;/a>        case;;a href="+code=DVS_SEL_V2" class="sref">DVS_SEL_V2;/a>:o;137;/a>                ;a href="+code=pin1" class="sref">pin1;/a> = ;a href="+code=DVS_LOW" class="sref">DVS_LOW;/a>;o;138;/a>                ;a href="+code=pin2" class="sref">pin2;/a> = ;a href="+code=DVS_HIGH" class="sref">DVS_HIGH;/a>;o;139;/a>                break;o;140;/a>        case;;a href="+code=DVS_SEL_V3" class="sref">DVS_SEL_V3;/a>:o;141;/a>                ;a href="+code=pin1" class="sref">pin1;/a> = ;a href="+code=DVS_HIGH" class="sref">DVS_HIGH;/a>;o;142;/a>                ;a href="+code=pin2" class="sref">pin2;/a> = ;a href="+code=DVS_HIGH" class="sref">DVS_HIGH;/a>;o;143;/a>                break;o;144;/a>        default:o;145;/a>                return;o;146;/a>        }o;147;/a>o;148;/a>        if (;a href="+code=gpio_is_valid" class="sref">gpio_is_valid;/a>(;a href="+code=dvs" class="sref">dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>[0]))o;149;/a>                ;a href="+code=gpio_set_od;t[" class="sref">gpio_set_od;t[;/a>(;a href="+code=dvs" class="sref">dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>[0], ;a href="+code=pin1" class="sref">pin1;/a>);o;158n.a>o;151;/a>        if (;a href="+code=gpio_is_valid" class="sref">gpio_is_valid;/a>(;a href="+code=dvs" class="sref">dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>[1]))o;152;/a>                ;a href="+code=gpio_set_od;t[" class="sref">gpio_set_od;t[;/a>(;a href="+code=dvs" class="sref">dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>[1], ;a href="+code=pin2" class="sref">pin2;/a>);o;153;/a>}o;154;/a>o;155;/a>static void ;a href="+code=lp8788_set_dvs" class="sref">lp8788_set_dvs;/a>(struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a>, enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a>)o;156;/a>{o;157;/a>        switch (;a href="+code=id" class="sref">id;/a>) {o;158;/a>        case;;a href="+code=BUCK1" class="sref">BUCK1;/a>:o;159;/a>                ;a href="+code=lp8788_buck1_set_dvs" class="sref">lp8788_buck1_set_dvs;/a>(;a href="+code=buck" class="sref">buck;/a>);o;160;/a>                break;o;161;/a>        case;;a href="+code=BUCK2" class="sref">BUCK2;/a>:o;162;/a>                ;a href="+code=lp8788_buck2_set_dvs" class="sref">lp8788_buck2_set_dvs;/a>(;a href="+code=buck" class="sref">buck;/a>);o;163;/a>                break;o;164;/a>        default:o;165;/a>                break;o;166;/a>        }o;167;/a>}o;168;/a>o;169;/a>static enum;;a href="+code=lp8788_dvs_mode" class="sref">lp8788_dvs_mode;/a>o;170;/a>;a href="+code=lp8788_get_buck_dvs_ctrl_mode" class="sref">lp8788_get_buck_dvs_ctrl_mode;/a>(struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a>, enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a>)o;171;/a>{o;172;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=od;" class="sref">val;/a>, ;a href="+code=mask" class="sref">mask;/a>;o;173;/a>o;174;/a>        switch (;a href="+code=id" class="sref">id;/a>) {o;175;/a>        case;;a href="+code=BUCK1" class="sref">BUCK1;/a>:o;176;/a>                ;a href="+code=mask" class="sref">mask;/a> = ;a href="+code=LP8788_BUCK1_DVS_SEL_M" class="sref">LP8788_BUCK1_DVS_SEL_M;/a>;o;177;/a>                break;o;178;/a>        case;;a href="+code=BUCK2" class="sref">BUCK2;/a>:o;179;/a>                ;a href="+code=mask" class="sref">mask;/a> = ;a href="+code=LP8788_BUCK2_DVS_SEL_M" class="sref">LP8788_BUCK2_DVS_SEL_M;/a>;o;180;/a>                break;o;181;/a>        default:o;182;/a>                return ;a href="+code=REGISTER" class="sref">REGISTER;/a>;o;183;/a>        }o;184;/a>o;185;/a>        ;a href="+code=lp8788_read_byte" class="sref">lp8788_read_byte;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=LP8788_BUCK_DVS_SEL" class="sref">LP8788_BUCK_DVS_SEL;/a>, &;a href="+code=vd;" class="sref">val;/a>);o;186;/a>o;187;/a>        return ;a href="+code=vd;" class="sref">val;/a> & ;a href="+code=mask" class="sref">mask;/a> ? ;a href="+code=REGISTER" class="sref">REGISTER;/a> : ;a href="+code=EXTPIN" class="sref">EXTPIN;/a>;o;188;/a>}o;189;/a>o;190;/a>static ;a href="+code=boo;" class="sref">boo;;/a> ;a href="+code=lp8788_is_valid_buck_addr" class="sref">lp8788_is_valid_buck_addr;/a>(;a href="+code=u8" class="sref">u8;/a> ;a href="+code=addr" class="sref">addr;/a>)o;191;/a>{o;192;/a>        switch (;a href="+code=addr" class="sref">addr;/a>) {o;193;/a>        case;;a href="+code=LP8788_BUCK1_VOUT0" class="sref">LP8788_BUCK1_VOUT0;/a>:o;194;/a>        case;;a href="+code=LP8788_BUCK1_VOUT1" class="sref">LP8788_BUCK1_VOUT1;/a>:o;195;/a>        case;;a href="+code=LP8788_BUCK1_VOUT2" class="sref">LP8788_BUCK1_VOUT2;/a>:o;196;/a>        case;;a href="+code=LP8788_BUCK1_VOUT3" class="sref">LP8788_BUCK1_VOUT3;/a>:o;197;/a>        case;;a href="+code=LP8788_BUCK2_VOUT0" class="sref">LP8788_BUCK2_VOUT0;/a>:o;198;/a>        case;;a href="+code=LP8788_BUCK2_VOUT1" class="sref">LP8788_BUCK2_VOUT1;/a>:o;199;/a>        case;;a href="+code=LP8788_BUCK2_VOUT2" class="sref">LP8788_BUCK2_VOUT2;/a>:o;200;/a>        case;;a href="+code=LP8788_BUCK2_VOUT3" class="sref">LP8788_BUCK2_VOUT3;/a>:o;201;/a>                return ;a href="+code=trt[" class="sref">trt[;/a>;o;202;/a>        default:o;203;/a>                return ;a href="+code=fals[" class="sref">fals[;/a>;o;204;/a>        }o;205;/a>}o;206;/a>o;207;/a>static ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=lp8788_select_buck_vout_addr" class="sref">lp8788_select_buck_vout_addr;/a>(struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a>,o;208;/a>                                        enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a>)o;209;/a>{o;210;/a>        enum;;a href="+code=lp8788_dvs_mode" class="sref">lp8788_dvs_mode;/a> ;a href="+code=mode" class="sref">mode;/a> = ;a href="+code=lp8788_get_buck_dvs_ctrl_mode" class="sref">lp8788_get_buck_dvs_ctrl_mode;/a>(;a href="+code=buck" class="sref">buck;/a>, ;a href="+code=id" class="sref">id;/a>);o;211;/a>        struct;;a href="+code=lp8788_buck1_dvs" class="sref">lp8788_buck1_dvs;/a> *;a href="+code=b1_dvs" class="sref">b1_dvs;/a>;o;212;/a>        struct;;a href="+code=lp8788_buck2_dvs" class="sref">lp8788_buck2_dvs;/a> *;a href="+code=b2_dvs" class="sref">b2_dvs;/a>;o;213;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=od;" class="sref">val;/a>, ;a href="+code=idx" class="sref">idx;/a>, ;a href="+code=addr" class="sref">addr;/a>;o;214;/a>        int;;a href="+code=pin1" class="sref">pin1;/a>, ;a href="+code=pin2" class="sref">pin2;/a>;o;215;/a>o;216;/a>        switch (;a href="+code=id" class="sref">id;/a>) {o;217;/a>        case;;a href="+code=BUCK1" class="sref">BUCK1;/a>:o;218;/a>                if (;a href="+code=mode" class="sref">mode;/a> == ;a href="+code=EXTPIN" class="sref">EXTPIN;/a>) {o;219;/a>                        ;a href="+code=b1_dvs" class="sref">b1_dvs;/a> = (struct;;a href="+code=lp8788_buck1_dvs" class="sref">lp8788_buck1_dvs;/a> *);a href="+code=buck" class="sref">buck;/a>->;a href="+code=dvs" class="sref">dvs;/a>;o;220;/a>                        if (!;a href="+code=b1_dvs" class="sref">b1_dvs;/a>)o;221;/a>                                goto;;a href="+code=err" class="sref">err;/a>;o;222;/a>o;223;/a>                        ;a href="+code=idx" class="sref">idx;/a> = ;a href="+code=gpio_get_od;t[" class="sref">gpio_get_od;t[;/a>(;a href="+code=b1_dvs" class="sref">b1_dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>) ? 1 : 0;o;224;/a>                } els[ {o;225;/a>                        ;a href="+code=lp8788_read_byte" class="sref">lp8788_read_byte;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=LP8788_BUCK_DVS_SEL" class="sref">LP8788_BUCK_DVS_SEL;/a>, &;a href="+code=vd;" class="sref">val;/a>);o;226;/a>                        ;a href="+code=idx" class="sref">idx;/a> = (;a href="+code=vd;" class="sref">val;/a> & ;a href="+code=LP8788_BUCK1_DVS_M" class="sref">LP8788_BUCK1_DVS_M;/a>) >> ;a href="+code=LP8788_BUCK1_DVS_S" class="sref">LP8788_BUCK1_DVS_S;/a>;o;227;/a>                }o;228;/a>                ;a href="+code=addr" class="sref">addr;/a> = ;a href="+code=LP8788_BUCK1_VOUT0" class="sref">LP8788_BUCK1_VOUT0;/a> + ;a href="+code=idx" class="sref">idx;/a>;o;229;/a>                break;o;230;/a>        case;;a href="+code=BUCK2" class="sref">BUCK2;/a>:o;231;/a>                if (;a href="+code=mode" class="sref">mode;/a> == ;a href="+code=EXTPIN" class="sref">EXTPIN;/a>) {o;232;/a>                        ;a href="+code=b2_dvs" class="sref">b2_dvs;/a> = (struct;;a href="+code=lp8788_buck2_dvs" class="sref">lp8788_buck2_dvs;/a> *);a href="+code=buck" class="sref">buck;/a>->;a href="+code=dvs" class="sref">dvs;/a>;o;233;/a>                        if (!;a href="+code=b2_dvs" class="sref">b2_dvs;/a>)o;234;/a>                                goto;;a href="+code=err" class="sref">err;/a>;o;235;/a>o;236;/a>                        ;a href="+code=pin1" class="sref">pin1;/a> = ;a href="+code=gpio_get_od;t[" class="sref">gpio_get_od;t[;/a>(;a href="+code=b2_dvs" class="sref">b2_dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>[0]);o;237;/a>                        ;a href="+code=pin2" class="sref">pin2;/a> = ;a href="+code=gpio_get_od;t[" class="sref">gpio_get_od;t[;/a>(;a href="+code=b2_dvs" class="sref">b2_dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>[1]);o;238;/a>o;239;/a>                        if (;a href="+code=pin1" class="sref">pin1;/a> == ;a href="+code=PIN_LOW" class="sref">PIN_LOW;/a> && ;a href="+code=pin2" class="sref">pin2;/a> == ;a href="+code=PIN_LOW" class="sref">PIN_LOW;/a>)o;240;/a>                                ;a href="+code=idx" class="sref">idx;/a> = 0;o;241;/a>                        els[ if (;a href="+code=pin1" class="sref">pin1;/a> == ;a href="+code=PIN_LOW" class="sref">PIN_LOW;/a> && ;a href="+code=pin2" class="sref">pin2;/a> == ;a href="+code=PIN_HIGH" class="sref">PIN_HIGH;/a>)o;242;/a>                                ;a href="+code=idx" class="sref">idx;/a> = 2;o;243;/a>                        els[ if (;a href="+code=pin1" class="sref">pin1;/a> == ;a href="+code=PIN_HIGH" class="sref">PIN_HIGH;/a> && ;a href="+code=pin2" class="sref">pin2;/a> == ;a href="+code=PIN_LOW" class="sref">PIN_LOW;/a>)o;244;/a>                                ;a href="+code=idx" class="sref">idx;/a> = 1;o;245;/a>                        els[o;246;/a>                                ;a href="+code=idx" class="sref">idx;/a> = 3;o;247;/a>                } els[ {o;248;/a>                        ;a href="+code=lp8788_read_byte" class="sref">lp8788_read_byte;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=LP8788_BUCK_DVS_SEL" class="sref">LP8788_BUCK_DVS_SEL;/a>, &;a href="+code=vd;" class="sref">val;/a>);o;249;/a>                        ;a href="+code=idx" class="sref">idx;/a> = (;a href="+code=vd;" class="sref">val;/a> & ;a href="+code=LP8788_BUCK2_DVS_M" class="sref">LP8788_BUCK2_DVS_M;/a>) >> ;a href="+code=LP8788_BUCK2_DVS_S" class="sref">LP8788_BUCK2_DVS_S;/a>;o;250;/a>                }o;251;/a>                ;a href="+code=addr" class="sref">addr;/a> = ;a href="+code=LP8788_BUCK2_VOUT0" class="sref">LP8788_BUCK2_VOUT0;/a> + ;a href="+code=idx" class="sref">idx;/a>;o;252;/a>                break;o;253;/a>        default:o;254;/a>                goto;;a href="+code=err" class="sref">err;/a>;o;255;/a>        }o;256;/a>o;257;/a>        return ;a href="+code=addr" class="sref">addr;/a>;o;258;/a>;a href="+code=err" class="sref">err;/a>:o;259;/a>        return ;a href="+code=INVALID_ADDR" class="sref">INVALID_ADDR;/a>;o;260;/a>}o;261;/a>o;262;/a>static int;;a href="+code=lp8788_buck12_set_voltage_sel" class="sref">lp8788_buck12_set_voltage_sel;/a>(struct;;a href="+code=regulator_dev" class="sref">regulator_dev;/a> *;a href="+code=rdev" class="sref">rdev;/a>,o;263;/a>                                        unsigned ;a href="+code=selector" class="sref">selector;/a>)o;264;/a>{o;265;/a>        struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a> = ;a href="+code=rdev_get_drvdata" class="sref">rdev_get_drvdata;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;266;/a>        enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a> = ;a href="+code=rdev_get_id" class="sref">rdev_get_id;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;267;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=addr" class="sref">addr;/a>;o;268;/a>o;269;/a>        if (;a href="+code=buck" class="sref">buck;/a>->;a href="+code=dvs" class="sref">dvs;/a>)o;270;/a>                ;a href="+code=lp8788_set_dvs" class="sref">lp8788_set_dvs;/a>(;a href="+code=buck" class="sref">buck;/a>, ;a href="+code=id" class="sref">id;/a>);o;271;/a>o;272;/a>        ;a href="+code=addr" class="sref">addr;/a> = ;a href="+code=lp8788_select_buck_vout_addr" class="sref">lp8788_select_buck_vout_addr;/a>(;a href="+code=buck" class="sref">buck;/a>, ;a href="+code=id" class="sref">id;/a>);o;273;/a>        if (!;a href="+code=lp8788_is_valid_buck_addr" class="sref">lp8788_is_valid_buck_addr;/a>(;a href="+code=addr" class="sref">addr;/a>))o;274;/a>                return -;a href="+code=EINVAL" class="sref">EINVAL;/a>;o;275;/a>o;276;/a>        return ;a href="+code=lp8788_update_bits" class="sref">lp8788_update_bits;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=addr" class="sref">addr;/a>, ;a href="+code=LP8788_VOUT_M" class="sref">LP8788_VOUT_M;/a>, ;a href="+code=selector" class="sref">selector;/a>);o;277;/a>}o;278;/a>o;279;/a>static int;;a href="+code=lp8788_buck12_get_voltage_sel" class="sref">lp8788_buck12_get_voltage_sel;/a>(struct;;a href="+code=regulator_dev" class="sref">regulator_dev;/a> *;a href="+code=rdev" class="sref">rdev;/a>)o;280;/a>{o;281;/a>        struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a> = ;a href="+code=rdev_get_drvdata" class="sref">rdev_get_drvdata;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;282;/a>        enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a> = ;a href="+code=rdev_get_id" class="sref">rdev_get_id;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;283;/a>        int;;a href="+code=ret" class="sref">ret;/a>;o;284;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=od;" class="sref">val;/a>, ;a href="+code=addr" class="sref">addr;/a>;o;285;/a>o;286;/a>        ;a href="+code=addr" class="sref">addr;/a> = ;a href="+code=lp8788_select_buck_vout_addr" class="sref">lp8788_select_buck_vout_addr;/a>(;a href="+code=buck" class="sref">buck;/a>, ;a href="+code=id" class="sref">id;/a>);o;287;/a>        if (!;a href="+code=lp8788_is_valid_buck_addr" class="sref">lp8788_is_valid_buck_addr;/a>(;a href="+code=addr" class="sref">addr;/a>))o;288;/a>                return -;a href="+code=EINVAL" class="sref">EINVAL;/a>;o;289;/a>o;290;/a>        ;a href="+code=ret" class="sref">ret;/a> = ;a href="+code=lp8788_read_byte" class="sref">lp8788_read_byte;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=addr" class="sref">addr;/a>, &;a href="+code=vd;" class="sref">val;/a>);o;291;/a>        if (;a href="+code=ret" class="sref">ret;/a>)o;292;/a>                return ;a href="+code=ret" class="sref">ret;/a>;o;293;/a>o;294;/a>        return ;a href="+code=vd;" class="sref">val;/a> & ;a href="+code=LP8788_VOUT_M" class="sref">LP8788_VOUT_M;/a>;o;295;/a>}o;296;/a>o;297;/a>static int;;a href="+code=lp8788_buck_enable_time" class="sref">lp8788_buck_enable_time;/a>(struct;;a href="+code=regulator_dev" class="sref">regulator_dev;/a> *;a href="+code=rdev" class="sref">rdev;/a>)o;298;/a>{o;299;/a>        struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a> = ;a href="+code=rdev_get_drvdata" class="sref">rdev_get_drvdata;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;300;/a>        enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a> = ;a href="+code=rdev_get_id" class="sref">rdev_get_id;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;301;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=od;" class="sref">val;/a>, ;a href="+code=addr" class="sref">addr;/a> = ;a href="+code=LP8788_BUCK1_TIMESTEP" class="sref">LP8788_BUCK1_TIMESTEP;/a> + ;a href="+code=id" class="sref">id;/a>;o;302;/a>o;303;/a>        if (;a href="+code=lp8788_read_byte" class="sref">lp8788_read_byte;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=addr" class="sref">addr;/a>, &;a href="+code=vd;" class="sref">val;/a>))o;304;/a>                return -;a href="+code=EINVAL" class="sref">EINVAL;/a>;o;305;/a>o;306;/a>        ;a href="+code=vd;" class="sref">val;/a> = (;a href="+code=vd;" class="sref">val;/a> & ;a href="+code=LP8788_STARTUP_TIME_M" class="sref">LP8788_STARTUP_TIME_M;/a>) >> ;a href="+code=LP8788_STARTUP_TIME_S" class="sref">LP8788_STARTUP_TIME_S;/a>;o;307;/a>o;308;/a>        return ;a href="+code=ENABLE_TIME_USEC" class="sref">ENABLE_TIME_USEC;/a> * ;a href="+code=vd;" class="sref">val;/a>;o;309;/a>}o;318n.a>o;311;/a>static int;;a href="+code=lp8788_buck_set_mode" class="sref">lp8788_buck_set_mode;/a>(struct;;a href="+code=regulator_dev" class="sref">regulator_dev;/a> *;a href="+code=rdev" class="sref">rdev;/a>, unsigned int;;a href="+code=mode" class="sref">mode;/a>)o;312;/a>{o;313;/a>        struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a> = ;a href="+code=rdev_get_drvdata" class="sref">rdev_get_drvdata;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;314;/a>        enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a> = ;a href="+code=rdev_get_id" class="sref">rdev_get_id;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;315;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=mask" class="sref">mask;/a>, ;a href="+code=vd;" class="sref">val;/a>;o;316;/a>o;317;/a>        ;a href="+code=mask" class="sref">mask;/a> = ;a href="+code=BUCK_FPWM_MASK" class="sref">BUCK_FPWM_MASK;/a>(;a href="+code=id" class="sref">id;/a>);o;318;/a>        switch (;a href="+code=mode" class="sref">mode;/a>) {o;319;/a>        case;;a href="+code=REGULATOR_MODE_FAST" class="sref">REGULATOR_MODE_FAST;/a>:o;320;/a>                ;a href="+code=vd;" class="sref">val;/a> = ;a href="+code=LP8788_FORCE_PWM" class="sref">LP8788_FORCE_PWM;/a> << ;a href="+code=BUCK_FPWM_SHIFT" class="sref">BUCK_FPWM_SHIFT;/a>(;a href="+code=id" class="sref">id;/a>);o;321;/a>                break;o;322;/a>        case;;a href="+code=REGULATOR_MODE_NORMAL" class="sref">REGULATOR_MODE_NORMAL;/a>:o;323;/a>                ;a href="+code=vd;" class="sref">val;/a> = ;a href="+code=LP8788_AUTO_PWM" class="sref">LP8788_AUTO_PWM;/a> << ;a href="+code=BUCK_FPWM_SHIFT" class="sref">BUCK_FPWM_SHIFT;/a>(;a href="+code=id" class="sref">id;/a>);o;324;/a>                break;o;325;/a>        default:o;326;/a>                return -;a href="+code=EINVAL" class="sref">EINVAL;/a>;o;327;/a>        }o;328;/a>o;329;/a>        return ;a href="+code=lp8788_update_bits" class="sref">lp8788_update_bits;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=LP8788_BUCK_PWM" class="sref">LP8788_BUCK_PWM;/a>, ;a href="+code=mask" class="sref">mask;/a>, ;a href="+code=vd;" class="sref">val;/a>);o;330;/a>}o;331;/a>o;332;/a>static unsigned int;;a href="+code=lp8788_buck_get_mode" class="sref">lp8788_buck_get_mode;/a>(struct;;a href="+code=regulator_dev" class="sref">regulator_dev;/a> *;a href="+code=rdev" class="sref">rdev;/a>)o;333;/a>{o;334;/a>        struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a> = ;a href="+code=rdev_get_drvdata" class="sref">rdev_get_drvdata;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;335;/a>        enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a> = ;a href="+code=rdev_get_id" class="sref">rdev_get_id;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;336;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=od;" class="sref">val;/a>;o;337;/a>        int;;a href="+code=ret" class="sref">ret;/a>;o;338;/a>o;339;/a>        ;a href="+code=ret" class="sref">ret;/a> = ;a href="+code=lp8788_read_byte" class="sref">lp8788_read_byte;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=LP8788_BUCK_PWM" class="sref">LP8788_BUCK_PWM;/a>, &;a href="+code=vd;" class="sref">val;/a>);o;340;/a>        if (;a href="+code=ret" class="sref">ret;/a>)o;341;/a>                return ;a href="+code=ret" class="sref">ret;/a>;o;342;/a>o;343;/a>        return ;a href="+code=vd;" class="sref">val;/a> & ;a href="+code=BUCK_FPWM_MASK" class="sref">BUCK_FPWM_MASK;/a>(;a href="+code=id" class="sref">id;/a>) ?o;344;/a>                                ;a href="+code=REGULATOR_MODE_FAST" class="sref">REGULATOR_MODE_FAST;/a> : ;a href="+code=REGULATOR_MODE_NORMAL" class="sref">REGULATOR_MODE_NORMAL;/a>;o;345;/a>}o;346;/a>o;347;/a>static struct;;a href="+code=regulator_ops" class="sref">regulator_ops;/a> ;a href="+code=lp8788_buck12_ops" class="sref">lp8788_buck12_ops;/a> = {o;348;/a>        .;a href="+code=list_voltage" class="sref">list_voltage;/a> = ;a href="+code=regulator_list_voltage_table" class="sref">regulator_list_voltage_table;/a>,o;349;/a>        .;a href="+code=map_voltage" class="sref">map_voltage;/a> = ;a href="+code=regulator_map_voltage_ascend" class="sref">regulator_map_voltage_ascend;/a>,o;350;/a>        .;a href="+code=set_voltage_sel" class="sref">set_voltage_sel;/a> = ;a href="+code=lp8788_buck12_set_voltage_sel" class="sref">lp8788_buck12_set_voltage_sel;/a>,o;351;/a>        .;a href="+code=get_voltage_sel" class="sref">get_voltage_sel;/a> = ;a href="+code=lp8788_buck12_get_voltage_sel" class="sref">lp8788_buck12_get_voltage_sel;/a>,o;352;/a>        .;a href="+code=enable" class="sref">enable;/a> = ;a href="+code=regulator_enable_regmap" class="sref">regulator_enable_regmap;/a>,o;353;/a>        .;a href="+code=disable" class="sref">disable;/a> = ;a href="+code=regulator_disable_regmap" class="sref">regulator_disable_regmap;/a>,o;354;/a>        .;a href="+code=is_enabled" class="sref">is_enabled;/a> = ;a href="+code=regulator_is_enabled_regmap" class="sref">regulator_is_enabled_regmap;/a>,o;355;/a>        .;a href="+code=enable_time" class="sref">enable_time;/a> = ;a href="+code=lp8788_buck_enable_time" class="sref">lp8788_buck_enable_time;/a>,o;356;/a>        .;a href="+code=set_mode" class="sref">set_mode;/a> = ;a href="+code=lp8788_buck_set_mode" class="sref">lp8788_buck_set_mode;/a>,o;357;/a>        .;a href="+code=get_mode" class="sref">get_mode;/a> = ;a href="+code=lp8788_buck_get_mode" class="sref">lp8788_buck_get_mode;/a>,o;358;/a>};o;359;/a>o;360;/a>static struct;;a href="+code=regulator_ops" class="sref">regulator_ops;/a> ;a href="+code=lp8788_buck34_ops" class="sref">lp8788_buck34_ops;/a> = {o;361;/a>        .;a href="+code=list_voltage" class="sref">list_voltage;/a> = ;a href="+code=regulator_list_voltage_table" class="sref">regulator_list_voltage_table;/a>,o;362;/a>        .;a href="+code=map_voltage" class="sref">map_voltage;/a> = ;a href="+code=regulator_map_voltage_ascend" class="sref">regulator_map_voltage_ascend;/a>,o;363;/a>        .;a href="+code=set_voltage_sel" class="sref">set_voltage_sel;/a> = ;a href="+code=regulator_set_voltage_sel_regmap" class="sref">regulator_set_voltage_sel_regmap;/a>,o;364;/a>        .;a href="+code=get_voltage_sel" class="sref">get_voltage_sel;/a> = ;a href="+code=regulator_get_voltage_sel_regmap" class="sref">regulator_get_voltage_sel_regmap;/a>,o;365;/a>        .;a href="+code=enable" class="sref">enable;/a> = ;a href="+code=regulator_enable_regmap" class="sref">regulator_enable_regmap;/a>,o;366;/a>        .;a href="+code=disable" class="sref">disable;/a> = ;a href="+code=regulator_disable_regmap" class="sref">regulator_disable_regmap;/a>,o;367;/a>        .;a href="+code=is_enabled" class="sref">is_enabled;/a> = ;a href="+code=regulator_is_enabled_regmap" class="sref">regulator_is_enabled_regmap;/a>,o;368;/a>        .;a href="+code=enable_time" class="sref">enable_time;/a> = ;a href="+code=lp8788_buck_enable_time" class="sref">lp8788_buck_enable_time;/a>,o;369;/a>        .;a href="+code=set_mode" class="sref">set_mode;/a> = ;a href="+code=lp8788_buck_set_mode" class="sref">lp8788_buck_set_mode;/a>,o;370;/a>        .;a href="+code=get_mode" class="sref">get_mode;/a> = ;a href="+code=lp8788_buck_get_mode" class="sref">lp8788_buck_get_mode;/a>,o;371;/a>};o;372;/a>o;373;/a>static struct;;a href="+code=regulator_desc" class="sref">regulator_desc;/a> ;a href="+code=lp8788_buck_desc" class="sref">lp8788_buck_desc;/a>[] = {o;374;/a>        {o;375;/a>                .;a href="+code=nam[" class="sref">nam[;/a> = ;span class="string">"buck1",o;376;/a>                .;a href="+code=id" class="sref">id;/a> = ;a href="+code=BUCK1" class="sref">BUCK1;/a>,o;377;/a>                .;a href="+code=ops" class="sref">ops;/a> = &;a href="+code=lp8788_buck12_ops" class="sref">lp8788_buck12_ops;/a>,o;378;/a>                .;a href="+code=n_voltages" class="sref">n_voltages;/a> = ;a href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZE;/a>(;a href="+code=lp8788_buck_vtbl" class="sref">lp8788_buck_vtbl;/a>),o;379;/a>                .;a href="+code=volt_table" class="sref">volt_table;/a> = ;a href="+code=lp8788_buck_vtbl" class="sref">lp8788_buck_vtbl;/a>,o;380;/a>                .;a href="+code=type" class="sref">type;/a> = ;a href="+code=REGULATOR_VOLTAGE" class="sref">REGULATOR_VOLTAGE;/a>,o;381;/a>                .;a href="+code=owner" class="sref">owner;/a> = ;a href="+code=THIS_MODULE" class="sref">THIS_MODULE;/a>,o;382;/a>                .;a href="+code=enable_reg" class="sref">enable_reg;/a> = ;a href="+code=LP8788_EN_BUCK" class="sref">LP8788_EN_BUCK;/a>,o;383;/a>                .;a href="+code=enable_mask" class="sref">enable_mask;/a> = ;a href="+code=LP8788_EN_BUCK1_M" class="sref">LP8788_EN_BUCK1_M;/a>,o;384;/a>        },o;385;/a>        {o;386;/a>                .;a href="+code=nam[" class="sref">nam[;/a> = ;span class="string">"buck2",o;387;/a>                .;a href="+code=id" class="sref">id;/a> = ;a href="+code=BUCK2" class="sref">BUCK2;/a>,o;388;/a>                .;a href="+code=ops" class="sref">ops;/a> = &;a href="+code=lp8788_buck12_ops" class="sref">lp8788_buck12_ops;/a>,o;389;/a>                .;a href="+code=n_voltages" class="sref">n_voltages;/a> = ;a href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZE;/a>(;a href="+code=lp8788_buck_vtbl" class="sref">lp8788_buck_vtbl;/a>),o;390;/a>                .;a href="+code=volt_table" class="sref">volt_table;/a> = ;a href="+code=lp8788_buck_vtbl" class="sref">lp8788_buck_vtbl;/a>,o;391;/a>                .;a href="+code=type" class="sref">type;/a> = ;a href="+code=REGULATOR_VOLTAGE" class="sref">REGULATOR_VOLTAGE;/a>,o;392;/a>                .;a href="+code=owner" class="sref">owner;/a> = ;a href="+code=THIS_MODULE" class="sref">THIS_MODULE;/a>,o;393;/a>                .;a href="+code=enable_reg" class="sref">enable_reg;/a> = ;a href="+code=LP8788_EN_BUCK" class="sref">LP8788_EN_BUCK;/a>,o;394;/a>                .;a href="+code=enable_mask" class="sref">enable_mask;/a> = ;a href="+code=LP8788_EN_BUCK2_M" class="sref">LP8788_EN_BUCK2_M;/a>,o;395;/a>        },o;396;/a>        {o;397;/a>                .;a href="+code=nam[" class="sref">nam[;/a> = ;span class="string">"buck3",o;398;/a>                .;a href="+code=id" class="sref">id;/a> = ;a href="+code=BUCK3" class="sref">BUCK3;/a>,o;399;/a>                .;a href="+code=ops" class="sref">ops;/a> = &;a href="+code=lp8788_buck34_ops" class="sref">lp8788_buck34_ops;/a>,o;400;/a>                .;a href="+code=n_voltages" class="sref">n_voltages;/a> = ;a href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZE;/a>(;a href="+code=lp8788_buck_vtbl" class="sref">lp8788_buck_vtbl;/a>),o;401;/a>                .;a href="+code=volt_table" class="sref">volt_table;/a> = ;a href="+code=lp8788_buck_vtbl" class="sref">lp8788_buck_vtbl;/a>,o;402;/a>                .;a href="+code=type" class="sref">type;/a> = ;a href="+code=REGULATOR_VOLTAGE" class="sref">REGULATOR_VOLTAGE;/a>,o;403;/a>                .;a href="+code=owner" class="sref">owner;/a> = ;a href="+code=THIS_MODULE" class="sref">THIS_MODULE;/a>,o;404;/a>                .;a href="+code=vsel_reg" class="sref">vsel_reg;/a> = ;a href="+code=LP8788_BUCK3_VOUT" class="sref">LP8788_BUCK3_VOUT;/a>,o;405;/a>                .;a href="+code=vsel_mask" class="sref">vsel_mask;/a> = ;a href="+code=LP8788_VOUT_M" class="sref">LP8788_VOUT_M;/a>,o;406;/a>                .;a href="+code=enable_reg" class="sref">enable_reg;/a> = ;a href="+code=LP8788_EN_BUCK" class="sref">LP8788_EN_BUCK;/a>,o;407;/a>                .;a href="+code=enable_mask" class="sref">enable_mask;/a> = ;a href="+code=LP8788_EN_BUCK3_M" class="sref">LP8788_EN_BUCK3_M;/a>,o;408;/a>        },o;409;/a>        {o;410;/a>                .;a href="+code=nam[" class="sref">nam[;/a> = ;span class="string">"buck4",o;411;/a>                .;a href="+code=id" class="sref">id;/a> = ;a href="+code=BUCK4" class="sref">BUCK4;/a>,o;412;/a>                .;a href="+code=ops" class="sref">ops;/a> = &;a href="+code=lp8788_buck34_ops" class="sref">lp8788_buck34_ops;/a>,o;413;/a>                .;a href="+code=n_voltages" class="sref">n_voltages;/a> = ;a href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZE;/a>(;a href="+code=lp8788_buck_vtbl" class="sref">lp8788_buck_vtbl;/a>),o;414;/a>                .;a href="+code=volt_table" class="sref">volt_table;/a> = ;a href="+code=lp8788_buck_vtbl" class="sref">lp8788_buck_vtbl;/a>,o;415;/a>                .;a href="+code=type" class="sref">type;/a> = ;a href="+code=REGULATOR_VOLTAGE" class="sref">REGULATOR_VOLTAGE;/a>,o;416;/a>                .;a href="+code=owner" class="sref">owner;/a> = ;a href="+code=THIS_MODULE" class="sref">THIS_MODULE;/a>,o;417;/a>                .;a href="+code=vsel_reg" class="sref">vsel_reg;/a> = ;a href="+code=LP8788_BUCK4_VOUT" class="sref">LP8788_BUCK4_VOUT;/a>,o;418;/a>                .;a href="+code=vsel_mask" class="sref">vsel_mask;/a> = ;a href="+code=LP8788_VOUT_M" class="sref">LP8788_VOUT_M;/a>,o;419;/a>                .;a href="+code=enable_reg" class="sref">enable_reg;/a> = ;a href="+code=LP8788_EN_BUCK" class="sref">LP8788_EN_BUCK;/a>,o;420;/a>                .;a href="+code=enable_mask" class="sref">enable_mask;/a> = ;a href="+code=LP8788_EN_BUCK4_M" class="sref">LP8788_EN_BUCK4_M;/a>,o;421;/a>        },o;422;/a>};o;423;/a>o;424;/a>static int;;a href="+code=lp8788_dvs_gpio_request" class="sref">lp8788_dvs_gpio_request;/a>(struct;;a href="+code=platform_device" class="sref">platform_device;/a> *;a href="+code=pdev" class="sref">pdev;/a>,o;425;/a>                                struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a>,o;426;/a>                                enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a>)o;427;/a>{o;428;/a>        struct;;a href="+code=lp8788_platform_data" class="sref">lp8788_platform_data;/a> *;a href="+code=pdata" class="sref">pdata;/a> = ;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>->;a href="+code=pdata" class="sref">pdata;/a>;o;429;/a>        char *;a href="+code=b1_nam[" class="sref">b1_nam[;/a> = ;span class="string">"LP8788_B1_DVS";o;430;/a>        char *;a href="+code=b2_nam[" class="sref">b2_nam[;/a>[] = { ;span class="string">"LP8788_B2_DVS1", ;span class="string">"LP8788_B2_DVS2" };o;431;/a>        int;;a href="+code=i" class="sref">i;/a>,;;a href="+code=gpio" class="sref">gpio;/a>,;;a href="+code=ret" class="sref">ret;/a>;o;432;/a>o;433;/a>        switch (;a href="+code=id" class="sref">id;/a>) {o;434;/a>        case;;a href="+code=BUCK1" class="sref">BUCK1;/a>:o;435;/a>                ;a href="+code=gpio" class="sref">gpio;/a> = ;a href="+code=pdata" class="sref">pdata;/a>->;a href="+code=buck1_dvs" class="sref">buck1_dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>;o;436;/a>                ;a href="+code=ret" class="sref">ret;/a> = ;a href="+code=devm_gpio_request_one" class="sref">devm_gpio_request_one;/a>(&;a href="+code=pdev" class="sref">pdev;/a>->;a href="+code=dev" class="sref">dev;/a>, ;a href="+code=gpio" class="sref">gpio;/a>,;;a href="+code=DVS_LOW" class="sref">DVS_LOW;/a>,o;437;/a>                                            ;a href="+code=b1_nam[" class="sref">b1_nam[;/a>);o;438;/a>                if (;a href="+code=ret" class="sref">ret;/a>)o;439;/a>                        return ;a href="+code=ret" class="sref">ret;/a>;o;448n.a>o;441;/a>                ;a href="+code=buck" class="sref">buck;/a>->;a href="+code=dvs" class="sref">dvs;/a> = ;a href="+code=pdata" class="sref">pdata;/a>->;a href="+code=buck1_dvs" class="sref">buck1_dvs;/a>;o;442;/a>                break;o;443;/a>        case;;a href="+code=BUCK2" class="sref">BUCK2;/a>:o;444;/a>                for (;a href="+code=i" class="sref">i;/a> = 0; ;a href="+code=i" class="sref">i;/a> < ;a href="+code=LP8788_NUM_BUCK2_DVS" class="sref">LP8788_NUM_BUCK2_DVS;/a>; ;a href="+code=i" class="sref">i;/a>++) {o;445;/a>                        ;a href="+code=gpio" class="sref">gpio;/a> = ;a href="+code=pdata" class="sref">pdata;/a>->;a href="+code=buck2_dvs" class="sref">buck2_dvs;/a>->;a href="+code=gpio" class="sref">gpio;/a>[;a href="+code=i" class="sref">i;/a>];o;446;/a>                        ;a href="+code=ret" class="sref">ret;/a> = ;a href="+code=devm_gpio_request_one" class="sref">devm_gpio_request_one;/a>(&;a href="+code=pdev" class="sref">pdev;/a>->;a href="+code=dev" class="sref">dev;/a>, ;a href="+code=gpio" class="sref">gpio;/a>,o;447;/a>                                                    ;a href="+code=DVS_LOW" class="sref">DVS_LOW;/a>, ;a href="+code=b2_nam[" class="sref">b2_nam[;/a>[;a href="+code=i" class="sref">i;/a>]);o;448;/a>                        if (;a href="+code=ret" class="sref">ret;/a>)o;449;/a>                                return ;a href="+code=ret" class="sref">ret;/a>;o;450;/a>                }o;451;/a>                ;a href="+code=buck" class="sref">buck;/a>->;a href="+code=dvs" class="sref">dvs;/a> = ;a href="+code=pdata" class="sref">pdata;/a>->;a href="+code=buck2_dvs" class="sref">buck2_dvs;/a>;o;452;/a>                break;o;453;/a>        default:o;454;/a>                break;o;455;/a>        }o;456;/a>o;457;/a>        return 0;o;458;/a>}o;459;/a>o;460;/a>static int;;a href="+code=lp8788_init_dvs" class="sref">lp8788_init_dvs;/a>(struct;;a href="+code=platform_device" class="sref">platform_device;/a> *;a href="+code=pdev" class="sref">pdev;/a>,o;461;/a>                        struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a>, enum;;a href="+code=lp8788_buck_id" class="sref">lp8788_buck_id;/a> ;a href="+code=id" class="sref">id;/a>)o;462;/a>{o;463;/a>        struct;;a href="+code=lp8788_platform_data" class="sref">lp8788_platform_data;/a> *;a href="+code=pdata" class="sref">pdata;/a> = ;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>->;a href="+code=pdata" class="sref">pdata;/a>;o;464;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=mask" class="sref">mask;/a>[] = { ;a href="+code=LP8788_BUCK1_DVS_SEL_M" class="sref">LP8788_BUCK1_DVS_SEL_M;/a>, ;a href="+code=LP8788_BUCK2_DVS_SEL_M" class="sref">LP8788_BUCK2_DVS_SEL_M;/a> };o;465;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=vd;" class="sref">val;/a>[]  = { ;a href="+code=LP8788_BUCK1_DVS_PIN" class="sref">LP8788_BUCK1_DVS_PIN;/a>, ;a href="+code=LP8788_BUCK2_DVS_PIN" class="sref">LP8788_BUCK2_DVS_PIN;/a> };o;466;/a>        ;a href="+code=u8" class="sref">u8;/a> ;a href="+code=default_dvs_mode" class="sref">default_dvs_mode;/a>[] = { ;a href="+code=LP8788_BUCK1_DVS_I2C" class="sref">LP8788_BUCK1_DVS_I2C;/a>, ;a href="+code=LP8788_BUCK2_DVS_I2C" class="sref">LP8788_BUCK2_DVS_I2C;/a> };o;467;/a>o;468;/a>        ;span class="comment">/* no dvs for buck3, 4 */o;469;/a>        if (;a href="+code=id" class="sref">id;/a> >;;a href="+code=BUCK2" class="sref">BUCK2;/a>)o;470;/a>                return 0;o;471;/a>o;472;/a>        ;span class="comment">/* no dvs platform data, then dvs will be selected by I2C registers */o;473;/a>        if (!;a href="+code=pdata" class="sref">pdata;/a>)o;474;/a>                goto;;a href="+code=set_default_dvs_mode" class="sref">set_default_dvs_mode;/a>;o;475;/a>o;476;/a>        if ((;a href="+code=id" class="sref">id;/a> == ;a href="+code=BUCK1" class="sref">BUCK1;/a> && !;a href="+code=pdata" class="sref">pdata;/a>->;a href="+code=buck1_dvs" class="sref">buck1_dvs;/a>) ||o;477;/a>                (;a href="+code=id" class="sref">id;/a> == ;a href="+code=BUCK2" class="sref">BUCK2;/a> && !;a href="+code=pdata" class="sref">pdata;/a>->;a href="+code=buck2_dvs" class="sref">buck2_dvs;/a>))o;478;/a>                goto;;a href="+code=set_default_dvs_mode" class="sref">set_default_dvs_mode;/a>;o;479;/a>o;480;/a>        if (;a href="+code=lp8788_dvs_gpio_request" class="sref">lp8788_dvs_gpio_request;/a>(;a href="+code=pdev" class="sref">pdev;/a>, ;a href="+code=buck" class="sref">buck;/a>, ;a href="+code=id" class="sref">id;/a>))o;481;/a>                goto;;a href="+code=set_default_dvs_mode" class="sref">set_default_dvs_mode;/a>;o;482;/a>o;483;/a>        return ;a href="+code=lp8788_update_bits" class="sref">lp8788_update_bits;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=LP8788_BUCK_DVS_SEL" class="sref">LP8788_BUCK_DVS_SEL;/a>, ;a href="+code=mask" class="sref">mask;/a>[;a href="+code=id" class="sref">id;/a>],o;484;/a>                                ;a href="+code=vd;" class="sref">val;/a>[;a href="+code=id" class="sref">id;/a>]);o;485;/a>o;486;/a>;a href="+code=set_default_dvs_mode" class="sref">set_default_dvs_mode;/a>:o;487;/a>        return ;a href="+code=lp8788_update_bits" class="sref">lp8788_update_bits;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a>, ;a href="+code=LP8788_BUCK_DVS_SEL" class="sref">LP8788_BUCK_DVS_SEL;/a>, ;a href="+code=mask" class="sref">mask;/a>[;a href="+code=id" class="sref">id;/a>],o;488;/a>                                  ;a href="+code=default_dvs_mode" class="sref">default_dvs_mode;/a>[;a href="+code=id" class="sref">id;/a>]);o;489;/a>}o;498n.a>o;491;/a>static int;;a href="+code=lp8788_buck_probe" class="sref">lp8788_buck_probe;/a>(struct;;a href="+code=platform_device" class="sref">platform_device;/a> *;a href="+code=pdev" class="sref">pdev;/a>)o;492;/a>{o;493;/a>        struct;;a href="+code=lp8788" class="sref">lp8788;/a> *;a href="+code=lp" class="sref">lp;/a> = ;a href="+code=dev_get_drvdata" class="sref">dev_get_drvdata;/a>(;a href="+code=pdev" class="sref">pdev;/a>->;a href="+code=dev" class="sref">dev;/a>.;a href="+code=parent" class="sref">parent;/a>);o;494;/a>        int;;a href="+code=id" class="sref">id;/a> = ;a href="+code=pdev" class="sref">pdev;/a>->;a href="+code=id" class="sref">id;/a>;o;495;/a>        struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a>;o;496;/a>        struct;;a href="+code=regulator_config" class="sref">regulator_config;/a> ;a href="+code=cfg" class="sref">cfg;/a> = { };o;497;/a>        struct;;a href="+code=regulator_dev" class="sref">regulator_dev;/a> *;a href="+code=rdev" class="sref">rdev;/a>;o;498;/a>        int;;a href="+code=ret" class="sref">ret;/a>;o;499;/a>o;500;/a>        if (;a href="+code=id" class="sref">id;/a> >= ;a href="+code=LP8788_NUM_BUCKS" class="sref">LP8788_NUM_BUCKS;/a>)o;501;/a>                return -;a href="+code=EINVAL" class="sref">EINVAL;/a>;o;502;/a>o;503;/a>        ;a href="+code=buck" class="sref">buck;/a> = ;a href="+code=devm_kzalloc" class="sref">devm_kzalloc;/a>(&;a href="+code=pdev" class="sref">pdev;/a>->;a href="+code=dev" class="sref">dev;/a>, sizeof(struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a>), ;a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL;/a>);o;504;/a>        if (!;a href="+code=buck" class="sref">buck;/a>)o;505;/a>                return -;a href="+code=ENOMEM" class="sref">ENOMEM;/a>;o;506;/a>o;507;/a>        ;a href="+code=buck" class="sref">buck;/a>->;a href="+code=lp" class="sref">lp;/a> = ;a href="+code=lp" class="sref">lp;/a>;o;508;/a>o;509;/a>        ;a href="+code=ret" class="sref">ret;/a> = ;a href="+code=lp8788_init_dvs" class="sref">lp8788_init_dvs;/a>(;a href="+code=pdev" class="sref">pdev;/a>, ;a href="+code=buck" class="sref">buck;/a>, ;a href="+code=id" class="sref">id;/a>);o;510;/a>        if (;a href="+code=ret" class="sref">ret;/a>)o;511;/a>                return ;a href="+code=ret" class="sref">ret;/a>;o;512;/a>o;513;/a>        ;a href="+code=cfg" class="sref">cfg;/a>.;a href="+code=dev" class="sref">dev;/a> = ;a href="+code=pdev" class="sref">pdev;/a>->;a href="+code=dev" class="sref">dev;/a>.;a href="+code=parent" class="sref">parent;/a>;o;514;/a>        ;a href="+code=cfg" class="sref">cfg;/a>.;a href="+code=init_data" class="sref">init_data;/a> = ;a href="+code=lp" class="sref">lp;/a>->;a href="+code=pdata" class="sref">pdata;/a> ? ;a href="+code=lp" class="sref">lp;/a>->;a href="+code=pdata" class="sref">pdata;/a>->;a href="+code=buck_data" class="sref">buck_data;/a>[;a href="+code=id" class="sref">id;/a>] : ;a href="+code=NULL" class="sref">NULL;/a>;o;515;/a>        ;a href="+code=cfg" class="sref">cfg;/a>.;a href="+code=driver_data" class="sref">driver_data;/a> = ;a href="+code=buck" class="sref">buck;/a>;o;516;/a>        ;a href="+code=cfg" class="sref">cfg;/a>.;a href="+code=regmap" class="sref">regmap;/a> = ;a href="+code=lp" class="sref">lp;/a>->;a href="+code=regmap" class="sref">regmap;/a>;o;517;/a>o;518;/a>        ;a href="+code=rdev" class="sref">rdev;/a> = ;a href="+code=regulator_register" class="sref">regulator_register;/a>(&;a href="+code=lp8788_buck_desc" class="sref">lp8788_buck_desc;/a>[;a href="+code=id" class="sref">id;/a>], &;a href="+code=cfg" class="sref">cfg;/a>);o;519;/a>        if (;a href="+code=IS_ERR" class="sref">IS_ERR;/a>(;a href="+code=rdev" class="sref">rdev;/a>)) {o;520;/a>                ;a href="+code=ret" class="sref">ret;/a> = ;a href="+code=PTR_ERR" class="sref">PTR_ERR;/a>(;a href="+code=rdev" class="sref">rdev;/a>);o;521;/a>                ;a href="+code=dev_err" class="sref">dev_err;/a>(&;a href="+code=pdev" class="sref">pdev;/a>->;a href="+code=dev" class="sref">dev;/a>, ;span class="string">"BUCK%d regulator register err = %d\n",o;522;/a>                                ;a href="+code=id" class="sref">id;/a> + 1,;;a href="+code=ret" class="sref">ret;/a>);o;523;/a>                return ;a href="+code=ret" class="sref">ret;/a>;o;524;/a>        }o;525;/a>o;526;/a>        ;a href="+code=buck" class="sref">buck;/a>->;a href="+code=regulator" class="sref">regulator;/a> = ;a href="+code=rdev" class="sref">rdev;/a>;o;527;/a>        ;a href="+code=platform_set_drvdata" class="sref">platform_set_drvdata;/a>(;a href="+code=pdev" class="sref">pdev;/a>, ;a href="+code=buck" class="sref">buck;/a>);o;528;/a>o;529;/a>        return 0;o;530;/a>}o;531;/a>o;532;/a>static int;;a href="+code=lp8788_buck_remove" class="sref">lp8788_buck_remove;/a>(struct;;a href="+code=platform_device" class="sref">platform_device;/a> *;a href="+code=pdev" class="sref">pdev;/a>)o;533;/a>{o;534;/a>        struct;;a href="+code=lp8788_buck" class="sref">lp8788_buck;/a> *;a href="+code=buck" class="sref">buck;/a> = ;a href="+code=platform_get_drvdata" class="sref">platform_get_drvdata;/a>(;a href="+code=pdev" class="sref">pdev;/a>);o;535;/a>o;536;/a>        ;a href="+code=platform_set_drvdata" class="sref">platform_set_drvdata;/a>(;a href="+code=pdev" class="sref">pdev;/a>, ;a href="+code=NULL" class="sref">NULL;/a>);o;537;/a>        ;a href="+code=regulator_unregister" class="sref">regulator_unregister;/a>(;a href="+code=buck" class="sref">buck;/a>->;a href="+code=regulator" class="sref">regulator;/a>);o;538;/a>o;539;/a>        return 0;o;540;/a>}o;541;/a>o;542;/a>static struct;;a href="+code=platform_driver" class="sref">platform_driver;/a> ;a href="+code=lp8788_buck_driver" class="sref">lp8788_buck_driver;/a> = {o;543;/a>        .;a href="+code=probe" class="sref">probe;/a> = ;a href="+code=lp8788_buck_probe" class="sref">lp8788_buck_probe;/a>,o;544;/a>        .;a href="+code=remove" class="sref">remove;/a> = ;a href="+code=lp8788_buck_remove" class="sref">lp8788_buck_remove;/a>,o;545;/a>        .;a href="+code=driver" class="sref">driver;/a> = {o;546;/a>                .;a href="+code=nam[" class="sref">nam[;/a> = ;a href="+code=LP8788_DEV_BUCK" class="sref">LP8788_DEV_BUCK;/a>,o;547;/a>                .;a href="+code=owner" class="sref">owner;/a> = ;a href="+code=THIS_MODULE" class="sref">THIS_MODULE;/a>,o;548;/a>        },o;549;/a>};o;558n.a>o;551;/a>static int;;a href="+code=__init" class="sref">__init;/a> ;a href="+code=lp8788_buck_init" class="sref">lp8788_buck_init;/a>(void)o;552;/a>{o;553;/a>        return ;a href="+code=platform_driver_register" class="sref">platform_driver_register;/a>(&;a href="+code=lp8788_buck_driver" class="sref">lp8788_buck_driver;/a>);o;554;/a>}o;555;/a>;a href="+code=subsys_initcal;" class="sref">subsys_initcal;;/a>(;a href="+code=lp8788_buck_init" class="sref">lp8788_buck_init;/a>);o;556;/a>o;557;/a>static void;;a href="+code=__exit" class="sref">__exit;/a> ;a href="+code=lp8788_buck_exit" class="sref">lp8788_buck_exit;/a>(void)o;558;/a>{o;559;/a>        ;a href="+code=platform_driver_unregister" class="sref">platform_driver_unregister;/a>(&;a href="+code=lp8788_buck_driver" class="sref">lp8788_buck_driver;/a>);o;560;/a>}o;561;/a>;a href="+code=module_exit" class="sref">module_exit;/a>(;a href="+code=lp8788_buck_exit" class="sref">lp8788_buck_exit;/a>);o;562;/a>o;563;/a>;a href="+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTION;/a>(;span class="string">"TI LP8788 BUCK Driver");o;564;/a>;a href="+code=MODULE_AUTHOR" class="sref">MODULE_AUTHOR;/a>(;span class="string">"Milo Kim");o;565;/a>;a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE;/a>(;span class="string">"GPL");o;566;/a>;a href="+code=MODULE_ALIAS" class="sref">MODULE_ALIAS;/a>(;span class="string">"platform:lp8788-buck");o;567;/a>
lxr.linux.no kindly hosted by ;a href="http://www.redpill-linpro.no">Redpill Linpro AS;/a>, provider of Linux consulting and operations services since 1995.