Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ade7854.h File Reference

Go to the source code of this file.

Data Structures

struct  ade7854_state
 

Macros

#define ADE7854_AIGAIN   0x4380
 
#define ADE7854_AVGAIN   0x4381
 
#define ADE7854_BIGAIN   0x4382
 
#define ADE7854_BVGAIN   0x4383
 
#define ADE7854_CIGAIN   0x4384
 
#define ADE7854_CVGAIN   0x4385
 
#define ADE7854_NIGAIN   0x4386
 
#define ADE7854_AIRMSOS   0x4387
 
#define ADE7854_AVRMSOS   0x4388
 
#define ADE7854_BIRMSOS   0x4389
 
#define ADE7854_BVRMSOS   0x438A
 
#define ADE7854_CIRMSOS   0x438B
 
#define ADE7854_CVRMSOS   0x438C
 
#define ADE7854_NIRMSOS   0x438D
 
#define ADE7854_AVAGAIN   0x438E
 
#define ADE7854_BVAGAIN   0x438F
 
#define ADE7854_CVAGAIN   0x4390
 
#define ADE7854_AWGAIN   0x4391
 
#define ADE7854_AWATTOS   0x4392
 
#define ADE7854_BWGAIN   0x4393
 
#define ADE7854_BWATTOS   0x4394
 
#define ADE7854_CWGAIN   0x4395
 
#define ADE7854_CWATTOS   0x4396
 
#define ADE7854_AVARGAIN   0x4397
 
#define ADE7854_AVAROS   0x4398
 
#define ADE7854_BVARGAIN   0x4399
 
#define ADE7854_BVAROS   0x439A
 
#define ADE7854_CVARGAIN   0x439B
 
#define ADE7854_CVAROS   0x439C
 
#define ADE7854_AFWGAIN   0x439D
 
#define ADE7854_AFWATTOS   0x439E
 
#define ADE7854_BFWGAIN   0x439F
 
#define ADE7854_BFWATTOS   0x43A0
 
#define ADE7854_CFWGAIN   0x43A1
 
#define ADE7854_CFWATTOS   0x43A2
 
#define ADE7854_AFVARGAIN   0x43A3
 
#define ADE7854_AFVAROS   0x43A4
 
#define ADE7854_BFVARGAIN   0x43A5
 
#define ADE7854_BFVAROS   0x43A6
 
#define ADE7854_CFVARGAIN   0x43A7
 
#define ADE7854_CFVAROS   0x43A8
 
#define ADE7854_VATHR1   0x43A9
 
#define ADE7854_VATHR0   0x43AA
 
#define ADE7854_WTHR1   0x43AB
 
#define ADE7854_WTHR0   0x43AC
 
#define ADE7854_VARTHR1   0x43AD
 
#define ADE7854_VARTHR0   0x43AE
 
#define ADE7854_RSV   0x43AF
 
#define ADE7854_VANOLOAD   0x43B0
 
#define ADE7854_APNOLOAD   0x43B1
 
#define ADE7854_VARNOLOAD   0x43B2
 
#define ADE7854_VLEVEL   0x43B3
 
#define ADE7854_DICOEFF   0x43B5
 
#define ADE7854_HPFDIS   0x43B6
 
#define ADE7854_ISUMLVL   0x43B8
 
#define ADE7854_ISUM   0x43BF
 
#define ADE7854_AIRMS   0x43C0
 
#define ADE7854_AVRMS   0x43C1
 
#define ADE7854_BIRMS   0x43C2
 
#define ADE7854_BVRMS   0x43C3
 
#define ADE7854_CIRMS   0x43C4
 
#define ADE7854_CVRMS   0x43C5
 
#define ADE7854_NIRMS   0x43C6
 
#define ADE7854_RUN   0xE228
 
#define ADE7854_AWATTHR   0xE400
 
#define ADE7854_BWATTHR   0xE401
 
#define ADE7854_CWATTHR   0xE402
 
#define ADE7854_AFWATTHR   0xE403
 
#define ADE7854_BFWATTHR   0xE404
 
#define ADE7854_CFWATTHR   0xE405
 
#define ADE7854_AVARHR   0xE406
 
#define ADE7854_BVARHR   0xE407
 
#define ADE7854_CVARHR   0xE408
 
#define ADE7854_AFVARHR   0xE409
 
#define ADE7854_BFVARHR   0xE40A
 
#define ADE7854_CFVARHR   0xE40B
 
#define ADE7854_AVAHR   0xE40C
 
#define ADE7854_BVAHR   0xE40D
 
#define ADE7854_CVAHR   0xE40E
 
#define ADE7854_IPEAK   0xE500
 
#define ADE7854_VPEAK   0xE501
 
#define ADE7854_STATUS0   0xE502
 
#define ADE7854_STATUS1   0xE503
 
#define ADE7854_OILVL   0xE507
 
#define ADE7854_OVLVL   0xE508
 
#define ADE7854_SAGLVL   0xE509
 
#define ADE7854_MASK0   0xE50A
 
#define ADE7854_MASK1   0xE50B
 
#define ADE7854_IAWV   0xE50C
 
#define ADE7854_IBWV   0xE50D
 
#define ADE7854_ICWV   0xE50E
 
#define ADE7854_VAWV   0xE510
 
#define ADE7854_VBWV   0xE511
 
#define ADE7854_VCWV   0xE512
 
#define ADE7854_AWATT   0xE513
 
#define ADE7854_BWATT   0xE514
 
#define ADE7854_CWATT   0xE515
 
#define ADE7854_AVA   0xE519
 
#define ADE7854_BVA   0xE51A
 
#define ADE7854_CVA   0xE51B
 
#define ADE7854_CHECKSUM   0xE51F
 
#define ADE7854_VNOM   0xE520
 
#define ADE7854_PHSTATUS   0xE600
 
#define ADE7854_ANGLE0   0xE601
 
#define ADE7854_ANGLE1   0xE602
 
#define ADE7854_ANGLE2   0xE603
 
#define ADE7854_PERIOD   0xE607
 
#define ADE7854_PHNOLOAD   0xE608
 
#define ADE7854_LINECYC   0xE60C
 
#define ADE7854_ZXTOUT   0xE60D
 
#define ADE7854_COMPMODE   0xE60E
 
#define ADE7854_GAIN   0xE60F
 
#define ADE7854_CFMODE   0xE610
 
#define ADE7854_CF1DEN   0xE611
 
#define ADE7854_CF2DEN   0xE612
 
#define ADE7854_CF3DEN   0xE613
 
#define ADE7854_APHCAL   0xE614
 
#define ADE7854_BPHCAL   0xE615
 
#define ADE7854_CPHCAL   0xE616
 
#define ADE7854_PHSIGN   0xE617
 
#define ADE7854_CONFIG   0xE618
 
#define ADE7854_MMODE   0xE700
 
#define ADE7854_ACCMODE   0xE701
 
#define ADE7854_LCYCMODE   0xE702
 
#define ADE7854_PEAKCYC   0xE703
 
#define ADE7854_SAGCYC   0xE704
 
#define ADE7854_CFCYC   0xE705
 
#define ADE7854_HSDC_CFG   0xE706
 
#define ADE7854_CONFIG2   0xEC01
 
#define ADE7854_READ_REG   0x1
 
#define ADE7854_WRITE_REG   0x0
 
#define ADE7854_MAX_TX   7
 
#define ADE7854_MAX_RX   7
 
#define ADE7854_STARTUP_DELAY   1
 
#define ADE7854_SPI_SLOW   (u32)(300 * 1000)
 
#define ADE7854_SPI_BURST   (u32)(1000 * 1000)
 
#define ADE7854_SPI_FAST   (u32)(2000 * 1000)
 
#define DRIVER_NAME   "ade7854"
 

Functions

int ade7854_probe (struct iio_dev *indio_dev, struct device *dev)
 
int ade7854_remove (struct iio_dev *indio_dev)
 

Macro Definition Documentation

#define ADE7854_ACCMODE   0xE701

Definition at line 126 of file ade7854.h.

#define ADE7854_AFVARGAIN   0x43A3

Definition at line 39 of file ade7854.h.

#define ADE7854_AFVARHR   0xE409

Definition at line 77 of file ade7854.h.

#define ADE7854_AFVAROS   0x43A4

Definition at line 40 of file ade7854.h.

#define ADE7854_AFWATTHR   0xE403

Definition at line 71 of file ade7854.h.

#define ADE7854_AFWATTOS   0x439E

Definition at line 34 of file ade7854.h.

#define ADE7854_AFWGAIN   0x439D

Definition at line 33 of file ade7854.h.

#define ADE7854_AIGAIN   0x4380

Definition at line 4 of file ade7854.h.

#define ADE7854_AIRMS   0x43C0

Definition at line 60 of file ade7854.h.

#define ADE7854_AIRMSOS   0x4387

Definition at line 11 of file ade7854.h.

#define ADE7854_ANGLE0   0xE601

Definition at line 107 of file ade7854.h.

#define ADE7854_ANGLE1   0xE602

Definition at line 108 of file ade7854.h.

#define ADE7854_ANGLE2   0xE603

Definition at line 109 of file ade7854.h.

#define ADE7854_APHCAL   0xE614

Definition at line 120 of file ade7854.h.

#define ADE7854_APNOLOAD   0x43B1

Definition at line 53 of file ade7854.h.

#define ADE7854_AVA   0xE519

Definition at line 101 of file ade7854.h.

#define ADE7854_AVAGAIN   0x438E

Definition at line 18 of file ade7854.h.

#define ADE7854_AVAHR   0xE40C

Definition at line 80 of file ade7854.h.

#define ADE7854_AVARGAIN   0x4397

Definition at line 27 of file ade7854.h.

#define ADE7854_AVARHR   0xE406

Definition at line 74 of file ade7854.h.

#define ADE7854_AVAROS   0x4398

Definition at line 28 of file ade7854.h.

#define ADE7854_AVGAIN   0x4381

Definition at line 5 of file ade7854.h.

#define ADE7854_AVRMS   0x43C1

Definition at line 61 of file ade7854.h.

#define ADE7854_AVRMSOS   0x4388

Definition at line 12 of file ade7854.h.

#define ADE7854_AWATT   0xE513

Definition at line 98 of file ade7854.h.

#define ADE7854_AWATTHR   0xE400

Definition at line 68 of file ade7854.h.

#define ADE7854_AWATTOS   0x4392

Definition at line 22 of file ade7854.h.

#define ADE7854_AWGAIN   0x4391

Definition at line 21 of file ade7854.h.

#define ADE7854_BFVARGAIN   0x43A5

Definition at line 41 of file ade7854.h.

#define ADE7854_BFVARHR   0xE40A

Definition at line 78 of file ade7854.h.

#define ADE7854_BFVAROS   0x43A6

Definition at line 42 of file ade7854.h.

#define ADE7854_BFWATTHR   0xE404

Definition at line 72 of file ade7854.h.

#define ADE7854_BFWATTOS   0x43A0

Definition at line 36 of file ade7854.h.

#define ADE7854_BFWGAIN   0x439F

Definition at line 35 of file ade7854.h.

#define ADE7854_BIGAIN   0x4382

Definition at line 6 of file ade7854.h.

#define ADE7854_BIRMS   0x43C2

Definition at line 62 of file ade7854.h.

#define ADE7854_BIRMSOS   0x4389

Definition at line 13 of file ade7854.h.

#define ADE7854_BPHCAL   0xE615

Definition at line 121 of file ade7854.h.

#define ADE7854_BVA   0xE51A

Definition at line 102 of file ade7854.h.

#define ADE7854_BVAGAIN   0x438F

Definition at line 19 of file ade7854.h.

#define ADE7854_BVAHR   0xE40D

Definition at line 81 of file ade7854.h.

#define ADE7854_BVARGAIN   0x4399

Definition at line 29 of file ade7854.h.

#define ADE7854_BVARHR   0xE407

Definition at line 75 of file ade7854.h.

#define ADE7854_BVAROS   0x439A

Definition at line 30 of file ade7854.h.

#define ADE7854_BVGAIN   0x4383

Definition at line 7 of file ade7854.h.

#define ADE7854_BVRMS   0x43C3

Definition at line 63 of file ade7854.h.

#define ADE7854_BVRMSOS   0x438A

Definition at line 14 of file ade7854.h.

#define ADE7854_BWATT   0xE514

Definition at line 99 of file ade7854.h.

#define ADE7854_BWATTHR   0xE401

Definition at line 69 of file ade7854.h.

#define ADE7854_BWATTOS   0x4394

Definition at line 24 of file ade7854.h.

#define ADE7854_BWGAIN   0x4393

Definition at line 23 of file ade7854.h.

#define ADE7854_CF1DEN   0xE611

Definition at line 117 of file ade7854.h.

#define ADE7854_CF2DEN   0xE612

Definition at line 118 of file ade7854.h.

#define ADE7854_CF3DEN   0xE613

Definition at line 119 of file ade7854.h.

#define ADE7854_CFCYC   0xE705

Definition at line 130 of file ade7854.h.

#define ADE7854_CFMODE   0xE610

Definition at line 116 of file ade7854.h.

#define ADE7854_CFVARGAIN   0x43A7

Definition at line 43 of file ade7854.h.

#define ADE7854_CFVARHR   0xE40B

Definition at line 79 of file ade7854.h.

#define ADE7854_CFVAROS   0x43A8

Definition at line 44 of file ade7854.h.

#define ADE7854_CFWATTHR   0xE405

Definition at line 73 of file ade7854.h.

#define ADE7854_CFWATTOS   0x43A2

Definition at line 38 of file ade7854.h.

#define ADE7854_CFWGAIN   0x43A1

Definition at line 37 of file ade7854.h.

#define ADE7854_CHECKSUM   0xE51F

Definition at line 104 of file ade7854.h.

#define ADE7854_CIGAIN   0x4384

Definition at line 8 of file ade7854.h.

#define ADE7854_CIRMS   0x43C4

Definition at line 64 of file ade7854.h.

#define ADE7854_CIRMSOS   0x438B

Definition at line 15 of file ade7854.h.

#define ADE7854_COMPMODE   0xE60E

Definition at line 114 of file ade7854.h.

#define ADE7854_CONFIG   0xE618

Definition at line 124 of file ade7854.h.

#define ADE7854_CONFIG2   0xEC01

Definition at line 132 of file ade7854.h.

#define ADE7854_CPHCAL   0xE616

Definition at line 122 of file ade7854.h.

#define ADE7854_CVA   0xE51B

Definition at line 103 of file ade7854.h.

#define ADE7854_CVAGAIN   0x4390

Definition at line 20 of file ade7854.h.

#define ADE7854_CVAHR   0xE40E

Definition at line 82 of file ade7854.h.

#define ADE7854_CVARGAIN   0x439B

Definition at line 31 of file ade7854.h.

#define ADE7854_CVARHR   0xE408

Definition at line 76 of file ade7854.h.

#define ADE7854_CVAROS   0x439C

Definition at line 32 of file ade7854.h.

#define ADE7854_CVGAIN   0x4385

Definition at line 9 of file ade7854.h.

#define ADE7854_CVRMS   0x43C5

Definition at line 65 of file ade7854.h.

#define ADE7854_CVRMSOS   0x438C

Definition at line 16 of file ade7854.h.

#define ADE7854_CWATT   0xE515

Definition at line 100 of file ade7854.h.

#define ADE7854_CWATTHR   0xE402

Definition at line 70 of file ade7854.h.

#define ADE7854_CWATTOS   0x4396

Definition at line 26 of file ade7854.h.

#define ADE7854_CWGAIN   0x4395

Definition at line 25 of file ade7854.h.

#define ADE7854_DICOEFF   0x43B5

Definition at line 56 of file ade7854.h.

#define ADE7854_GAIN   0xE60F

Definition at line 115 of file ade7854.h.

#define ADE7854_HPFDIS   0x43B6

Definition at line 57 of file ade7854.h.

#define ADE7854_HSDC_CFG   0xE706

Definition at line 131 of file ade7854.h.

#define ADE7854_IAWV   0xE50C

Definition at line 92 of file ade7854.h.

#define ADE7854_IBWV   0xE50D

Definition at line 93 of file ade7854.h.

#define ADE7854_ICWV   0xE50E

Definition at line 94 of file ade7854.h.

#define ADE7854_IPEAK   0xE500

Definition at line 83 of file ade7854.h.

#define ADE7854_ISUM   0x43BF

Definition at line 59 of file ade7854.h.

#define ADE7854_ISUMLVL   0x43B8

Definition at line 58 of file ade7854.h.

#define ADE7854_LCYCMODE   0xE702

Definition at line 127 of file ade7854.h.

#define ADE7854_LINECYC   0xE60C

Definition at line 112 of file ade7854.h.

#define ADE7854_MASK0   0xE50A

Definition at line 90 of file ade7854.h.

#define ADE7854_MASK1   0xE50B

Definition at line 91 of file ade7854.h.

#define ADE7854_MAX_RX   7

Definition at line 138 of file ade7854.h.

#define ADE7854_MAX_TX   7

Definition at line 137 of file ade7854.h.

#define ADE7854_MMODE   0xE700

Definition at line 125 of file ade7854.h.

#define ADE7854_NIGAIN   0x4386

Definition at line 10 of file ade7854.h.

#define ADE7854_NIRMS   0x43C6

Definition at line 66 of file ade7854.h.

#define ADE7854_NIRMSOS   0x438D

Definition at line 17 of file ade7854.h.

#define ADE7854_OILVL   0xE507

Definition at line 87 of file ade7854.h.

#define ADE7854_OVLVL   0xE508

Definition at line 88 of file ade7854.h.

#define ADE7854_PEAKCYC   0xE703

Definition at line 128 of file ade7854.h.

#define ADE7854_PERIOD   0xE607

Definition at line 110 of file ade7854.h.

#define ADE7854_PHNOLOAD   0xE608

Definition at line 111 of file ade7854.h.

#define ADE7854_PHSIGN   0xE617

Definition at line 123 of file ade7854.h.

#define ADE7854_PHSTATUS   0xE600

Definition at line 106 of file ade7854.h.

#define ADE7854_READ_REG   0x1

Definition at line 134 of file ade7854.h.

#define ADE7854_RSV   0x43AF

Definition at line 51 of file ade7854.h.

#define ADE7854_RUN   0xE228

Definition at line 67 of file ade7854.h.

#define ADE7854_SAGCYC   0xE704

Definition at line 129 of file ade7854.h.

#define ADE7854_SAGLVL   0xE509

Definition at line 89 of file ade7854.h.

#define ADE7854_SPI_BURST   (u32)(1000 * 1000)

Definition at line 142 of file ade7854.h.

#define ADE7854_SPI_FAST   (u32)(2000 * 1000)

Definition at line 143 of file ade7854.h.

#define ADE7854_SPI_SLOW   (u32)(300 * 1000)

Definition at line 141 of file ade7854.h.

#define ADE7854_STARTUP_DELAY   1

Definition at line 139 of file ade7854.h.

#define ADE7854_STATUS0   0xE502

Definition at line 85 of file ade7854.h.

#define ADE7854_STATUS1   0xE503

Definition at line 86 of file ade7854.h.

#define ADE7854_VANOLOAD   0x43B0

Definition at line 52 of file ade7854.h.

#define ADE7854_VARNOLOAD   0x43B2

Definition at line 54 of file ade7854.h.

#define ADE7854_VARTHR0   0x43AE

Definition at line 50 of file ade7854.h.

#define ADE7854_VARTHR1   0x43AD

Definition at line 49 of file ade7854.h.

#define ADE7854_VATHR0   0x43AA

Definition at line 46 of file ade7854.h.

#define ADE7854_VATHR1   0x43A9

Definition at line 45 of file ade7854.h.

#define ADE7854_VAWV   0xE510

Definition at line 95 of file ade7854.h.

#define ADE7854_VBWV   0xE511

Definition at line 96 of file ade7854.h.

#define ADE7854_VCWV   0xE512

Definition at line 97 of file ade7854.h.

#define ADE7854_VLEVEL   0x43B3

Definition at line 55 of file ade7854.h.

#define ADE7854_VNOM   0xE520

Definition at line 105 of file ade7854.h.

#define ADE7854_VPEAK   0xE501

Definition at line 84 of file ade7854.h.

#define ADE7854_WRITE_REG   0x0

Definition at line 135 of file ade7854.h.

#define ADE7854_WTHR0   0x43AC

Definition at line 48 of file ade7854.h.

#define ADE7854_WTHR1   0x43AB

Definition at line 47 of file ade7854.h.

#define ADE7854_ZXTOUT   0xE60D

Definition at line 113 of file ade7854.h.

#define DRIVER_NAME   "ade7854"

Definition at line 145 of file ade7854.h.

Function Documentation

int ade7854_probe ( struct iio_dev indio_dev,
struct device dev 
)

Definition at line 559 of file ade7854.c.

int ade7854_remove ( struct iio_dev indio_dev)

Definition at line 590 of file ade7854.c.