linux/drivers/power/max8903_charger.c
<<
lue=/op/spa14. /op/form4. /opa lue=/o href="../linux+v3.4"2/drivers/power/max8903_charger.c">lue=/opimg src="../.static/gfx/right.png" alt=">>">lup/spa14.lupspa1 class="lxr_search">lue=lue=/opinput typopthidden" namoptnavtarget" lue=/opinput typopttext" namoptsearch" idptsearch">lue=/opbutt typoptsubmit">Searchlue=/oPrefs. /op/a>lup/spa14.e=/o op/div4.e=/o opform acv3.1="ajax+*" method="post" onsubmit="return false;">lupinput typopthidden" namoptajax_lookup" idptajax_lookup" le=/o op/form4.le=/o opdiv class="headingbott m">. pdiv idptfile_contents"4
o o1p/a>pspa1 class="comment">/*p/spa14.o o2p/a>pspa1 class="comment"> * max8903_charger.c - Maxim 8903 USB/Adapter Charger Driverp/spa14.o o3p/a>pspa1 class="comment"> *p/spa14.o o4p/a>pspa1 class="comment"> * Copyright (C) 2011 Samsung Electronicsp/spa14.o o5p/a>pspa1 class="comment"> * MyungJoo Ham <myungjoo.ham@samsung.com>p/spa14.o o6p/a>pspa1 class="comment"> *p/spa14.o o7p/a>pspa1 class="comment"> * This program is free software; you ca1 redistribute it and/or modifyp/spa14.o o8p/a>pspa1 class="comment"> * it under the terms of the GNU General Public License as published byp/spa14.o o9p/a>pspa1 class="comment"> * the Free Software Foundav3.1; either vers>
  2 of the License, orp/spa14.o   >
a>pspa1 class="comment"> * (at your   v3.1) any later vers>
 .p/spa14.o 11p/a>pspa1 class="comment"> *p/spa14.o 12p/a>pspa1 class="comment"> * This program is distributed in the hope that it will be useful,p/spa14.o 13p/a>pspa1 class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty ofp/spa14.o 14p/a>pspa1 class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See thep/spa14.o 15p/a>pspa1 class="comment"> * GNU General Public License for more details.p/spa14.o 16p/a>pspa1 class="comment"> *p/spa14.o 17p/a>pspa1 class="comment"> * You should have received a copy of the GNU General Public Licensep/spa14.o 18p/a>pspa1 class="comment"> * along with this program; if not, write to the Free Softwarep/spa14.o 19p/a>pspa1 class="comment"> * Foundav3.1, Inc., 59 Temple Place, Suite 330, Bost.1, MA  02111-1307  USAp/spa14.o 2 >
a>pspa1 class="comment"> *p/spa14.o 21p/a>pspa1 class="comment"> */p/spa14.o 22p/a>.o 23p/a>#include <linux/gpio.hp/a>>.o 24p/a>#include <linux/interrupt.hp/a>>.o 25p/a>#include <linux/module.hp/a>>.o 26p/a>#include <linux/slab.hp/a>>.o 27p/a>#include <linux/power_supply.hp/a>>.o 28p/a>#include <linux/platform_device.hp/a>>.o 29p/a>#include <linux/power/max8903_charger.hp/a>>.o 30p/a>.o 31p/a>structopa href="+code=max8903_dava" class="sref">max8903_davap/a> {.o 32p/a>        structopa href="+code=max8903_pdava" class="sref">max8903_pdavap/a> pa href="+code=pdava" class="sref">pdavap/a>;.o 33p/a>        structopa href="+code=device" class="sref">devicep/a> *pa href="+code=dev" class="sref">devp/a>;.o 34p/a>        structopa href="+code=power_supply" class="sref">power_supplyp/a> pa href="+code=psy" class="sref">psyp/a>;.o 35p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=fault" class="sref">faultp/a>;.o 36p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=usb_in" class="sref">usb_inp/a>;.o 37p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=ta_in" class="sref">ta_inp/a>;.o 38p/a>};.o 39p/a>.o 40p/a>static enumopa href="+code=power_supply_property" class="sref">power_supply_propertyp/a> pa href="+code=max8903_charger_props" class="sref">max8903_charger_propsp/a>[] = {.o 41p/a>        pa href="+code=POWER_SUPPLY_PROP_STATUS" class="sref">POWER_SUPPLY_PROP_STATUSp/a>, pspa1 class="comment">/* Charger status output */p/spa14.o 42p/a>        pa href="+code=POWER_SUPPLY_PROP_ONLINE" class="sref">POWER_SUPPLY_PROP_ONLINEp/a>, pspa1 class="comment">/* External power source */p/spa14.o 43p/a>        pa href="+code=POWER_SUPPLY_PROP_HEALTH" class="sref">POWER_SUPPLY_PROP_HEALTHp/a>, pspa1 class="comment">/* Fault or OK */p/spa14.o 44p/a>};.o 45p/a>.o46ower_supplyint pa href="+code=max8903_get_property" class="sref">max8903_get_propertyower(structopa href="+code=power_supply" class="sref">power_supplyp/a> *pa href="+code=psy" class="sref">psyp/a>,.o 47p/a>                enumopa href="+code=power_supply_property" class="sref">power_supply_propertyp/a> pa href="+code=psp" class="sref">pspp/a>,.o 48p/a>                un>
  pa href="+code=power_supply_propval" class="sref">power_supply_propvalp/a> *pa href="+code=val" class="sref">valp/a>).o 49p/a>{.o 50p/a>        structopa href="+code=max8903_dava" class="sref">max8903_davap/a> *pa href="+code=dava" class="sref">davap/a> =opa href="+code=container_of" class="sref">container_ofower(pa href="+code=psy" class="sref">psyp/a>,.o 51p/a>                        structopa href="+code=max8903_dava" class="sref">max8903_davap/a>, pa href="+code=psy" class="sref">psyp/a>);.o 52p/a>.o 53p/a>        switch (pa href="+code=psp" class="sref">pspp/a>) {.o 54p/a>        case pa href="+code=POWER_SUPPLY_PROP_STATUS" class="sref">POWER_SUPPLY_PROP_STATUSp/a>:.o 55p/a>                pa href="+code=val" class="sref">valp/a>->pa href="+code=intval" class="sref">intvalp/a> =opa href="+code=POWER_SUPPLY_STATUS_UNKNOWN" class="sref">POWER_SUPPLY_STATUS_UNKNOWNp/a>;.o56p/a>                if (pa href="+code=dava" class="sref">davap/a>->pa href="+code=pdava" class="sref">pdavap/a>.pa href="+code=chg" class="sref">chgp/a>) {.o 57p/a>                        if (pa href="+code=gpio_get_
  gpio_get_
  davap/a>->pa href="+code=pdava" class="sref">pdavap/a>.pa href="+code=chg" class="sref">chgp/a>) == 0).o 58p/a>                                pa href="+code=val" class="sref">valp/a>->pa href="+code=intval" class="sref">intvalp/a> =opa href="+code=POWER_SUPPLY_STATUS_CHARGING" class="sref">POWER_SUPPLY_STATUS_CHARGINGp/a>;.o 59p/a>                        else if (pa href="+code=dava" class="sref">davap/a>->pa href="+code=usb_in" class="sref">usb_inp/a> ||opa href="+code=dava" class="sref">davap/a>->pa href="+code=ta_in" class="sref">ta_inp/a>).o 60p/a>                                pa href="+code=val" class="sref">valp/a>->pa href="+code=intval" class="sref">intvalp/a> =opa href="+code=POWER_SUPPLY_STATUS_NOT_CHARGING" class="sref">POWER_SUPPLY_STATUS_NOT_CHARGINGp/a>;.o 61p/a>                        else.o 62p/a>                                pa href="+code=val" class="sref">valp/a>->pa href="+code=intval" class="sref">intvalp/a> =opa href="+code=POWER_SUPPLY_STATUS_DISCHARGING" class="sref">POWER_SUPPLY_STATUS_DISCHARGINGp/a>;.o 63p/a>                }.o 64p/a>                break;.o 65p/a>        case pa href="+code=POWER_SUPPLY_PROP_ONLINE" class="sref">POWER_SUPPLY_PROP_ONLINEp/a>:.o66p/a>                pa href="+code=val" class="sref">valp/a>->pa href="+code=intval" class="sref">intvalp/a> =o0;.o 67p/a>                if (pa href="+code=dava" class="sref">davap/a>->pa href="+code=usb_in" class="sref">usb_inp/a> ||opa href="+code=dava" class="sref">davap/a>->pa href="+code=ta_in" class="sref">ta_inp/a>).o 68p/a>                        pa href="+code=val" class="sref">valp/a>->pa href="+code=intval" class="sref">intvalp/a> =o1;.o 69p/a>                break;.o 70p/a>        case pa href="+code=POWER_SUPPLY_PROP_HEALTH" class="sref">POWER_SUPPLY_PROP_HEALTHp/a>:.o 71p/a>                pa href="+code=val" class="sref">valp/a>->pa href="+code=intval" class="sref">intvalp/a> =opa href="+code=POWER_SUPPLY_HEALTH_GOOD" class="sref">POWER_SUPPLY_HEALTH_GOODp/a>;.o 72p/a>                if (pa href="+code=dava" class="sref">davap/a>->pa href="+code=fault" class="sref">faultp/a>).o 73p/a>                        pa href="+code=val" class="sref">valp/a>->pa href="+code=intval" class="sref">intvalp/a> =opa href="+code=POWER_SUPPLY_HEALTH_UNSPEC_FAILURE" class="sref">POWER_SUPPLY_HEALTH_UNSPEC_FAILUREp/a>;.o 74p/a>                break;.o 75p/a>        default:.o76p/a>                return -pa href="+code=EINVAL" class="sref">EINVALp/a>;.o 77p/a>        }.o 78p/a>        return 0;.o 79p/a>}.o 80p/a>.o 81ower_supplypa href="+code=irqreturn_t" class="sref">irqreturn_tp/a> pa href="+code=max8903_dcin" class="sref">max8903_dcinower(int pa href="+code=irq" class="sref">irqp/a>, void *pa href="+code=_dava" class="sref">_davap/a>).o 82p/a>{.o 83p/a>        structopa href="+code=max8903_dava" class="sref">max8903_davap/a> *pa href="+code=dava" class="sref">davap/a> =opa href="+code=_dava" class="sref">_davap/a>;.o 84p/a>        structopa href="+code=max8903_pdava" class="sref">max8903_pdavap/a> *pa href="+code=pdava" class="sref">pdavap/a> =o&pa href="+code=dava" class="sref">davap/a>->pa href="+code=pdava" class="sref">pdavap/a>;.o 85p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=ta_in" class="sref">ta_inp/a>;.o86p/a>        enumopa href="+code=power_supply_typo" class="sref">power_supply_typop/a> pa href="+code=old_typo" class="sref">old_typop/a>;.o 87p/a>.o 88p/a>        pa href="+code=ta_in" class="sref">ta_inp/a> =opa href="+code=gpio_get_
  gpio_get_
  pdavap/a>->pa href="+code=dok" class="sref">dokp/a>) ? pa href="+code=falso" class="sref">falsop/a> : pa href="+code=trtr;.o 89p/a>.o 90p/a>        if (pa href="+code=ta_in" class="sref">ta_inp/a> ==opa href="+code=dava" class="sref">davap/a>->pa href="+code=ta_in" class="sref">ta_inp/a>).o 91p/a>                return pa href="+code=IRQ_HANDLED" class="sref">IRQ_HANDLEDp/a>;.o 92p/a>.o 93p/a>        pa href="+code=dava" class="sref">davap/a>->pa href="+code=ta_in" class="sref">ta_inp/a> =opa href="+code=ta_in" class="sref">ta_inp/a>;.o 94p/a>.o 95p/a>        pspa1 class="comment">/* Set Current-Limit-Mode 1:DC 0:USB */p/spa14.o96p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dcm" class="sref">dcmp/a>).o 97p/a>                pa href="+code=gpio_set_
  gpio_set_
  pdavap/a>->pa href="+code=dcm" class="sref">dcmp/a>, pa href="+code=ta_in" class="sref">ta_inp/a> ? 1 : 0);.o 98p/a>.o 99p/a>        pspa1 class="comment">/* Charger Enable / Disable (cen is negated) */p/spa14.o100p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=cen" class="sref">cenp/a>).o101p/a>                pa href="+code=gpio_set_
  gpio_set_
  pdavap/a>->pa href="+code=cen" class="sref">cenp/a>, pa href="+code=ta_in" class="sref">ta_inp/a> ? 0 :.o102p/a>                                (pa href="+code=dava" class="sref">davap/a>->pa href="+code=usb_in" class="sref">usb_inp/a> ? 0 : 1));.o103p/a>.o104p/a>        pa href="+code=dev_dbg" class="sref">dev_dbgower(pa href="+code=dava" class="sref">davap/a>->pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"TA(DC-IN) Charger %s.\n"p/spa14, pa href="+code=ta_in" class="sref">ta_inp/a> ?.o105p/a>                        pspa1 class="string">"Connected"p/spa14 : pspa1 class="string">"Disconnected"p/spa14);.o106p/a>.o107p/a>        pa href="+code=old_typo" class="sref">old_typop/a> =opa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a>;.o108p/a>.o109p/a>        if (pa href="+code=dava" class="sref">davap/a>->pa href="+code=ta_in" class="sref">ta_inp/a>).o110p/a>                pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a> =opa href="+code=POWER_SUPPLY_TYPE_MAINS" class="sref">POWER_SUPPLY_TYPE_MAINSp/a>;.o111p/a>        else if (pa href="+code=dava" class="sref">davap/a>->pa href="+code=usb_in" class="sref">usb_inp/a>).o112p/a>                pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a> =opa href="+code=POWER_SUPPLY_TYPE_USB" class="sref">POWER_SUPPLY_TYPE_USBp/a>;.o113p/a>        else.o114p/a>                pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a> =opa href="+code=POWER_SUPPLY_TYPE_BATTERY" class="sref">POWER_SUPPLY_TYPE_BATTERYp/a>;.o115p/a>.o116p/a>        if (pa href="+code=old_typo" class="sref">old_typop/a> !=opa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a>).o117p/a>                pa href="+code=power_supply_changed" class="sref">power_supply_changedower(&pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>);.o118p/a>.o119p/a>        return pa href="+code=IRQ_HANDLED" class="sref">IRQ_HANDLEDp/a>;.o12 >
a>}.o121p/a>.o122p/a>_supplypa href="+code=irqreturn_t" class="sref">irqreturn_tp/a> pa href="+code=max8903_usbin" class="sref">max8903_usbinower(int pa href="+code=irq" class="sref">irqp/a>, void *pa href="+code=_dava" class="sref">_davap/a>).o123p/a>{.o124p/a>        structopa href="+code=max8903_dava" class="sref">max8903_davap/a> *pa href="+code=dava" class="sref">davap/a> =opa href="+code=_dava" class="sref">_davap/a>;.o125p/a>        structopa href="+code=max8903_pdava" class="sref">max8903_pdavap/a> *pa href="+code=pdava" class="sref">pdavap/a> =o&pa href="+code=dava" class="sref">davap/a>->pa href="+code=pdava" class="sref">pdavap/a>;.o126p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=usb_in" class="sref">usb_inp/a>;.o127p/a>        enumopa href="+code=power_supply_typo" class="sref">power_supply_typop/a> pa href="+code=old_typo" class="sref">old_typop/a>;.o128p/a>.o129p/a>        pa href="+code=usb_in" class="sref">usb_inp/a> =opa href="+code=gpio_get_
  gpio_get_
  pdavap/a>->pa href="+code=uok" class="sref">uokp/a>) ? pa href="+code=falso" class="sref">falsop/a> : pa href="+code=trtr;.o130p/a>.o131p/a>        if (pa href="+code=usb_in" class="sref">usb_inp/a> ==opa href="+code=dava" class="sref">davap/a>->pa href="+code=usb_in" class="sref">usb_inp/a>).o132p/a>                return pa href="+code=IRQ_HANDLED" class="sref">IRQ_HANDLEDp/a>;.o133p/a>.o134p/a>        pa href="+code=dava" class="sref">davap/a>->pa href="+code=usb_in" class="sref">usb_inp/a> =opa href="+code=usb_in" class="sref">usb_inp/a>;.o135p/a>.o136p/a>        pspa1 class="comment">/* Do not touch Current-Limit-Mode */p/spa14.o137p/a>.o138p/a>        pspa1 class="comment">/* Charger Enable / Disable (cen is negated) */p/spa14.o139p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=cen" class="sref">cenp/a>).o140p/a>                pa href="+code=gpio_set_
  gpio_set_
  pdavap/a>->pa href="+code=cen" class="sref">cenp/a>, pa href="+code=usb_in" class="sref">usb_inp/a> ? 0 :.o141p/a>                                (pa href="+code=dava" class="sref">davap/a>->pa href="+code=ta_in" class="sref">ta_inp/a> ? 0 : 1));.o142p/a>.o143p/a>        pa href="+code=dev_dbg" class="sref">dev_dbgower(pa href="+code=dava" class="sref">davap/a>->pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"USB Charger %s.\n"p/spa14, pa href="+code=usb_in" class="sref">usb_inp/a> ?.o144p/a>                        pspa1 class="string">"Connected"p/spa14 : pspa1 class="string">"Disconnected"p/spa14);.o145p/a>.146p/a>        pa href="+code=old_typo" class="sref">old_typop/a> =opa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a>;.o147p/a>.o148p/a>        if (pa href="+code=dava" class="sref">davap/a>->pa href="+code=ta_in" class="sref">ta_inp/a>).o149p/a>                pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a> =opa href="+code=POWER_SUPPLY_TYPE_MAINS" class="sref">POWER_SUPPLY_TYPE_MAINSp/a>;.o150p/a>        else if (pa href="+code=dava" class="sref">davap/a>->pa href="+code=usb_in" class="sref">usb_inp/a>).o151p/a>                pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a> =opa href="+code=POWER_SUPPLY_TYPE_USB" class="sref">POWER_SUPPLY_TYPE_USBp/a>;.o152p/a>        else.o153p/a>                pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a> =opa href="+code=POWER_SUPPLY_TYPE_BATTERY" class="sref">POWER_SUPPLY_TYPE_BATTERYp/a>;.o154p/a>.o155p/a>        if (pa href="+code=old_typo" class="sref">old_typop/a> !=opa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a>).156p/a>                pa href="+code=power_supply_changed" class="sref">power_supply_changedower(&pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>);.o157p/a>.o158p/a>        return pa href="+code=IRQ_HANDLED" class="sref">IRQ_HANDLEDp/a>;.o159p/a>}.o160p/a>.o161ower_supplypa href="+code=irqreturn_t" class="sref">irqreturn_tp/a> pa href="+code=max8903_fault" class="sref">max8903_faultower(int pa href="+code=irq" class="sref">irqp/a>, void *pa href="+code=_dava" class="sref">_davap/a>).o162p/a>{.o163p/a>        structopa href="+code=max8903_dava" class="sref">max8903_davap/a> *pa href="+code=dava" class="sref">davap/a> =opa href="+code=_dava" class="sref">_davap/a>;.o164p/a>        structopa href="+code=max8903_pdava" class="sref">max8903_pdavap/a> *pa href="+code=pdava" class="sref">pdavap/a> =o&pa href="+code=dava" class="sref">davap/a>->pa href="+code=pdava" class="sref">pdavap/a>;.o165p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=fault" class="sref">faultp/a>;.166p/a>.o167p/a>        pa href="+code=fault" class="sref">faultp/a> =opa href="+code=gpio_get_
  gpio_get_
  pdavap/a>->pa href="+code=flt" class="sref">fltp/a>) ? pa href="+code=falso" class="sref">falsop/a> : pa href="+code=trtr;.o168p/a>.o169p/a>        if (pa href="+code=fault" class="sref">faultp/a> ==opa href="+code=dava" class="sref">davap/a>->pa href="+code=fault" class="sref">faultp/a>).o170p/a>                return pa href="+code=IRQ_HANDLED" class="sref">IRQ_HANDLEDp/a>;.o171p/a>.o172p/a>        pa href="+code=dava" class="sref">davap/a>->pa href="+code=fault" class="sref">faultp/a> =opa href="+code=fault" class="sref">faultp/a>;.o173p/a>.o174p/a>        if (pa href="+code=fault" class="sref">faultp/a>).o175p/a>                pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dava" class="sref">davap/a>->pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"Charger suffers a fault and stops.\n"p/spa14);.176p/a>        else.o177p/a>                pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dava" class="sref">davap/a>->pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"Charger recovered from a fault.\n"p/spa14);.o178p/a>.o179p/a>        return pa href="+code=IRQ_HANDLED" class="sref">IRQ_HANDLEDp/a>;.o18 >
a>}.o181p/a>.o182p/a>_supplypa href="+code=__devinit" class="sref">__devinitp/a> int pa href="+code=max8903_probo" class="sref">max8903_proboower(structopa href="+code=platform_device" class="sref">platform_devicep/a> *pa href="+code=pdev" class="sref">pdevp/a>).o183p/a>{.o184p/a>        structopa href="+code=max8903_dava" class="sref">max8903_davap/a> *pa href="+code=dava" class="sref">davap/a>;.o185p/a>        structopa href="+code=device" class="sref">devicep/a> *pa href="+code=dev" class="sref">devp/a> =o&pa href="+code=pdev" class="sref">pdevp/a>->pa href="+code=dev" class="sref">devp/a>;.186p/a>        structopa href="+code=max8903_pdava" class="sref">max8903_pdavap/a> *pa href="+code=pdava" class="sref">pdavap/a> =opa href="+code=pdev" class="sref">pdevp/a>->pa href="+code=dev" class="sref">devp/a>.pa href="+code=platform_dava" class="sref">platform_davap/a>;.o187p/a>        int pa href="+code=ret" class="sref">retp/a> =o0;.o188p/a>        int pa href="+code=gpio" class="sref">gpiop/a>;.o189p/a>        int pa href="+code=ta_in" class="sref">ta_inp/a> =o0;.o190p/a>        int pa href="+code=usb_in" class="sref">usb_inp/a> =o0;.o191p/a>.o192p/a>        pa href="+code=dava" class="sref">davap/a> =opa href="+code=kzalloc" class="sref">kzallocower(sizeof(structopa href="+code=max8903_dava" class="sref">max8903_davap/a>), pa href="+code=GFP_KERNEL" class="sref">GFP_KERNELp/a>);.o193p/a>        if (pa href="+code=dava" class="sref">davap/a> ==opa href="+code=NULL" class="sref">NULLp/a>) {.o194p/a>                pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"Cannot allocate memory.\n"p/spa14);.o195p/a>                return -pa href="+code=ENOMEM" class="sref">ENOMEMp/a>;.196p/a>        }.o197p/a>        pa href="+code=memcpy" class="sref">memcpyower(&pa href="+code=dava" class="sref">davap/a>->pa href="+code=pdava" class="sref">pdavap/a>, pa href="+code=pdava" class="sref">pdavap/a>, sizeof(structopa href="+code=max8903_pdava" class="sref">max8903_pdavap/a>));.o198p/a>        pa href="+code=dava" class="sref">davap/a>->pa href="+code=dev" class="sref">devp/a> =opa href="+code=dev" class="sref">devp/a>;.o199p/a>        pa href="+code=platform_set_drvdava" class="sref">platform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa href="+code=dava" class="sref">davap/a>);.o200p/a>.o201p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dc_
  id" class="sref">dc_
  idp/a> ==opa href="+code=falso" class="sref">falsop/a> && pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=usb_
  id" class="sref">usb_
  idp/a> ==opa href="+code=falso" class="sref">falsop/a>) {.o202p/a>                pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"No 
  id power sources.\n"p/spa14);.o203p/a>                pa href="+code=ret" class="sref">retp/a> =o-pa href="+code=EINVAL" class="sref">EINVALp/a>;.o204p/a>                goto pa href="+code=err" class="sref">errower;.o205p/a>        }.o206p/a>.o207p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dc_
  id" class="sref">dc_
  idp/a>) {.o208p/a>                if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dok" class="sref">dokp/a> && pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dok" class="sref">dokp/a>) &&.o209p/a>                                pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dcm" class="sref">dcmp/a> && pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dcm" class="sref">dcmp/a>)) {.o210p/a>                        pa href="+code=gpio" class="sref">gpiop/a> =opa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dok" class="sref">dokp/a>; pspa1 class="comment">/* PULL_UPed Interrupt */p/spa14.o211p/a>                        pa href="+code=ta_in" class="sref">ta_inp/a> =opa href="+code=gpio_get_
  gpio_get_
  gpiop/a>) ? 0 : 1;.o212p/a>.o213p/a>                        pa href="+code=gpio" class="sref">gpiop/a> =opa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dcm" class="sref">dcmp/a>; pspa1 class="comment">/* Output */p/spa14.o214p/a>                        pa href="+code=gpio_set_
  gpio_set_
  gpiop/a>, pa href="+code=ta_in" class="sref">ta_inp/a>);.o215p/a>                } else {.o216p/a>                        pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"When DC is wired, DOK and DCM should"p/spa14.o217p/a>                                        pspa1 class="string">" be wired as well.\n"p/spa14);.o218p/a>                        pa href="+code=ret" class="sref">retp/a> =o-pa href="+code=EINVAL" class="sref">EINVALp/a>;.o219p/a>                        goto pa href="+code=err" class="sref">errower;.o220p/a>                }.o221p/a>        } else {.o222p/a>                if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dcm" class="sref">dcmp/a>) {.o223p/a>                        if (pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=dcm" class="sref">dcmp/a>)).o224p/a>                                pa href="+code=gpio_set_
  gpio_set_
  pdavap/a>->pa href="+code=dcm" class="sref">dcmp/a>, 0);.o225p/a>                        else {.o226p/a>                                pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"In
  id pin: dcm.\n"p/spa14);.o227p/a>                                pa href="+code=ret" class="sref">retp/a> =o-pa href="+code=EINVAL" class="sref">EINVALp/a>;.o228p/a>                                goto pa href="+code=err" class="sref">errower;.o229p/a>                        }.o230p/a>                }.o231p/a>        }.o232p/a>.o233p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=usb_
  id" class="sref">usb_
  idp/a>) {.o234p/a>                if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=uok" class="sref">uokp/a> && pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=uok" class="sref">uokp/a>)) {.o235p/a>                        pa href="+code=gpio" class="sref">gpiop/a> =opa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=uok" class="sref">uokp/a>;.o236p/a>                        pa href="+code=usb_in" class="sref">usb_inp/a> =opa href="+code=gpio_get_
  gpio_get_
  gpiop/a>) ? 0 : 1;.o237p/a>                } else {.o238p/a>                        pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"When USB is wired, UOK should be wired."p/spa14.o239p/a>                                        pspa1 class="string">"as well.\n"p/spa14);.o240p/a>                        pa href="+code=ret" class="sref">retp/a> =o-pa href="+code=EINVAL" class="sref">EINVALp/a>;.o241p/a>                        goto pa href="+code=err" class="sref">errower;.o242p/a>                }.o243p/a>        }.o244p/a>.o245p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=cen" class="sref">cenp/a>) {.246p/a>                if (pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=cen" class="sref">cenp/a>)) {.o247p/a>                        pa href="+code=gpio_set_
  gpio_set_
  pdavap/a>->pa href="+code=cen" class="sref">cenp/a>, (pa href="+code=ta_in" class="sref">ta_inp/a> || pa href="+code=usb_in" class="sref">usb_inp/a>) ? 0 : 1);.o248p/a>                } else {.o249p/a>                        pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"In
  id pin: cen.\n"p/spa14);.o250p/a>                        pa href="+code=ret" class="sref">retp/a> =o-pa href="+code=EINVAL" class="sref">EINVALp/a>;.o251p/a>                        goto pa href="+code=err" class="sref">errower;.o252p/a>                }.o253p/a>        }.o254p/a>.o255p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=chg" class="sref">chgp/a>) {.256p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=chg" class="sref">chgp/a>)) {.o257p/a>                        pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"In
  id pin: chg.\n"p/spa14);.o258p/a>                        pa href="+code=ret" class="sref">retp/a> =o-pa href="+code=EINVAL" class="sref">EINVALp/a>;.o259p/a>                        goto pa href="+code=err" class="sref">errower;.o260p/a>                }.o261p/a>        }.o262p/a>.o263p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=flt" class="sref">fltp/a>) {.o264p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=flt" class="sref">fltp/a>)) {.o265p/a>                        pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"In
  id pin: flt.\n"p/spa14);.266p/a>                        pa href="+code=ret" class="sref">retp/a> =o-pa href="+code=EINVAL" class="sref">EINVALp/a>;.o267p/a>                        goto pa href="+code=err" class="sref">errower;.o268p/a>                }.o269p/a>        }.o270p/a>.o271p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=usus" class="sref">ususp/a>) {.o272p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code=usus" class="sref">ususp/a>)) {.o273p/a>                        pa href="+code=dev_err" class="sref">dev_errower(pa href="+code=dev" class="sref">devp/a>, pspa1 class="string">"In
  id pin: usus.\n"p/spa14);.o274p/a>                        pa href="+code=ret" class="sref">retp/a> =o-pa href="+code=EINVAL" class="sref">EINVALp/a>;.o275p/a>                        goto pa href="+code=err" class="sref">errower;.276p/a>                }.o277p/a>        }.o278p/a>.o279p/a>        pa href="+code=dava" class="sref">davap/a>->pa href="+code=fault" class="sref">faultp/a> =opa href="+code=falso" class="sref">falsop/a>;.o280p/a>        pa href="+code=dava" class="sref">davap/a>->pa href="+code=ta_in" class="sref">ta_inp/a> =opa href="+code=ta_in" class="sref">ta_inp/a>;.o281p/a>        pa href="+code=dava" class="sref">davap/a>->pa href="+code=usb_in" class="sref">usb_inp/a> =opa href="+code=usb_in" class="sref">usb_inp/a>;.o282p/a>.o283p/a>        pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=namo" class="sref">namop/a> =opspa1 class="string">"max8903_charger"p/spa14;.o284p/a>        pa href="+code=dava" class="sref">davap/a>->pa href="+code=psy" class="sref">psyp/a>.pa href="+code=typo" class="sref">typop/a> =o(pa href="+code=ta_in" class="sref">ta_inp/a>) ? pa href="+code=POWER_SUPPLY_TYPE_MAINS" class="sref">POWER_SUPPLY_TYPE_MAINSp/a> :.davap/a>->pa href="+code=tager"p/spa14;.psyp/a>.pa href="+c2D"sref">psyp/a>.pa href="+c2D"sref">ps2p/a>;28a href="drivers/power/max8903_davap/a>->pa href="+code=tageryp/a>.pa href="+code=typo" class="sref">typop/a> =o" class="sref">devp/a>, pspa1 class="string">&rm_dava" 2lass="sref">platform_dav2p/a>;28a href="drivers/power/max8903_charger.c#L284" idptL284" class="line" namoptL284">o284p/a>        pa href="+code=dava=usbpropert84">o284p/a>    =usbpropert8ef="+code=dava" class=pa1 clas=usbpropert84">o284p/a>    pa1 clas=usbpropert8="+code=usb_in" class="sref">usb_inp/a> =opa href=ss="line"ret" class="sref">retp/a2 =o0;28a href="drivers/power/max8903_charger.c#L198" idptL198" class="line" namoptL284">o284p/a>        pa href="+code=davapropertiepio_is_
  idowerpropertiepef="+code=dava" class=pa1 clasa> =opabproppio_is_
  idowerpa1 clasa> =opabpropp="+code=usb_in" class="sref">usb_inp/a> =opa href=L278" clae=gpio" class="sref">gpi2p/a>;28a href="drivers/power/max8903_charger.c#L279" idptL279" class="line" namoptL283">o283p/a>        pa href="+code=dava"um_propertiepio_is_
  idower"um_propertiepef="+code=dava" class=ARRAY_SIZEio_is_
  idowerARRAY_SIZEptL273">o273p/a>    pa1 clasa> =opabproppio_is_
  idowerpa1 clasa> =opabpropp="+c" class="sref">devp/a>, pspa1 class="string">&+code=ta_2n" class="sref">ta_inp/a2 =o0;29a href="drivers/power/max8903_charger.c#L270" idpode=usb_i2" class="sref">usb_inp/a2 =o0;29a href="drivers/power/max890" idptL274" class="line" nams="line" namoptLx8901536">15registe275" class="lineLx8901536">15registe2ptL273">o273p/a>                        pa href         pa href="+code=power_supply_changed" class="sref">power_supply_changedower(&pa href="+code=dava" class="sref">davap/a>->p2tL191" cl2ss="line" namoptL191">o121p/a>2pdavap/a>->pa hreFP_KERNEL2 class="sref">GFP_KERNEL2/a>);29a href="drivers/power/max8903_charger idptL273" class="line" namoptL273">o273p/a>                        pa href="+code=dev_err" class="srefailed:rrower(p36">1 registe2 href="+code=dev" class="sref">devp/a>, pspa1 class="string">&ef="+code2NULL" class="sref">NULLp2a>) {2o275p/a>                        goto pCannot al2ocate memory.\n"p/s2a14);29a href="drivers/power/max8903_charger.c#L205" idptL205" cl="+code=E2OMEM" class="sref">ENOME2p/a>;29a href="drivers/power/max8903_charger.c#L206" idpass="line2 namoptL1936">196p/a>   2    }29a href="drivers/power/max8903_charger.c#L207" idptL207" class="line" namoptL207">o207p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+codpdava" cl2ss="sref">max8903_pdavap2a>));29a href="drivers/powerrs/power/max890" idptL274" class="line" nams="line" namoptrequest_tlinaded_/a> pa href="+coderequest_tlinaded_/a>ptL273">o273p/a>    namopto_/a> pa href="+codenamopto_/a>272p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa hre,va" class="sref">pdavap/a>->pa href="+codpL278" claode=dev" class="sref">de2p/a>;29a href="drivers/power/max8903_charger.c#L209" idptL23">o193p/a>        if (pa het_
  pdavap/a>->pa href="+co3ref="+cod3=dava" class="sref">dava3/a>);30a href="drivers/power/max8903_charger.c#L209" idptL2IRQF_TRIGG" cFALLING85" class="lineIRQF_TRIGG" cFALLING hrefef="+code=cen" clIRQF_TRIGG" cRISING85" class="lineIRQF_TRIGG" cRISINGpa heva" class="sref">pdavap/a>->pa href="+co3r1f="+cod3= class="sref">usb_inp/a30p/a>30a href="drivers/power/max8903_charger."+code=dev_err" class="sreMAX>ev_eINf="+code=dev" class="sref">devplatform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3="+code=f3lso" class="sref">falsop3a>) {3pdavap/a>->pa hr3No 
  id 3ower sources.\n"p/s3a14);3o194p/a>                pa href="+code=dev_err" class="sref">dev_request /a>>pad forev_e(gt;pad)ref="+code=dev" ode=pdava" class="sref">pdavap/a>->pa hr3N4 
  id 3oULL" class="sref">NULLp3p/a>;3 pa href="+codenamopto_/a>272p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa hre,rrs/power/max890" idptL274" class="line"  href="+code=pdev" class="sref">pdevp/a>, pa 3=5 
  id 3ocate memory.\n"p/s3ower;30a href="drivers/power/max8903_charger.c#L275" idptL2_pply_changedower(&tL2_pplamoptL275">o275p/a>                        goto 3ass="line3 namoptL205">o205p/a>   3    }30a href="drivers/power/max8903_charger.c#L276" idptL276" class="li3tL206" cl3ss="line" namoptL206">o236p/a>30a href="drivers/power/max8903_charger.c#L277" idptL277" c3e=dc_
  i3" class="sref">dc_
  idp3a>) {30a href="drivers/power/max8903_charger.c#L278" id3de=dok" c3ass="sref">dokp/a>) &3&30a href="drivers/power/max8903_charger.c#L233" idptL233" class="line" namoptL233">o233p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa href="+code3ref="+cod3=dcm" class="sref">dcmp/3>)) {3 pa href="+coderequest_tlinaded_/a>ptL273">o273p/a>    namopto_/a> pa href="+codenamopto_/a>272p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa hre ode=pdava" class="sref">pdavap/a>->pa hr3omment">/3 PULL_UPed Interrupt */p3spa143o193p/a>        if (pa het_
  pdavap/a>->pa href="+co3de=gpio" 3lass="sref">gpiop/a>) ? 3 : 1;31a href="drivers/power/max8903rs/powerrs/power/max890IRQF_TRIGG" cFALLING85" class="lineIRQF_TRIGG" cFALLING hrefef="+code=cen" clIRQF_TRIGG" cRISING85" class="lineIRQF_TRIGG" cRISINGpa heva" class="sref">pdavap/a>->pa href="+co3tL212" cl3ss="line" namoptL212">o232p/a>3devplatform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3spa1 clas3="comment">/* Output */p3spa143pdavap/a>->pa hr3f="+code=3a_in" class="sref">ta_in3/a>);3o194p/a>                pa href="+code=dev_err" class="sref">dev_request /a>>pad forev_er(gt;pad)ref="+code=dev" ode=pdava" class="sref">pdavap/a>->pa hr3ptL215">o315p/a>                } 3lse {3272p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa hre rrs/power/max890" idptL274" class="line"  href="+code=pdev" class="sref">pdevp/a>, pa 3s wired, 3OK and DCM should"p3spa143 pa href="+codetL2_dc_/a>amoptL275">o275p/a>                        goto 3quot; be 3ired as well.\n"p/s3a14);3EINVA3p/a>;31a href="drivers/power/max8903_charger.c#L269" idptL269" c3a href="+3ode=err" class="sref">er3ower;32a href="drivers/power/max8903_charger.c#L270" id3e" namopt3220">o220p/a>           3    }32a href="drivers/power/max8903_charger.c#L271" idptL271" class="line" namoptL271">o263p/a>        if (pa href="+code=pdava" class="sref">pdavap/a>->pa3ne" namop3L221">o221p/a>        } 3lse {3 pa href="+coderequest_tlinaded_/a>ptL273">o273p/a>    namopto_/a> pa href="+codenamopto_/a>272p/a>                if (!pa href="+code=gpio_is_
  id" class="srefo263p/a>        if (pa hre ode=pdava" class="sref">pdavap/a>->pa hr3href="+co3e=dcm" class="sref">dcmp3a>) {3o193p/a>        if (pa het_
  o279p/a>      c" classL279"pa heva" class="sref">pdavap/a>->pa href="+co3 href="+c3de=dcm" class="sref">dcm3/a>))3pdavap/a>->pa href="+co3ef="+code3dcm" class="sref">dcmp/a3, 0);3devplatform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3">o225p/a3                        3lse {3pdavap/a>->pa hr3"In
3 id pin: dcm.\n"p/s3a14);3o194p/a>                pa href="+code=dev_err" class="sref">dev_request /a>>pad foreF279"r(gt;pad)ref="+code=dev" ode=pdava" class="sref">pdavap/a>->pa hr3="+code=E3NVAL" class="sref">EINVA3p/a>;3272p/a>                if (!pa href="+code=gpio_is_
  id" class="srefo263p/a>        if (pa hre rrs/power/max890" idptL274" class="line"  href="+code=pdev" class="sref">pdevp/a>, pa 3a href="+3ode=err" class="sref">er3ower;3 pa href="+codetL2_" nama>amoptL275">o275p/a>                        goto 3tL229">o239p/a>                   3    }3o230p/a>           3    }3o231p/a>   3    }3o232p/a>3o190p/a>        int pa href="+3usb_
  id3 class="sref">usb_
  idp3a>) {33a href="drivers/power/max8903_charger.c#L254" id3ref="+cod3=uok" class="sref">uokp/3>)) {3 pa href="+codetL2_" nama>amopde=psy" class="sref">psyp/a>.pa href="+c2D"s3a href="+3ode=uok" class="sref">uo3p/a>;3o233p/a>        if (pa href="+code=pdae=psy" class="sref">psyp/a>.pa href="+c2D"s3aquot;In
3lass="sref">gpiop/a>) ? 3 : 1;3ptL273">o273p/a>    namopto_/a> pa href="+codenamopto_/a>272p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa hre class="sref">devplatform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3ptL237">o337p/a>                } 3lse {3 pa href="+codetL2_dc_/a>amopde=psy" class="sref">psyp/a>.pa href="+c2D"s3a href="+3 should be wired."p3spa1433a href="drivers/power/max8903_charger.c#L233" idptL233" class="line" namoptL233">o207p/a>        if (pa href="+code=pe=psy" class="sref">psyp/a>.pa href="+c2D"s3"string">3quot;as well.\n"p/s3a14);3ptL273">o273p/a>    namopto_/a> pa href="+codenamopto_/a>272p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa hre,rrs/power/max890platform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3="+code=E3NVAL" class="sref">EINVA3p/a>;3psyp/a>.pa href="+c2D"s3a href="+3ode=err" class="sref">er3ower;315unregiste275" class="lineLx8901536">15unregiste2272p/         pa href="+code=power_supply_changed" class="sref">power_supply_changedower(&pa href="+code=dava" class="sref">davap/a>->p3e" namopt3242">o242p/a>           3    }3psyp/a>.pa href="+c2D"s3asb_
  id3 namoptL243">o243p/a>   3    }34a href="drivers/power/max890koreey_changedower(&koreene" namoptL194">o194platform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3=ef="+cod3ss="line" namoptL244">o234p/a>3pdevp/a>, pa 3= href="+3e=cen" class="sref">cenp3a>) {3cenp/3>)) {3o3s="sref">usb_inp/a>) ? 03: 1);3pdpa href="+evicey_changedower(&pa href="+evice href*a>               "+code=platform_set_drvdape=psy" class="sref">psyp/a>.pa href="+c2D"s3" href="+348p/a>                } 3lse {3pdavap/a>->pa hr3"In
3 id pin: cen.\n"p/s3a14);3davap/a> =opa href="+code=kzalloc" class="sref">f*a>             arger.c#L193" idptL193" class class="sref">pdpa href="gc#L199" idptL199" class="line" namgptL199">o199p/a>        pa href="+code=platform_set_drvda href="+code=pdev" class="sref">pdevp/a>, pa 3="+code=E3NVAL" class="sref">EINVA3p/a>;35a href="drivers/power/max8903_charger.c#L191" id3a href="+3ode=err" class="sref">er3ower;35a href="drivers/power/max8903_chplatform_set_drvdavaower(pa +code=pdava" class="sref">pdavap/a>->pa hr3e" namopt3252">o252p/a>           3    }35a href="drivers/powerpdava" class="sref">pdavap/a>, pa href="+code=pdava" class="sref">pf*a>                if (!pa href="+code=gpio_iss s="line" namoptL197">o197p/a>        pa href="+code=memcpy" class="sref">memcpyower(&pa hrefhref="+code=pdev" class="sref">pdevp/a>, pa 3=sb_
  id3 namoptL253">o253p/a>   3    }3o234p/a>35a href="drivers/powerrs/power/max8903_charger.c#L271" idptL271" class="line" namoptL271">o263p/a>        if (pa href="drivers/power/max8903_charger.c#L254" id3t href="+3e=chg" class="sref">chgp3a>) {3ptL273">o273p/a>    namopto_/a> pa href="+codenamopto_/a>272p/a>                if (!pa href="+code=gpio_is_
  id" class="srefo263p/a>        if (pa hre rrs/power/max890platform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3ref="+cod3=chg" class="sref">chgp/3>)) {3o233p/a>        if (pa href="+code=pdae=psy" class="sref">psyp/a>.pa href="+c2D"s3"In
3 id pin: chg.\n"p/s3a14);3ptL273">o273p/a>    namopto_/a> pa href="+codenamopto_/a>272p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa hre class="sref">devplatform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3="+code=E3NVAL" class="sref">EINVA3p/a>;3o207p/a>        if (pa href="+code=pe=psy" class="sref">psyp/a>.pa href="+c2D"s3a href="+3ode=err" class="sref">er3ower;3ptL273">o273p/a>    namopto_/a> pa href="+codenamopto_/a>272p/a>                if (!pa href="+code=gpio_is_
  id" class="sref">gpio_is_
  idower(pa hre,rrs/power/max890platform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3e" namopt3260">o260p/a>           3    }315unregiste275" class="lineLx8901536">15unregiste2272p/         pa href="+code=power_supply_changed" class="sref">power_supply_changedower(&pa href="+code=dava" class="sref">davap/a>->p3ass="line3 namoptL261">o261p/a>   3    }36a href="drivers/powerrs/power/max890koreey_changedower(&koreene" namoptL194">o194platform_set_drvdavaower(pa href="+code=pdev" class="sref">pdevp/a>, pa 3tL262" cl3ss="line" namoptL262">o232p/a>36a href="drivers/power/max8903_charger.c#L253" idptL253" c3href="+co3e=flt" class="sref">fltp3a>) {36a href="drivers/power/max8903_charger.c#L254" id3ref="+cod3=flt" class="sref">fltp/3>)) {36a href="drive/max890e" namoptL190">o190p/a>        int pa href="+3"In
3 id pin: flt.\n"p/s3a14);36a hrers/power/max8903_charger.c#L231" idptL231" c3="+code=E3NVAL" class="sref">EINVA3p/a>;36a hres/power/max8903_charger.c#L231" idptL231" c3a href="+3ode=err" class="sref">er3ower;36a hrestatic0pdava" class="sref">pdpa href="+8903_y_changedower(&pa href="+8903_ hrefss="sref">davap/a> =opa 8903_y_changedower(&/a> =opa 8903_io_iss code=pdava" class="sref">pdavap/a>->pa hr3e" namopt3268">o268p/a>           3    }3pdavap/a>->pa href="+co3ass="line3 namoptL269">o269p/a>   3    }370 href="drivehref="+code=davaremovey_changedower(&removene" =code=dava" class=__  pexii_pdptL274" class=__  pexii_pne" namoptL194">o194c#L231" removey_changedower(&c#L231" removene" e ode=pdava" class="sref">pdavap/a>->pa hr3tL270" cl3ss="line" namoptL270">o230p/a>3pdavap/a>->pa hr3ef="+code3usus" class="sref">ususp3a>) {3davap/a>-> ;pa href="+code=psy" class="sref">psy-/a>.pa href="+code=n ode=pdava" class="sref">pdavap/a>->pa hr3tL262" cl3sus" class="sref">ususp/3>)) {3pdavap/a>->pa href="+co3aref="+co3id pin: usus.\n"p/s3a14);3pdavap/a>->pa href="+co3aef="+cod3NVAL" class="sref">EINVA3p/a>;3o190p/a>        int pa href="+3a href="+3ode=err" class="sref">er3ower;37a href="drivers/power/max8903_charger.c#L206" id3e" namopt32736">276p/a>           3    }3o194codule_pa href="+8903_y_changedower(&codule_pa href="+8903_ne" namoptL194">o194c#L231"  8903_y_changedower(&/a> =opa 8903_io_i href="+code=pdev" class="sref">pdevp/a>, pa 3ass="line3 namoptL277">o277p/a>   3    }3o238p/a>3o194MODULE_LICENSEio_is_
  idowerMODULE_LICENSEne" nahref="+code=psy" class="srGPLef="+code=dev" class="sref">devp/a>, pspa1 class="string">3ef="+code3falso" class="sref">fals3p/a>;3o194MODULE_DESCRIPTIONio_is_
  idowerMODULE_DESCRIPTIONne" nahref="+code=psy" class="srMAX>eC="stri D">devef="+code=dev" class="sref">devp/a>, pspa1 class="string">3eL270" cl3ta_in" class="sref">ta_i3p/a>;38a hreger.c#L275" idpMODULE_AUTHORio_is_
  idowerMODULE_AUTHORne" nahref="+code=psy" class="srMyungJoo Ham &lsreyungjoo.ham@samsung.comass=ef="+code=dev" class="sref">devp/a>, pspa1 class="string">3ef="+code3b_in" class="sref">usb_i3p/a>;3psy-/a>.pa href="+code=n" class="sref">devp/a>, pspa1 class="string">3eL262" cl3ss="line" namoptL282">o232p/a>3


The original LXR software by the lass="srehttp://sourcerefge.net/projects/lx27>LXR communit8="+c, this experimental devpion by lass="sremailto:lx2@amoux.no">lx2@amoux.no="+c.
lx2.amoux.no kindly hosted by lass="srehttp://www.redpill-amopro.no">Redpill Lmopro Aane" , providri of Lmoux consult" c and operations services since 1995.