linux/drivers/mfd/ab3100-core.c
<<
>>
Prefs
   1/*
   2 * Copyright (C) 2007-2010 ST-Ericsson
   3 * License terms: GNU General Public License (GPL) version 2
   4 * Low-level core for exclusive access to the AB3100 IC on the I2C bus
   5 * and some basic chip-configuration.
   6 * Author: Linus Walleij <linus.walleij@stericsson.com>
   7 */
   8
   9#include <linux/i2c.h>
  10#include <linux/mutex.h>
  11#include <linux/list.h>
  12#include <linux/notifier.h>
  13#include <linux/slab.h>
  14#include <linux/err.h>
  15#include <linux/module.h>
  16#include <linux/platform_device.h>
  17#include <linux/device.h>
  18#include <linux/interrupt.h>
  19#include <linux/random.h>
  20#include <linux/debugfs.h>
  21#include <linux/seq_file.h>
  22#include <linux/uaccess.h>
  23#include <linux/mfd/core.h>
  24#include <linux/mfd/abx500.h>
  25
  26/* These are the only registers inside AB3100 used in this main file */
  27
  28/* Interrupt event registers */
  29#define AB3100_EVENTA1          0x21
  30#define AB3100_EVENTA2          0x22
  31#define AB3100_EVENTA3          0x23
  32
  33/* AB3100 DAC converter registers */
  34#define AB3100_DIS              0x00
  35#define AB3100_D0C              0x01
  36#define AB3100_D1C              0x02
  37#define AB3100_D2C              0x03
  38#define AB3100_D3C              0x04
  39
  40/* Chip ID register */
  41#define AB3100_CID              0x20
  42
  43/* AB3100 interrupt registers */
  44#define AB3100_IMRA1            0x24
  45#define AB3100_IMRA2            0x25
  46#define AB3100_IMRA3            0x26
  47#define AB3100_IMRB1            0x2B
  48#define AB3100_IMRB2            0x2C
  49#define AB3100_IMRB3            0x2D
  50
  51/* System Power Monitoring and control registers */
  52#define AB3100_MCA              0x2E
  53#define AB3100_MCB              0x2F
  54
  55/* SIM power up */
  56#define AB3100_SUP              0x50
  57
  58/*
  59 * I2C communication
  60 *
  61 * The AB3100 is usually assigned address 0x48 (7-bit)
  62 * The chip is defined in the platform i2c_board_data section.
  63 */
  64static int ab3100_get_chip_id(struct device *dev)
  65{
  66        struct ab3100 *ab3100 = dev_get_drvdata(dev->parent);
  67
  68        return (int)ab3100->chip_id;
  69}
  70
  71static int ab3100_set_register_interruptible(struct ab3100 *ab3100,
  72        u8 reg, u8 regval)
  73{
  74        u8 regandval[2] = {reg, regval};
  75        int err;
  76
  77        err = mutex_lock_interruptible(&ab3100->access_mutex);
  78        if (err)
  79                return err;
  80
  81        /*
  82         * A two-byte write message with the first byte containing the register
  83         * number and the second byte containing the value to be written
  84         * effectively sets a register in the AB3100.
  85         */
  86        err = i2c_master_send(ab3100->i2c_client, regandval, 2);
  87        if (err < 0) {
  88                dev_err(ab3100->dev,
  89                        "write error (write register): %d\n",
  90                        err);
  91        } else if (err != 2) {
  92                dev_err(ab3100->dev,
  93                        "write error (write register) "
  94                        "%d bytes transferred (expected 2)\n",
  95                        err);
  96                err = -EIO;
  97        } else {
  98                /* All is well */
  99                err = 0;
 100        }
 101        mutex_unlock(&ab3100->access_mutex);
 102        return err;
 103}
 104
 105static int set_register_interruptible(struct device *dev,
 106        u8 bank, u8 reg, u8 value)
 107{
 108        struct ab3100 *ab3100 = dev_get_drvdata(dev->parent);
 109
 110        return ab3100_set_register_interruptible(ab3100, reg, value);
 111}
 112
 113/*
 114 * The test registers exist at an I2C bus address up one
 115 * from the ordinary base. They are not supposed to be used
 116 * in production code, but sometimes you have to do that
 117 * anyway. It's currently only used from this file so declare
 118 * it static and do not export.
 119 */
 120static int ab3100_set_test_register_interruptible(struct ab3100 *ab3100,
 121                                    u8 reg, u8 regval)
 122{
 123        u8 regandval[2] = {reg, regval};
 124        int err;
 125
 126        err = mutex_lock_interruptible(&ab3100->access_mutex);
 127        if (err)
 128                return err;
 129
 130        err = i2c_master_send(ab3100->testreg_client, regandval, 2);
 131        if (err < 0) {
 132                dev_err(ab3100->dev,
 133                        "write error (write test register): %d\n",
 134                        err);
 135        } else if (err != 2) {
 136                dev_err(ab3100->dev,
 137                        "write error (write test register) "
 138                        "%d bytes transferred (expected 2)\n",
 139                        err);
 140                err = -EIO;
 141        } else {
 142                /* All is well */
 143                err = 0;
 144        }
 145        mutex_unlock(&ab3100->access_mutex);
 146
 147        return err;
 148}
 149
 150static int ab3100_get_register_interruptible(struct ab3100 *ab3100,
 151                                             u8 reg, u8 *regval)
 152{
 153        int err;
 154
 155        err = mutex_lock_interruptible(&ab3100->access_mutex);
 156        if (err)
 157                return err;
 158
 159        /*
 160         * AB3100 require an I2C "stop" command between each message, else
 161         * it will not work. The only way of achieveing this with the
 162         * message transport layer is to send the read and write messages
 163         * separately.
 164         */
 165        err = i2c_master_send(ab3100->i2c_client, &reg, 1);
 166        if (err < 0) {
 167                dev_err(ab3100->dev,
 168                        "write error (send register address): %d\n",
 169                        err);
 170                goto get_reg_out_unlock;
 171        } else if (err != 1) {
 172                dev_err(ab3100->dev,
 173                        "write error (send register address) "
 174                        "%d bytes transferred (expected 1)\n",
 175                        err);
 176                err = -EIO;
 177                goto get_reg_out_unlock;
 178        } else {
 179                /* All is well */
 180                err = 0;
 181        }
 182
 183        err = i2c_master_recv(ab3100->i2c_client, regval, 1);
 184        if (err < 0) {
 185                dev_err(ab3100->dev,
 186                        "write error (read register): %d\n",
 187                        err);
 188                goto get_reg_out_unlock;
 189        } else if (err != 1) {
 190                dev_err(ab3100->dev,
 191                        "write error (read register) "
 192                        "%d bytes transferred (expected 1)\n",
 193                        err);
 194                err = -EIO;
 195                goto get_reg_out_unlock;
 196        } else {
 197                /* All is well */
 198                err = 0;
 199        }
 200
 201 get_reg_out_unlock:
 202        mutex_unlock(&ab3100->access_mutex);
 203        return err;
 204}
 205
 206static int get_register_interruptible(struct device *dev, u8 bank, u8 reg,
 207                                      u8 *value)
 208{
 209        struct ab3100 *ab3100 = dev_get_drvdata(dev->parent);
 210
 211        return ab3100_get_register_interruptible(ab3100, reg, value);
 212}
 213
 214static int ab3100_get_register_page_interruptible(struct ab3100 *ab3100,
 215                             u8 first_reg, u8 *regvals, u8 numregs)
 216{
 217        int err;
 218
 219        if (ab3100->chip_id == 0xa0 ||
 220            ab3100->chip_id == 0xa1)
 221                /* These don't support paged reads */
 222                return -EIO;
 223
 224        err = mutex_lock_interruptible(&ab3100->access_mutex);
 225        if (err)
 226                return err;
 227
 228        /*
 229         * Paged read also require an I2C "stop" command.
 230         */
 231        err = i2c_master_send(ab3100->i2c_client, &first_reg, 1);
 232        if (err < 0) {
 233                dev_err(ab3100->dev,
 234                        "write error (send first register address): %d\n",
 235                        err);
 236                goto get_reg_page_out_unlock;
 237        } else if (err != 1) {
 238                dev_err(ab3100->dev,
 239                        "write error (send first register address) "
 240                        "%d bytes transferred (expected 1)\n",
 241                        err);
 242                err = -EIO;
 243                goto get_reg_page_out_unlock;
 244        }
 245
 246        err = i2c_master_recv(ab3100->i2c_client, regvals, numregs);
 247        if (err < 0) {
 248                dev_err(ab3100->dev,
 249                        "write error (read register page): %d\n",
 250                        err);
 251                goto get_reg_page_out_unlock;
 252        } else if (err != numregs) {
 253                dev_err(ab3100->dev,
 254                        "write error (read register page) "
 255                        "%d bytes transferred (expected %d)\n",
 256                        err, numregs);
 257                err = -EIO;
 258                goto get_reg_page_out_unlock;
 259        }
 260
 261        /* All is well */
 262        err = 0;
 263
 264 get_reg_page_out_unlock:
 265        mutex_unlock(&ab3100->access_mutex);
 266        return err;
 267}
 268
 269static int get_register_page_interruptible(struct device *dev, u8 bank,
 270        u8 first_reg, u8 *regvals, u8 numregs)
 271{
 272        struct ab3100 *ab3100 = dev_get_drvdata(dev->parent);
 273
 274        return ab3100_get_register_page_interruptible(ab3100,
 275                        first_reg, regvals, numregs);
 276}
 277
 278static int ab3100_mask_and_set_register_interruptible(struct ab3100 *ab3100,
 279                                 u8 reg, u8 andmask, u8 ormask)
 280{
 281        u8 regandval[2] = {reg, 0};
 282        int err;
 283
 284        err = mutex_lock_interruptible(&ab3100->access_mutex);
 285        if (err)
 286                return err;
 287
 288        /* First read out the target register */
 289        err = i2c_master_send(ab3100->i2c_client, &reg, 1);
 290        if (err < 0) {
 291                dev_err(ab3100->dev,
 292                        "write error (maskset send address): %d\n",
 293                        err);
 294                goto get_maskset_unlock;
 295        } else if (err != 1) {
 296                dev_err(ab3100->dev,
 297                        "write error (maskset send address) "
 298                        "%d bytes transferred (expected 1)\n",
 299                        err);
 300                err = -EIO;
 301                goto get_maskset_unlock;
 302        }
 303
 304        err = i2c_master_recv(ab3100->i2c_client, &regandval[1], 1);
 305        if (err < 0) {
 306                dev_err(ab3100->dev,
 307                        "write error (maskset read register): %d\n",
 308                        err);
 309                goto get_maskset_unlock;
 310        } else if (err != 1) {
 311                dev_err(ab3100->dev,
 312                        "write error (maskset read register) "
 313                        "%d bytes transferred (expected 1)\n",
 314                        err);
 315                err = -EIO;
 316                goto get_maskset_unlock;
 317        }
 318
 319        /* Modify the register */
 320        regandval[1] &= andmask;
 321        regandval[1] |= ormask;
 322
 323        /* Write the register */
 324        err = i2c_master_send(ab3100->i2c_client, regandval, 2);
 325        if (err < 0) {
 326                dev_err(ab3100->dev,
 327                        "write error (write register): %d\n",
 328                        err);
 329                goto get_maskset_unlock;
 330        } else if (err != 2) {
 331                dev_err(ab3100->dev,
 332                        "write error (write register) "
 333                        "%d bytes transferred (expected 2)\n",
 334                        err);
 335                err = -EIO;
 336                goto get_maskset_unlock;
 337        }
 338
 339        /* All is well */
 340        err = 0;
 341
 342 get_maskset_unlock:
 343        mutex_unlock(&ab3100->access_mutex);
 344        return err;
 345}
 346
 347static int mask_and_set_register_interruptible(struct device *dev, u8 bank,
 348        u8 reg, u8 bitmask, u8 bitvalues)
 349{
 350        struct ab3100 *ab3100 = dev_get_drvdata(dev->parent);
 351
 352        return ab3100_mask_and_set_register_interruptible(ab3100,
 353                        reg, bitmask, (bitmask & bitvalues));
 354}
 355
 356/*
 357 * Register a simple callback for handling any AB3100 events.
 358 */
 359int ab3100_event_register(struct ab3100 *ab3100,
 360                          struct notifier_block *nb)
 361{
 362        return blocking_notifier_chain_register(&ab3100->event_subscribers,
 363                                               nb);
 364}
 365EXPORT_SYMBOL(ab3100_event_register);
 366
 367/*
 368 * Remove a previously registered callback.
 369 */
 370int ab3100_event_unregister(struct ab3100 *ab3100,
 371                            struct notifier_block *nb)
 372{
 373  return blocking_notifier_chain_unregister(&ab3100->event_subscribers,
 374                                            nb);
 375}
 376EXPORT_SYMBOL(ab3100_event_unregister);
 377
 378
 379static int ab3100_event_registers_startup_state_get(struct device *dev,
 380                                             u8 *event)
 381{
 382        struct ab3100 *ab3100 = dev_get_drvdata(dev->parent);
 383        if (!ab3100->startup_events_read)
 384                return -EAGAIN; /* Try again later */
 385        memcpy(event, ab3100->startup_events, 3);
 386        return 0;
 387}
 388
 389static struct abx500_ops ab3100_ops = {
 390        .get_chip_id = ab3100_get_chip_id,
 391        .set_register = set_register_interruptible,
 392        .get_register = get_register_interruptible,
 393        .get_register_page = get_register_page_interruptible,
 394        .set_register_page = NULL,
 395        .mask_and_set_register = mask_and_set_register_interruptible,
 396        .event_registers_startup_state_get =
 397                ab3100_event_registers_startup_state_get,
 398        .startup_irq_enabled = NULL,
 399};
 400
 401/*
 402 * This is a threaded interrupt handler so we can make some
 403 * I2C calls etc.
 404 */
 405static irqreturn_t ab3100_irq_handler(int irq, void *data)
 406{
 407        struct ab3100 *ab3100 = data;
 408        u8 event_regs[3];
 409        u32 fatevent;
 410        int err;
 411
 412        err = ab3100_get_register_page_interruptible(ab3100, AB3100_EVENTA1,
 413                                       event_regs, 3);
 414        if (err)
 415                goto err_event;
 416
 417        fatevent = (event_regs[0] << 16) |
 418                (event_regs[1] << 8) |
 419                event_regs[2];
 420
        [6"line" n struct regandval[1] |= 4a hre42 href="+code=dev" clame="L385"> 385        memcpy(event/a> rs/mfd/ab3100-cord="L417" class="line" name="L417"> 4179" id="L419" class="line" name="L419"> 4ref">ab31ers/mfd/ab3100-core.c#L342" id42ENTA1" class="sref">Ame="L385"> 385        memcpy(event/1> rs/mfd/ab3100-cord="L417" class="line" name="L417"> 4179" id="L419" class="line" name="L419"> 4         "> 323        startume="L385"> 385        memcpy(event/2> rs/mfd/ab3100-cord="L417" class="line" name="L417"> 417 4"line" nac_client, err
        [6"line"  rs/mfd/ab3100-corne"="L412"> 412ne"=#L415" id="L415" class="line" name="L415"> ame="L3254> 325        if ( 386        return 0;
ab3100 400
"write4error42 367/*e 73" clad peve 400
ersy're"driveestf="dr an id=act ="sersm.>/*ey will bL402" class="line" name="L402"> 40273" clad or all ref">e,sersn>ersy us href=ivers/mf ="sre402" class="line" name="L402"> 402eo deivem} e"linersy're"driveestf=href="drivers/mfd/ab3100-core.c#L403" id="L403ode=ab3104" class="sref">ab3100
&4uot;w43k" class="sref">get_maskset_3" id="L373" class=alls="lin"L412"> 4123" id="L373" class=alls="linf">er373  return blocking_notifier_chain_unregister(&ab4 "%d4bytes4transferred (expected 2)\n&quoode=err" class="sref">err 416
 398       e" name="L413"> 413                 "L334"> 344                   4    <43354" class="line" name="L354"> 354}
err = -4a href="+code=382        strudbf="drivers/mfd/astrudbff">err = dev_err(
err 416
 413                 "  337        }

 "line" na4e="L339"> 339       4event_regs[2];
 340      4 err)
err = dev_err(Amt;
 413                 sref">ab3400->access_mutex
 "L334"> 34"L344"> 344        r4turn 4a href="+code=err" class="sref">err;
 345}
access_mutex
 345}
u8<4a>  400
u8  400

dev-><4 href4"+code class="line" name="L378"> 378erine" name="L406"> 406 391        .q_fi">b3100-core.c#L407" idf="+code=event" cn_t nb)
(4a hre4="+code=ab3100ine" name="L406"> 406{
 407        f="+code=event" cn_t<>ab3100 =  ="sref">b4tmask & /* Write the registe">data;
;
 =L334"> 34rs/mfd/ab3100-core.c#L354" id=45="comment">/* Try again late">bank,
 =ef="driv4ers/mfd/ab3100-core.c#L345" id45345" class="line" name="L345"> 345}
err = 
 413                 ss="comme4t"> * Register a simple 4allba45ss="line" name="L337"> 337        }
ab3100 *4a hre4="+code=ab3100" class=/mfd/ab3100-core.c#L412" id="L412" ="line" name="L412"> 412        err = ;
 413                 r_block" 4lass="sref">notifier_blo4k46+code=err" class="sref">err != 2 .q_prefLf 391        .q_prefLff">err = 
err;
 413                 rref="dri4rs/mfd/ab3100-core.c#L364" id=4L361" class="l="+code=err" class="sref">err;
-&4t;startup_events, 3);
nb);
 354}
( 378 412 378erine" name="L406"> 406 412in406b3100-core.c#L407" idin406"L412"> 412in406b310,0ine" name="L406"> 406 391       fi">b3100-core.c#L407" idfi"> 391       fi">b310mfd/ab3100-core.c#L414" id="L414" classhref="dri4ers/mfd/ab3100-core.c#L346" id4"L366"struct starr =  412fef=le7openf">err =  391       fi">b310name="L385"> 385   aname="L397prefL397" id="L397" class="name="L397prefLf">ename="L385"> 385 412in406b310r =  413                 r358" id=4span class="comment"> * 4emove4a prevf="+code=nb" class="sref">nb);
event_regs[2];
ab3100 *4a hre47+code class=const0ine" name="L406"> 4067operlasons 391       fi">7operlasons="drivers/mfd/ab3100class="name="L397f="line" name="L389"> 389notifier_blo4k47="sref">set_register_interrupopen"L412"> 412openf">eers/mfd/ab3100-core.c#L41name="L397open"L412"> 412 378er" class="sref">dev_err(get_register_interrupine" name="L4"L32346"line"  rs/mfd/ab3100-cor .q_ine" name="L4"L32342.q_ine"f">er" class="sref">dev_err(get_register_page_interrupllseecore.c#L371" id=llseecne"  rs/mfd/ab3100-cor .q_lseecore.c#L371" id= .q_lseecf">er" class="sref">dev_err(er" class="sref">dev_err( ownnene"  rs/mfd/ab3100-corTHIS_MODULE" name="L405"> THIS_MODULEf">er" class="sref">dev_err(NULL,
 377
 406{
<   412        device4/a> *4a href="+code=ine" name="L406"> 406{
NULL,
u84*abooode=ab3100" clasbooo="drivers/mfd/ab3100m406"L412"> 412m406b310code=NULL" class="sref">NULL,
NULL,
dev-><4 href48ss="line" name="L302"> 302        }
-><4 href="+code=startup_eve4ts_re4d" claa> 412        erine" name="L406"> 406 391       fi">b3100-core.c#L407" idfi"> 391       fi">b310r" class="sref">dev_err(EAGAIN;  406<__usne" name="L405"> __usneb3100-core.c#L407" idusne_buf 391       usne_bufb310r" class="sref">dev_err(
ename="L385"> 385
 406{
<   412         412f" cne"  rs/mfd/ab3100-corfi"> 391       fi">b310>ab3100 = NULL,
 406{
 412f" cne" >        NULL,
a4x500_ops  406       bufb310[3419" id="L419" class="line" name="L419"> _id =4assizean>
       buf_sizeL407code=NULL" class="sref">NULL,
set_r"line" name="L378">clap="+code=event" clapL407code=NULL" class="sref">NULL,
get_runsigned long* Try again late"sne_cla"L412"> 412"sne_claL407code=NULL" class="sref">NULL,
-><4r_page_interruptible" cl4ss="s4ef">get_registclass="sref">fatevent;
set_register_page( 345}

 412minf">err = ena(sizeof/a>              uf 391       bufb310)-1tmask, (startup_irq_enabledevent_regs copy_from_usnef">err =        bufb310code=reg" class="ssne_buf 391       usne_bufb310rata" class="srefbuf_size 391       buf_sizeL407)mfd/ab3100-core.c#L414" id="L414" clas5ef="drive5s/mfd/ab3100-core.c#L3995 id="50"+code=ab3100" class=p_events_read)
       rFAULTers/mfd/ab3100-core.c#L410" id="L410" clas5href="dri5ers/mfd/ab3100-core.c#L450" id50code=andmask" class="sref">abuf 391       bufb310[ta" class="srefbuf_size 391       buf_sizeL407]ers/mfd/ab3100-core.c#L410" id="L410" clas5#L401" id5"L401" class="line" name5"L40150"+code=ormask" class="sref">ormask;
 * This is a thread5d int50L322" class="line" name="L322"> 322
 403 * I2C calls         ">/*e ideaspanhere ="sparspan> href= whichspaneithnef"
set_register_page * I2C calls         ">s="lin0xnss="lin"mfd/6"li0-coa name="L3, fd/s="lin0xaa 0xbbs="lin"mfdf"
ore.0-co0xbb ="sers name="L3 0xaa. First0
ohiteclace an iersn>bamen ="sparspaers name="L3href="drivers/mfd/ab3100-core.c#L403" id="L405ode=ab3105" class="sref">ab3100
u8  =  =        bufb310[ta" class="srefc="+code=event" d8" c]er=amt;
u32  410      5 int 51code=andmask" class="sref">aclap="+code=event" clapL407 class="line" namec="+code=event" d8" cmfd/ab3100-core.c#L410" id="L410" clas5=L401" id5ers/mfd/ab3100-core.c#L451" id51"+code=ormask" class="sref">ormask;
ab3500,  322
 * I2C calls         ">Advance por" cl ="sen iof> href= ersn>evem} lae402" class="line" name="L402"> 402 414      5 if (51404 * I2C calls         ">ers name="L3  href=.>/* 402ers  hrect_ hrtoul() funcasonhref="drivers/mfd/ab3100-core.c#L403" id="L405href="dri5ers/mfd/ab3100-core.c#L456" id51 356
event_ohile (rr =  =        bufb310[ta" class="srefc="+code=event" d8" c]e!=amt;
event_regs[1] << 8c="+code=event" d8" c++mfd/ab3100-core.c#L410" id="L410" clas5419  5             /* All is wel uf 391       bufb310[ta" class="srefc="+code=event" d8" c]eramt;
err;
regandval[1] |= 5a hre52L411" class="line" name="L411"> 411
er373  return        bufb310[ta" class="srefclap="+code=event" clapL407], 16or373  return  412"sne_claL407mask, (ab35ers/mfd/ab3100-core.c#L352" id52ENTA1" class="sref">event_regs, 3);
 323        startu="sref">access_mutex);
, event_regs 412"sne_claL407     b3xffmfd/ab3100-core.c#L414" id="L414" clas546class="5> 325        if ()
}
ab3100ab3100_event_unregister);
"write5error528322" class="line" name="L322"> 322
 4p" c"L412"> 412f" cne" >         412m406b310n struct  322
        } else if (<5 href53+code=err" class="sref">err != 2">bank,
bank,
 412"sne_claL407code=NULL" class="sref">NULL,
ab3100 385<">bank,
;
NULL,
ab35  &5uot;w53ss="line" name="L302"> 302        }
"%d5bytes5transferred (expected me="L406"> 406{
<   412        err = ;
 354                   5    <53354" class="line" name="L354"> 354}
err = -53 href="+code=EIO" claa>  return ;
err = dev_err(dev_err(event_regs=EIO" claa>  return ;
 339       5NULL,
 340      5 NULL,
 385<">bank,
bank,
 412"sne_claL407code=NULL" class="sref">NULL,
 3425Ame="L385"> 385<">bank,
;
5sref">ab3500-> 406<">bank,
;
NULL,
 35"L344"> 344        r5turn 54354" class="line" name="L354"> 354}
 322

u8<5a> 
u8 
dev-><5 href55+code=err" class="sref">err != 2c="+code=event" d8" c++mfd/ab3100-core.c#L410" id="L410" clas5href="dri5ers/mfd/ab3100-core.c#L351" id55 href="+code=dev" claohile (rr =  =        bufb310[ta" class="srefc="+code=event" d8" c]er=amt;
(5a hre55ENTA1" class="sref">Aass="sref">err != 2c="+code=event" d8" c++mfd/ab3100-core.c#L410" id="L410" clas5href">ab35tmask &  406<="sp="+code=event" ="spL407 class="line" namec="+code=event" d8" cmfd/ab3100-core.c#L410" id="L410" clas5=L334"> 35rs/mfd/ab3100-core.c#L355" id=55href="+code=err" clasohile (rr =  =        bufb310[ta" class="srefc="+code=event" d8" c]e!=amt;
err != 2c="+code=event" d8" c++mfd/ab3100-core.c#L410" id="L410" clas5href="dri5"L356" class="line" name5"L35655event_registers_startu>/* All is wel uf 391       bufb310[ta" class="srefc="+code=event" d8" c]eramt;
 * Register a simple 5allba55ss="line" name="L337"> 337        }
event_regs[1] << 81"> 411
er373  return        bufb310[ta" class="sref="sp="+code=event" ="spL407], 16or373  return ab3100 *5a hre5="+code=ab3100" class="sref">event_regs, 3);
notifier_blo5k56+code=err" class="sreeeeeeeee="sref">access_mutex);
event_regs 412"sne_claL407     b3xffmfd/ab3100-core.c#L414" id="L414" clas5100-&5t;Aass="srep_events_read)
}
 35rs/mfd/ab3100-core.c#L365" id=56href="+code=err" class="sref">err;
bank,
NULL,
(  return         .err = err;
 =
 412        err = ;
 337        }
 * 5emove56="sref">event_regs[1] << 8struinfodata;
err = dev_err(ine" name="L href="driversdebug.ore.eonam[0x/mfd/02x] wit             6t2" ="line" name="L412"> fd/ab310e=dev_err" class="sref">dev_err( 35rs/mfd/ab3100-core.c#L355" ref"+5  back37" id="L537" c53"sref">event_regs=EIO" claa>  return eer5/mfd/ab3100-core.c#L41na5e="L3573100-core.c#L414" id=et_register_pag 331 +code=bitmask" clas5=ref="dri5ers/mfd/ab3100-core.c#L356" id56event_reg5"        5ers/mfd/ab3100-core.c#L358" id5"L338" class="} else struct event_regs[2];
 "L334"> 34"ster_interruptibl4" cla4s="sref">set_r"line" name="L378">clap="+code=even5" releasr5e"  rs/mfd/ab3100-cor ef5le7re57class="line" name="L345"> 345}
 389       fick" 4lass="sref">notifier_/a>       fick" e_="sre100" class=+code=irqreturn_t" ="sp="+codri4ers/m5d/ab3100-core.c#L348" id5"L37857class="line" name="L398"> 398e="L397openf">er" class="sref">dev_err( 385   aname="L397pmp> 385ine" name="L href="a>;
         398ref">a>   aname="L39ref">="sref">dev_err(b3100-core.c#L407" idfi"> 391       fi">b100" class=t_regsine" name="L href=drivers/m5d/ab3100-core.c#L407" id5"L4075 class="line" q_lseecf">er" class="sref">dev_err(dev_errb100" class=t_regsine" name="L href=dlass="sr=s/mfd/ab3100m406"L412"> 512 302        }
-&5ev" c4ass5"sref">dev-><4 hr5f48ss58class="line" name="L322"> 322
        set_r"line" name="L378">clap="+code=even5ssizean="5rivers/mfd/ab3100class="5 4s="name="L397f="line" def="yame=5L369"57"+codf="yref=" >        clap="+code=even5s releasr5> 406<__usne" name="L4055> __u585la"L412"> 4s="name="L397f="line" "> 391       fi">b34lass="sref">notifier_/a>       fihref="+co="L397f="line" "> 391 ">b34lass="sref">notifier_/a> href="+ct_r"line" name="L378">clap="+code=even5swnnene" 5n>
 4s="name="L397f="line" def="yame=5L369"57"+codf="yref=" >        clap="+code=even5s"dri4ers5d/ab3100-core.c#L384" id5488hr587la"L412"> 4s="name="L397f="line" "> 391       fi">b34lass="sref">notifier_/a>       fihref="+co="L397f="line" "> 391 ">b34lass="sref">notifier_sa> href="+ct_r"line" name="L378">clap="+code=even5sri4ers/m5L412"> 412         4s="name="L397f="line" def="yame=5L369"57"+codf="yref=" >        clap="+code=even5sa>;
clap="+code=even5  bufb31053419" id="L419" class="l5ne" n5me="L4412"> 4ers/m>         412f" cne" >        Aass="srep_events_read)
   100" class=+code=irqreturn_t" ="sp="+co" clapL405code=NULL" class="sref">5ULL,
event_regs 512"sne_claL407code=N5LL" c59rred (expected me="L406"> 406{
<  se"+4ref="driv4     -core.c_c+5 89hriref="+code=ab310-core.c_c+5 89hrirev_err5rs/mfd/ab3100-core.c#L355"_irq_r="sre4041e" name="L413"> 413<          4    <43354" class="line" name="L354"> 354}
      _diref="+code=ab3100_irq_hdir">sess="sref">Aass="srep_events_read)
        .event_regs 322 412minf">err = event_regs=EIO" claa>  return  copy_from_usnef">err = <59ode=ab3100_get_regist14" id=et_register_pag 331 S_IRUGONULL" class="srS_IRUGO_reg5"        5ers/mf      _diref="+code=ab3100_irq_hdir">se5"        5ers/mf      o="sredata;
  return 6      rFAULTers/mfd/ab3160-cor6.c#L410" id="L410" claaaaaaaaaaaaaaaaatifier_chain_unregisternotifier_blo4k47="sref"s="line" name="L354"> 354}
      _  ficde=NULL" class="srf="+co_  ficde=">seb3100" class=/ine" name="L322"> 3226* This is a thread5d int60L32260="L348" c3100-core.c#L417" i">bank  return event_regsevent_regs 345}
 322 391 ">b34lass="sref">notifier_/a> href="+cq_lseecf">er" cl00-corp" c"L412"> 412f" cne"f">dev_err( 412f" cnede=dev" cla"sref">event_regs
 391 ">b34lass="sref">notifier_/a> href="+cq_lseecf">er" cle=get_masks5t_unl53"+code=aof" cver_strub310coalab3100-core.c#L37oalab cnede=dev" cla"sref">event_regsminf">err = event_regs=EIO" claa>  return  S_IWUSRNULL" class="srS_IWUSR_reg5"        5ers/mf      _diref="+code=ab3100_irq_hdir">se5"tifier_chain_unregister ">b34lass="sref">notifier_/a> href="+cnt_regs=EIO" claa>  return notifier_/a>       fick" e_="s="line" name="L354"> 354}
      _g     ficde=NULL" class="srf="+co_g     ficde=="+cb3100" class=/ine" name="L322"> 322bank  return event_regsevent_regs href= ersn>evem} l6e402"61e40415" id="L="line" name="L345"> 345}
 322 391 ">b34lass="sref">notifier_sa> href="+cq_lseecf">er" cl00-corp" c"L412"> 412f" cne"f">dev_err( 412f" cnede=dev" cla"sref">event_regs 61=event" cn_t
 391 ">b34lass="sref">notifier_sa> href="+cq_lseecf">er" cle=get_masks5t_unl53"+code=aof" cver_strub310ctr00-core.c#L358" itr00 cnede=dev" cla"sref">event_regsminf">err = event_regs=EIO" claa>  return   5    14" id=et_register_pag 331 S_IWUSRNULL" class="srS_IWUSR_reg5"        5ers/mf      _diref="+code=ab3100_irq_hdir">se5"tifier_chain_unregister ">b34lass="sref">notifier_sa> href="+cnt_regs=EIO" claa>  return notifier_/a>       fick" e_="s="line" name="L354"> 354}
r6gandval[1] |= 5a hre62L41162 buf_sizeL407"L41="L4"L323421      _s     ficde=NULL" class="srf="+co_s     ficde=="+cb3100" class=/ine" name="L322"> 322
bank  return event_regsevent_regs 345}
"sn6_claL407     b3xffmfd/ab6100-c6re.c#L414" id=me="L4de=dev" cla"sref">event_regs"write5error6283226 class4et_register_intexit_de00-oy_g100-core.c#L407" idfiexit_de00-oy_g100-co"+co:e= class="line" name="L400 Get us rcl6n8="sers 6ore.eoa name="L3nhere "t6.minf">err =       _g     ficde=NULL" class="srf="+co_g     ficde=="+cbde=dev" cla"sref">event_regs         412
      _  ficde=NULL" class="srf="+co_  ficde=">sebde=dev" cla"sref">event_regser-core.c_reid=5NULL" class="sr-core.c_reid=5ev_errL4"L323421      _diref="+code=ab3100_irq_hdir">sesde=dev" cla"sref">event_regs"%d5bytes6trans6erred 4et_register_intexit_no_-core.cNULL" class="srexit_no_-core.c"+co:e= class="line" name="L400 Get us rcl6i4ref="dr6ine" name="L412"> 412event_regs"sn6class="sref">err = -63 hre63class="line" name="L345"> 345}
;
err =  4et_register_intinerr        Aass="srep_events_read)
6"driversd6bug.6"li #L357" nam[0x/m6d/02x63="+code=ine" name="L406"> 406{
<  err =       _s     ficde=NULL" class="srf="+co_s     ficde=="+cbde=dev" cla"sref">event_regs 339<6a>   6   5err =       _g     ficde=NULL" class="srf="+co_g     ficde=="+cbde=dev" cla"sref">event_regs
      _  ficde=NULL" class="srf="+co_  ficde=">sebde=dev" cla"sref">event_regs;
      _diref="+code=ab3100_irq_hdir">sesde=dev" cla"sref">event_regs 345}
;6 345}
 412                 412f" cne" >        Aass="srep_events_read)
6riv5rs/mf6/ab3100-core.c#L345" id=64 hre6="+codde=ine" name="L406"> 406{
<  
 345}
 4et_register_intinerr        Aass="srep_events_read)
6 name="L36 o keepsparsef= ers  hre6=c.
 406{
<  event_regs[2];

event_regs[2];
 411
dev* Bas> 4set-up, ref=name="="src+5 8ion/de00-u51 3505" cI2C rs/mffk" cliously registered callb                *tc.6vent" ="s6L407 class="line" namec=6+code65lass="line" name="L402"> 402*   gotsets up a default100cfig ef">heu8that i6ohiteclace6ode=event6 d8" cefd/abta" class="s6efbuf65ass="line" name="L402"> 402<* will work as expectedcliously registered callb                *tc.6vpan>
err != 2c="+code=eve6     bufb610[ta" class="srefc="+co6e=eve65class="line" name="L322"> 322 391    ode=NULL" class="srf="+co_ini>    ode=ss="lde=ine" name="L406"> 406{
<  err = NULL,
 35"L344">ab-core.c#L407" idfi">-co"+code=dev" cla"sref">event_regs
NULL,
 35"L344">   ode=NULL" class="sr   ode=ss="de=dev" cla"sref">event_regs 302        }
-&6L412"> 416"sne_claL407     b3x6fmfd/66class="line" name="L322"> 322
<6a hrINVA76}
 391    ode=NULL" class="srf="+co_ini>    ode=ss="l="L397f="line" __-cvini>00claNULL" class="sr__-cvini>00clalass="line" name="L322"> 322
<6aent" ="s6/ab3100-core.c#L365" id=66href6"+code="L397f="line" "> 391    ode=cNULL" class="srf="+co_ini>    ode=ccode[]sre100" class=+code=irqreturn_t" ="sp="+c6;
ban6,
        .er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_MCAre.c#L407" idfispan c_MCA="+cnt_regs=EIO" claa>  return  412er" cl   ode=NULL" class="sr   ode=ss="=ormx01t_regs=EIO" claa>  return  * 5emove66="sr66 412minf"},=100" class=+code=irqreturn_t" ="sp="+c6; href="d6struinfof">err = er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_MCBre.c#L407" idfispan c_MCB="+cnt_regs=EIO" claa>  return er" cl   ode=NULL" class="sr   ode=ss="=ormx30t_regs=EIO" claa>  return eer6/mfd/ab3100-core.c#L41na6e="L3673100-core.c#L414" id=q_lseecf">er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_IMRA1re.c#L407" idfispan c_IMRA1="+cnt_regs=EIO" claa>  return er" cl   ode=NULL" class="sr   ode=ss="=ormx00t_regs=EIO" claa>  return ,
er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_IMRA2re.c#L407" idfispan c_IMRA2="+cnt_regs=EIO" claa>  return 
        .er" cl   ode=NULL" class="sr   ode=ss="=ormxFFt_regs=EIO" claa>  return ;
er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_IMRA3re.c#L407" idfispan c_IMRA3="+cnt_regs=EIO" claa>  return er" cl   ode=NULL" class="sr   ode=ss="=ormx01t_regs=EIO" claa>  return  612er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_IMRB1re.c#L407" idfispan c_IMRB1="+cnt_regs=EIO" claa>  return dev-><4 hr6f48ss683100-core.c#L414" id=q_lseecf">er" cl   ode=NULL" class="sr   ode=ss="=ormxBFt_regs=EIO" claa>  return er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_IMRB2re.c#L407" idfispan c_IMRB2="+cnt_regs=EIO" claa>  return  406<__usne" name="L4056> __u68/a>,
er" cl   ode=NULL" class="sr   ode=ss="=ormxFFt_regs=EIO" claa>  return 
er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_IMRB3re.c#L407" idfispan c_IMRB3="+cnt_regs=EIO" claa>  return  412        ;
er" cl   ode=NULL" class="sr   ode=ss="=ormxFFt_regs=EIO" claa>  return er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_SUPre.c#L407" idfispan c_SUP="+cnt_regs=EIO" claa>  return er" cl   ode=NULL" class="sr   ode=ss="=ormx00t_regs=EIO" claa>  return 6ULL,
er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_DISre.c#L407" idfispan c_DIS="+cnt_regs=EIO" claa>  return er" cl   ode=NULL" class="sr   ode=ss="=ormxF0t_regs=EIO" claa>  return         .er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_D0Cre.c#L407" idfispan c_D0C="+cnt_regs=EIO" claa>  return er" cl   ode=NULL" class="sr   ode=ss="=ormx00t_regs=EIO" claa>  return minf"},=100" class=+code=irqreturn_t" ="sp="+c6ame="L4056> copy_from_usnef">err = <69ode=ab3100_get_registq_lseecf">er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_D1Cre.c#L407" idfispan c_D1C="+cnt_regs=EIO" claa>  return 7      rFAULTers/mfd/ab3170-cor7.c#L410" id="L410" claq_lseecf">er" cl   ode=NULL" class="sr   ode=ss="=ormx00t_regs=EIO" claa>  return 7* This is a thread5d int70L32270="L348" c3100-core.c#q_lseecf">er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_D2Cre.c#L407" idfispan c_D2C="+cnt_regs=EIO" claa>  return 7*2"sne_claL407code=N7class70core.c#L344" id="L344q_lseecf">er" cl   ode=NULL" class="sr   ode=ss="=ormx00t_regs=EIO" claa>  return 7*/ab3100-core.c#L410" id7thnef70ass="line" na},=100" class=+code=irqreturn_t" ="sp="+c7="lin"mfd76"li0-coa name="L3, fd/s7"lin070/a>,
er" cl00-core.c#L407" idfi">-co"+co"+4ref="driv4     span c_D3Cre.c#L407" idfispan c_D3C="+cnt_regs=EIO" claa>  return         .er" cl   ode=NULL" class="sr   ode=ss="=ormx00t_regs=EIO" claa>  return =EIO" claa>  return  302        }
-&7t" d8" ce7d/abta" class="srefbuf_s7ze 3970class_r"line" name="L378">clap="+code=even7t" d8" c+7mfd/ab3100-core.c#L410" 7d="L471e="L4412"> 4" c4et_register_int__-cvini>NULL" class="sr__-cvini> h5"L334"> 35"L344">ab"+co_s  upNULL" class="srf="+co_s  upev_ername="L407 rs/mfd/ab3100-corp" c"L412"> 412f" cne" >        Aass="srep_events_read)
7apL407 cl7ss="line" namec="+code=e7ent" 71a>   100" class=+code=irqreturn_t" ="sp="+c7ab3500 302        }
-&7 href="dr7vers/mfd/ab3100-core.c5 7     71core.c#L344" " c4et_register_intL355" id=55href="+code=err" clasohile (rr =  href= ersn>evem} l7e402"71+code=err" class="sref">err,
 =        bufb310[tARRAY_SIZEre.c#L407" idfisRRAY_SIZEev_er="L397f="line" "> 391    ode=cNULL" class="srf="+co_ini>    ode=ccode)n4et_register_intL355" id=55href="+cod++b3100" class=/ine" name="L322"> 322        .err373  return        bufb3f="+co_s     fode=ab3100_get_register_page_interruptible" ref="drivers/mfd/ab3100-cors="sref">err;
 322 71  391    ode=cNULL" class="srf="+co_ini>    ode=ccode[et_register_intL355" id=55href="+cod]q_lseecf">er" cl00-core.c#L407" idfi">-co"+cok00" class=/ine" name="L322"> 322;
 391    ode=cNULL" class="srf="+co_ini>    ode=ccode[et_register_intL355" id=55href="+cod]q_lseecf">er" cl   ode=NULL" class="sr   ode=ss="sde=dev" cla"sref">event_regs  5     5lass="sref">notifier_blo5k56+code=err" class="sreeeeeeeee="sref">access_mute7b310[ta" 7lass="srefc="+code=event7 d8" 72" clas5="line" n5me="aaaaaaaagoto4et_register_intexit_no_s  upNULL" class="srexit_no_s  up+code=err" clasohile (rr = r7gandval[1] |= 5a hre72L41172 buf_sizeL407ass="sref">event_regs[2];

 322
<7drivers/m7d/ab3100-core.c#L414" id7"L41472core.c#L344" 00-core.c#L356" id54 356 40222222222* Special trick5a> make">hehe<32kHz" nock5(RTC) 402<22222222* bit 3 ef">estass="sref"mx02 is a special, undocu"> 4ed">est"write5error72832272an>
err != 2c="+code=eve7n8="sers 7ore.eoa name="L3nhere "t7.minf" 5lass="sref">notif"sredata;
 322             war/a>   aname="L39    war/-cors="sref">err;
ine" name="L href7i0-co"tc.7/span>
 35rs/mfd/ab3100-core.c#L355forcre5=chip"a> 32KHz" c53"sref">evesde=dev" cla"sref">event_regsbank  return        bufb3f="+co_s   >est   fode=ab3100_get_register_page_interruptible" r>est   fode=ab3100_get_regi-cors="sref">err;
 322"%d5bytes7trans73core.c#L344" id="L344" class=mx02,=mx08sde=dev" cla"sref">event_regs 412 345}
"sn7class="sref">err = -73 hre73"+code=EIO" claaine" name="L322"> 322;
err = event_regs 345}
 339<7a>   73class_r"line" name="L378">clap="+code=even7de=event"7="spL407code=NULL" class7"sref74de=dev" c5ass="sref">devheerr != 2c="+code=eve7e"sne_="s7edata;
 4s="name="L397f="line" a> _cel"sref="sp="+codea> _cel" h5"L334"> 35"L344">ab"+co_-cvcNULL" class="srf="+co_-cvccode[]sre100" class=+code=irqreturn_t" ="sp="+c7a href="d7ivers/mfd/ab3100-core.c#7348" 74="L348" c3100100" class=+code=irqreturn_t" ="sp="+c7arivers/m7ivers/mfd/ab3100="sredat7;74core.c#L344" id="L344q_lseecf">er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return er" clidta;
  return "sn7/ab3100-core.c#L345" id=74 hre74e.c#L414" id=},t_regs=EIO" claa>  return ;
er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return ;
er" clidta;
  return =EIO" claa>  return 
er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return er" clidta;
  return =EIO" claa>  return er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return 
        .er" clidta;
  return =EIO" claa>  return er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return er" clidta;
  return =EIO" claa>  return  417"sne_claL407     b3x7fmfd/76="L348" c3100100" class=+code=irqreturn_t" ="sp="+c7a hrINVA77}
er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return er" clidta;
  return ban76e.c#L414" id=},t_regs=EIO" claa>  return 
 412er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return  * 5emove76="sr76"sredata;
er" clidta;
  return err = =EIO" claa>  return er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return eer7/mfd/ab3100-core.c#L41na7e="L3773100-core.c#L414" id=q_lseecf">er" clidta;
  return =EIO" claa>  return ,
er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return 
        .er" clidta;
  return =EIO" claa>  return er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return er" clidta;
  return  712=EIO" claa>  return dev-><4 hr7f48ss78="L348" c3100100" class=+code=irqreturn_t" ="sp="+c7t;<4 href7"+code=startup_eve4ts_re7d" cl78core.c#L344" id="L344q_lseecf">er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return er" clidta;
  return =EIO" claa>  return 
er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return  412        ;
er" clidta;
  return =EIO" claa>  return er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return 7ULLer" clidta;
  return "sne_claL407code=N7LL" c793.c#L414" id=},t_regs=EIO" claa>  return ,
er" cl"sreNULL" class="sr"sreuf 391event_regs=EIO" claa>  return         .er" clidta;
  return =EIO" claa>  return  302        }
-&7ame="L4057> copy_from_usnef">err = <79class_r"line" name="L378">clap="+code=even8T 3918      rFAULTers/mfd/ab3180-cor80e="L441me="L407 rs/mfd/ab3100_family_idta;
NULL,
;
 302        }
-&8com5ent">8* This is a thread5d int80L32280="L348" c3100char3100 >         302        }
-&8c3m5ent">8*2"sne_claL407code=N8class80core. name="L302"> 302        }
-&8b4m5ent">8*/ab3100-core.c#L410" id8thnef80+code=err" class="sref">err,
fd/ab3100class="name="L397f="line" ">_family_idta;
00claNULL" class="sr__-cvini>00clalasssre100" class=+code=irqreturn_t" ="sp="+c8T6lin"mfd86_state_get" class4"sref8pastf80_get_register_" c5ass="sref">deverr != 2c="+code=eve8b7lin"mfd86n ilinure ivem} lasonb"83href807ss="line" na100" class=+code=irqreturn_t" ="sp="+c8T8lin"mfd86407 class="line" name=i8" cla80"sredata;
er" clidta;
  return er" cl"sreNULL" class="sr"sreuf 391er" clidta;
  return er" cl"sreNULL" class="sr"sreuf 3918vers/mfd/ab3100-core.c5 8     813lass="line" },=100" class=+code=irqreturn_t" ="sp="+c8 4ref="dr8 iof> href= ersn>evem} l8e402"81vent" d8" cmfd/ab3100q_lseecf">er" clidta;
  return ,
er" cl"sreNULL" class="sr"sreuf 391 81 er" clidta;
  return ;
er" cl"sreNULL" class="sr"sreuf 391er" clidta;
  return r8gandval[1] |= 5a hre82L41182#L410" id="L410" clasq_lseecf">er" cl"sreNULL" class="sr"sreuf 391
er" clidta;
  return er" cl"sreNULL" class="sr"sreuf 391        .er" clidta;
  return "write5error82832282 er" cl"sreNULL" class="sr"sreuf 391minf"},=100" class=+code=irqreturn_t" ="sp="+c8d" d8" c+8 >        er" clidta;
  return 
er" cl"sreNULL" class="sr"sreuf 391er" clidta;
  return "%d5bytes8trans83core.c#L344" id="L344q_lseecf">er" cl"sreNULL" class="sr"sreuf 391 412  return err = -83 hre835
deverr != 2c="+code=eve8/a>;
err = er" clidta;
  return  339<8a>   83ode=ab3100_get_registq_lseecf">er" clidta;
  return er" clidta;
;84core.c#L344" id="L344q_lseecf">er" clidta;
,
er" clidta;
er" clidta;
er" clidta;
er" clidta;
  return err != 2c="+code=eve8/4ref="dr8L407 class="line" namec=8+code854"L348" c3100100" class=+code=irqreturn_t" ="sp="+c8/2"sn8 d8" cefd/abta" class="s8efbuf85/a>,
er" clidta;
  return 
  return  302        }
-&8id=5L358"8class="line" name=5L358"85="sr858"L34ame="L302"> 302        }
-&8i" d8" c+8ivers/mfd/ab3100-cor hre8t_ hr85ode=a412"> 4" c4et_register_int__-cvini>NULL" class="sr__-cvini> h5"L334"> 35"L344">ab"+co_probeNULL" class="srab"+co_probe h5"rname="L407 rs/mfd/ab31i2c_clid54 a;
        ;
=EIO" claa>  return ;
        ;
access_mute8a"sne_="s8href="drivers/mfd/ab31008core.86a>   100" class=+code=irqreturn_t" ="sp="+c8L412"> 418"sne_claL407     b3x8fmfd/86="L348" c3100name="L407 rs/mfd/ab3100-corp" c"L412"> 412f" cne" >         302        }
-&8a hrINVA78}
 391         302        }
-&8a4ref="dr8/ab3100-core.c#L365" id=86href86vent" d8" cmfd/ab3100>        ;
er" clplatform_ref=NULL" class="srplatform_ref= cnename="L302"> 302        }
-&8a2"sn8re40413100-core.c#L417" 8">ban86e.c#L414" id=" c4et_register_inte.c#L365" id=56 href="+coname="L302"> 302        }
-&8apan>
 =  412 322 * 5emove86="sr86"sredata;407 rs/mfd/ab3100-corp" c"L412"> 412f" cne"1       bufb3odem_kzallocame=5L369"57"+codem_kzalloc h5"r&369" class="lineclid54 a;
 412f" cne),L407 rs/mfd/ab31GFP_KERNELp" c"L412"> 412GFP_KERNEL cne)e=err" clasohile (rr = err =  412f" cne)0100" class=+code=irqreturn_t" ="sp="+c8"driversd8bug.ore.eonam[0x/mfd/02x8 wit 8           6t2" ="line69" class="line" n_e.c#L365" id=56 hr" n_e.c h5"r&369" class="lineclid54 a;
evesde=dev" cla"sref">event_regs = eer8/mfd/ab3100-core.c#L41na8e="L3873100-core.c#L="line" name="L345"> 345}
 345}
ialize ref= name="="srode=err" class="sref">err != 2c="+code=eve8p
,
 412f" cned=5L369" class="lineaccess_mutexp" c"L412"> 412 = 
      69" class="lineBLOCKING_INIT_NOTIFIER_HEADp" c"L412"> 412BLOCKING_INIT_NOTIFIER_HEAD h5"r&369" class="line00-corp" c"L412"> 412f" cned=5L369" class="lineevd54_subscribe (#L365" id=56 hrevd54_subscribe ( cne)e=err" clasohile (rr =  322;407 rs/mfd/ab3100-corp" c"L412"> 412f" cned=5L369" class="linei2c_clid54 a;
       bufb3clid54 a;
 =          412f" cned=5L369" class="line" name=5L369"57"+code=ab3L1<&369" class="line00-corp" c"L412"> 412f" cned=5L369" class="linei2c_clid54 a;
 =  =  812        ;
 412f" cne)e=err" clasohile (rr = eer8"sref">dev-><4 hr8f48ss88class="line" name="L322"> 322
<8t;<4 href8"+code=startup_eve4ts_re8d" cl88core.c#L344" 00-core.c#L356" id54 356 Read=chip"ID ss="sref"ode=err" class="sref">err != 2c="+code=eve8dent" ="s8rivers/mfd/ab3100class="8         412f" cnenL407 rs/mfd/ab31span c_CIDp" c"L412"> 412span c_CID h5"nt_regs=EIO" claa>  return  412f" cned=5L369" class="linechip_idta;
 = notifier_blo5k56+code=err" 0100" class=+code=irqreturn_t" ="sp="+c8dL412" ="8d/ab3100-core.c#L384" id8488hr88  412        ;
heevesde=dev" cla"sref">event_regs56+codxit_no_detect=ab3e=err" clasohile (rr = event_regs[2];
8ULL 322
<8 ;<4 href812"sne_claL407code=N8LL" c893.c#L414" id=foreL407code=NULL" cr =  = er" clidta;
 322notifLdcNULL" class="sridccode[407code=NULL" cr = er" clidta;
 412f" cned=5L369" class="linechip_idta;
 322,
notifLdcNULL" class="sridccode[407code=NULL" cr = er" cl"sreNULL" class="sr"sreuf 39!1       bufb3NULLp" c"L412"> 412NULLuf 3)3100" class=/ine" name="L322"> 322
        .       bufb3snp-cotfp" c"L412"> 412snp-cotf h5"r&369" class="line00-corp" c"L412"> 412f" cned=5L369" class="linechip_"sreNULL" class="srchip_"srecode[0],00" class=+code=irqreturn_t" ="sp="+c8 L412" ="8an ilinure ivem} lasonb"8c. 412f" cned=5L369" class="linechip_"sreNULL" class="srchip_"srecode) - 1nt_regs=EIO" claa>  return ;
event_regs=EIO" claa>  return err = <89ode=ab3100_get_regist   .       bufb3LdcNULL" class="sridccode[407code=NULL" cr = er" cl"sreNULL" class="sr"sreuf 3sde=dev" cla"sref">event_regs9      rFAULTers/mfd/ab3190-cor9.c#L410" id="L410" claaaaaaaaaaaaaaaaabreakde=dev" cla"sref">event_regs9 rivers/mfd/ab3100buf_si9>    90#L410" id="L410" clas5=L334">} else3100" class=/ine" name="L322"> 3229* This is a thread5d int90L32290="L348" c3100-core.c#t_registc#L344" 0a>       bufb3" n_e.c#L365" id=56 hr" n_e.c h5"r&369" class="lineclid54 a;
9*2"sne_claL407code=N9class90core.c#L344" id="L344-core.c#t_registc#L344" 05rs/mfd/ab3100-core.c#L355spa000 is not suppor4ed" c53"sref">evesde=dev" cla"sref">event_regs9*/ab3100-core.c#L410" id9thnef90vent" d8" cmfd/ab31000000000000000000goto4et_register_intexit_no_detect_blo5k56+codxit_no_detect=ab3e=err" clasohile (rr = ,
}=err" clasohile (rr =         . =  =  302        }
-&9t" d8" ce9d/abta" class="srefbuf_s9ze 39909.c#L414" id= 5lass="sref">notifLdcNULL" class="sridccode[407code=NULL" cr = er" clidta;
 322;
eve,00" class=+code=irqreturn_t" ="sp="+c9apL407 cl9ss="line" namec="+code=e9ent" 91#L410" id="L410" clas" ="line69" class="line00-corp" c"L412"> 412f" cned=5L369" class="linechip_idta;
 = 9vers/mfd/ab3100-core.c5 9     91core.c#L344" id="L344-core.c#/5rs/mfd/ab3100-core.c#L355>he<4tle.c." c53"sref">evesde=dev" cla"sref">event_regs href= ersn>evem} l9e402"91vent" d8" cmfd/ab3100goto4et_register_intexit_no_detect_blo5k56+codxit_no_detect=ab3e=err" clasohile (rr = ,
 =  =  91 eve,00" class=+code=irqreturn_t" ="sp="+c9a8lin"mfd9d/abta" class="srefbuf_s9ze 3991"sredata;
 412f" cned=5L369" class="linechip_"sreNULL" class="srchip_"srecode[0]sde=dev" cla"sref">event_regsclap="+code=even9b310[ta" 9lass="srefc="+code=event9 d8" 92" clas5="line_" c5ass="sref">dev >he<>estass="sref"address"ode=err" class="sref">err != 2c="+code=eve9="s5ef">r9gandval[1] |= 5a hre92L41192" cmfd/ab3100-core.c#L410" i00-corp" c"L412"> 412f" cned=5L369" class="line>estss=_clid54 a;
       bufb3i2c_new_dummyNULL" class="sri2c_new_dummy h5"r>        ;
 412 412event_regs 412f" cned=5L369" class="line>estss=_clid54 a;
 322 = estss=_clid54 a;
 =  = "write5error92832292class="line" name="L322"> 322;407 rs/mfd/ab31373  return        bufb3f="+co_s  upNULL" class="srf="+co_s  up h5"r>         412f" cnesde=dev" cla"sref">event_regs        notifier_blo5k56+code=err" e=dev" cla"sref">event_regs
event_regsevent_regs  return        bufb3odem_request t   aded_irqame=5L369"57"+codem_request t   aded_irq h5"r&369" class="lineclid54 a;
"%d5bytes9trans93core.c#L344" id="L344" class= " c3100-core.c#69" class="lineclid54 a;
 412NULLuf 3nL407 rs/mfd/ab3100-cor_irq_handlefp" c"L412"> 412<0-cor_irq_handlef=ab3,00" class=+code=irqreturn_t" ="sp="+c9i4ref="dr9ine" name="L412"> 412 412IRQF_ONESHOT=ab3, /5rs/mfd/ab3100-core.c#L355eve,L407 rs/mfd/ab3100-corp" c"L412"> 412f" cne)e=err" clasohile (rr = err = -93 hre935
notifier_blo5k56+code=err" e=dev" cla"sref">event_regserr = event_regs 322;407 rs/mfd/ab31373  return        bufb3f=x5or_  fode=abopcNULL" class="srf=x5or_  fode=abopc h5"r&369" class="lineclid54 a;
 =  339<9a>   939.c#L414" id= 5lass="sref">notifier_blo5k56+code=err" e=dev" cla"sref">event_regsevent_regs;
event_regsdevheerr != 2c="+code=eve9arivers/m9ivers/mfd/ab3100="sredat9;943.c#L414" id=foreL407code=NULL" cr =  =  =          322         = er" clplatform_ref=NULL" class="srplatform_ref= cne91       bufb3f="+co_plf_ref=NULL" class="srab"+co_plf_ref= cnede=dev" cla"sref">event_regs,
 = er" clpref=_sizeNULL" class="srpref=_size cne91 =       }=err" clasohile (rr =  322;407 rs/mfd/ab31373  return        bufb3"> _add_-cvices  return  _add_-cvices h5"r&369" class="lineclid54 a;
         =          412NULLuf 3nL0nL407 rs/mfd/ab31NULLp" c"L412"> 412NULLuf 3)e=err" clasohile (rr =  =          412f" cnesde=dev" cla"sref">event_regs 322
<9ode=event9 d8" c++mfd/ab3100-core.9#L41095core.c#L344" "dri5rs0de=dev" cla"sref">event_regserr"sn9 d8" cefd/abta" class="s9efbuf95/a>,
err;
errerr;407 rs/mfd/ab31i2c_un  fode=ab-cviceNULL" class="sri2c_un  fode=ab-cvice h5"r>         412f" cned=5L369" class="line>estss=_clid54 a;
event_regsestss=_clid54 a;
err56+codxit_no_detect=ab3:=err" class="sref">err  return event_regs 419"sne_claL407     b3x9fmfd/96="L34}=err" clasohile (rr =  345}
 4" c4et_register_int__-cvdxit  return         ;
event_regs"sn9re40413100-core.c#L417" 9">ban96e.c#L100" class=/ine" name="L322"> 322
 412f" cne" >               bufb3i2c_g" rclid54ref=NULL" class="sri2c_g" rclid54ref= h5"r>        ;
event_regs 412 322 * 5emove96="sr96"sredata;4" c5ass="sref">deverr != 2c="+code=eve9"" d8" c+9struinfof">err =  _removi_-cvices  return  _removi_-cvices h5"r&369" class="lineclid54 a;
event_regsevent_regs         412f" cned=5L369" class="line>estss=_clid54 a;
event_regseer9/mfd/ab3100-core.c#L41na9e="L3973100-core.c#L"dri5rs0de=dev" cla"sref">event_regs = err,
fd/ab3100class="name="L397f="line" i2c_-cvice_idta;
;

      { /5rs/mfd/ab3100-core.c#L355eve,L0L=nt_regs=EIO" claa>  return  =  302        }
-&9"" d8" c+912         =         ;
event_regs =  912;
;
eer9"sref">dev-><4 hr9f48ss983100-core.c#Lq_lseecf">er" cl-hile ta;
er" cl"sreNULL" class="sr"sreuf 39 91eve,00" class=+code=irqreturn_t" ="sp="+c9dent" ="s9rivers/mfd/ab3100class="9er" clowne ta;
       bufb3THIS_MODULEta;
 406<__usne" name="L4059> __u98/a>,
=EIO" claa>  return 

er" clid_taegister_page_interid_taegi"L348" c3101       bufb3f="+co_idta;
  return er" clprobeNULL" class="srprobe h5"mfd/ab31001       bufb3f="+co_probeNULL" class="srab"+co_probe h5"nt_regs=EIO" claa>  return  412        ;q_lseecf">er" clremovister_page_interremovi h5"fd/ab31001       bufb3__-cvdxit_pNULL" class="sr__-cvdxit_p h5"r>        =EIO" claa>  return  302        }
-&9  bufb31093419" id="L419" class="l9ne" n99c#L41=err" clasohile (rr = NULL" class="sr__ini> h5"L334"> 35"L344">ab"+co_i2c_ini>NULL" class="srab"+co_i2c_ini> h5"rvoid e=dev" cla"sref">event_regs9ULL"sne_claL407code=N9LL" c99core.c#L344" "dri5rs="L397f="line" i2c_add_-hile ta;
event_regs = ,
=err" clasohile (rr =   return   return event_regs;407 rs/mfd/ab31i2c_del_-hile ta;
event_regs copy_from_usnef">err = <99ode=a}=err" clasohile (rr = err ,
=e/pre>err" clasohile (rr = call h5"r>        NULL" class="srab"+co_i2c_ini> h5")de=dev" cla"sref">event_regs    return           return event_regs"sne_claL407code=N   345}
}4bufb310   = 5rs/mfd/ab3100-core.c#L355Linus Walleij1<nlinus.walleij@de=aicsson.com=5L3c53"sref">evesde=dev" cla"sref">event_regs  = 5rs/mfd/ab3100-core.c#L355span c5"sne<4tle.cc53"sref">evesde=dev" cla"sref">event_regs  = 5rs/mfd/ab3100-core.c#L355GPLc53"sref">evesde=dev" cla"sref">event_regs 
The original LXR softwanehe<=dev" clahttp://sourceforge.net/projects/lxfp>LXR 6" iunityuf 3nLthis exp=aidevionlxf@linux.nouf 3. lxf.linux.no kindly hosted=by"=dev" clahttp://www.redpill-linpro.no">Redpill Linpro ASuf 3nLprovider of Linux100clulode= and=op=a/ab0cl services"since 199/.