home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lxapi32.zip / Include / Linux / i2c-id.h < prev    next >
C/C++ Source or Header  |  2002-04-26  |  8KB  |  174 lines

  1. /* $Id: i2c-id.h,v 1.2 2002/04/26 23:09:05 smilcke Exp $ */
  2.  
  3. /* ------------------------------------------------------------------------- */
  4. /*                                          */
  5. /* i2c.h - definitions for the i2c-bus interface                 */
  6. /*                                          */
  7. /* ------------------------------------------------------------------------- */
  8. /*   Copyright (C) 1995-1999 Simon G. Vogl
  9.  
  10.     This program is free software; you can redistribute it and/or modify
  11.     it under the terms of the GNU General Public License as published by
  12.     the Free Software Foundation; either version 2 of the License, or
  13.     (at your option) any later version.
  14.  
  15.     This program is distributed in the hope that it will be useful,
  16.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.     GNU General Public License for more details.
  19.  
  20.     You should have received a copy of the GNU General Public License
  21.     along with this program; if not, write to the Free Software
  22.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.             */
  23. /* ------------------------------------------------------------------------- */
  24.  
  25. #ifndef I2C_ID_H
  26. #define I2C_ID_H
  27. /*
  28.  * This file is part of the i2c-bus package and contains the identifier
  29.  * values for drivers, adapters and other folk populating these serial
  30.  * worlds. 
  31.  *
  32.  * These will change often (i.e. additions) , therefore this has been 
  33.  * separated from the functional interface definitions of the i2c api.
  34.  *
  35.  */
  36.  
  37. /*
  38.  * ---- Driver types -----------------------------------------------------
  39.  *       device id name + number        function description, i2c address(es)
  40.  *
  41.  *  Range 1000-1999 range is defined in sensors/sensors.h 
  42.  *  Range 0x100 - 0x1ff is for V4L2 Common Components 
  43.  *  Range 0xf000 - 0xffff is reserved for local experimentation, and should
  44.  *        never be used in official drivers 
  45.  */
  46.  
  47. #define I2C_DRIVERID_MSP3400     1
  48. #define I2C_DRIVERID_TUNER     2
  49. #define I2C_DRIVERID_VIDEOTEX     3    /* please rename        */
  50. #define I2C_DRIVERID_TDA8425     4    /* stereo sound processor    */
  51. #define I2C_DRIVERID_TEA6420     5    /* audio matrix switch        */
  52. #define I2C_DRIVERID_TEA6415C     6    /* video matrix switch        */
  53. #define I2C_DRIVERID_TDA9840     7    /* stereo sound processor    */
  54. #define I2C_DRIVERID_SAA7111A     8    /* video input processor    */
  55. #define I2C_DRIVERID_SAA5281     9    /* videotext decoder        */
  56. #define I2C_DRIVERID_SAA7112    10    /* video decoder, image scaler    */
  57. #define I2C_DRIVERID_SAA7120    11    /* video encoder        */
  58. #define I2C_DRIVERID_SAA7121    12    /* video encoder        */
  59. #define I2C_DRIVERID_SAA7185B    13    /* video encoder        */
  60. #define I2C_DRIVERID_CH7003    14    /* digital pc to tv encoder     */
  61. #define I2C_DRIVERID_PCF8574A    15    /* i2c expander - 8 bit in/out    */
  62. #define I2C_DRIVERID_PCF8582C    16    /* eeprom            */
  63. #define I2C_DRIVERID_AT24Cxx    17    /* eeprom 1/2/4/8/16 K         */
  64. #define I2C_DRIVERID_TEA6300    18    /* audio mixer            */
  65. #define I2C_DRIVERID_BT829    19    /* pc to tv encoder        */
  66. #define I2C_DRIVERID_TDA9850    20    /* audio mixer            */
  67. #define I2C_DRIVERID_TDA9855    21    /* audio mixer            */
  68. #define I2C_DRIVERID_SAA7110    22    /*                 */
  69. #define I2C_DRIVERID_MGATVO    23    /* Matrox TVOut            */
  70. #define I2C_DRIVERID_SAA5249    24    /* SAA5249 and compatibles    */
  71. #define I2C_DRIVERID_PCF8583    25    /* real time clock        */
  72. #define I2C_DRIVERID_SAB3036    26    /* SAB3036 tuner        */
  73. #define I2C_DRIVERID_TDA7432    27    /* Stereo sound processor    */
  74. #define I2C_DRIVERID_TVMIXER    28      /* Mixer driver for tv cards    */
  75. #define I2C_DRIVERID_TVAUDIO    29      /* Generic TV sound driver      */
  76. #define I2C_DRIVERID_DPL3518    30      /* Dolby decoder chip           */
  77. #define I2C_DRIVERID_TDA9873    31      /* TV sound decoder chip        */
  78. #define I2C_DRIVERID_TDA9875    32      /* TV sound decoder chip        */
  79. #define I2C_DRIVERID_PIC16C54_PV9 33    /* Audio mux/ir receiver        */
  80.  
  81. #define I2C_DRIVERID_SBATT      34     /* Smart Battery Device        */
  82. #define I2C_DRIVERID_SBS        35     /* SB System Manager        */
  83. #define I2C_DRIVERID_VES1893    36     /* VLSI DVB-S decoder        */
  84. #define I2C_DRIVERID_VES1820    37     /* VLSI DVB-C decoder        */
  85. #define I2C_DRIVERID_SAA7113    38     /* video decoder            */
  86. #define I2C_DRIVERID_TDA8444    39     /* octuple 6-bit DAC             */
  87.  
  88.  
  89. #define I2C_DRIVERID_EXP0    0xF0    /* experimental use id's    */
  90. #define I2C_DRIVERID_EXP1    0xF1
  91. #define I2C_DRIVERID_EXP2    0xF2
  92. #define I2C_DRIVERID_EXP3    0xF3
  93.  
  94. #define I2C_DRIVERID_I2CDEV    900
  95. #define I2C_DRIVERID_I2CPROC    901
  96.  
  97. /*
  98.  * ---- Adapter types ----------------------------------------------------
  99.  *
  100.  * First, we distinguish between several algorithms to access the hardware
  101.  * interface types, as a PCF 8584 needs other care than a bit adapter.
  102.  */
  103.  
  104. #define I2C_ALGO_NONE    0x000000
  105. #define I2C_ALGO_BIT    0x010000    /* bit style adapters        */
  106. #define I2C_ALGO_PCF    0x020000    /* PCF 8584 style adapters    */
  107. #define I2C_ALGO_ATI    0x030000    /* ATI video card        */
  108. #define I2C_ALGO_SMBUS    0x040000
  109. #define I2C_ALGO_ISA     0x050000    /* lm_sensors ISA pseudo-adapter */
  110. #define I2C_ALGO_SAA7146 0x060000    /* SAA 7146 video decoder bus    */
  111. #define I2C_ALGO_ACB     0x070000    /* ACCESS.bus algorithm         */
  112. #define I2C_ALGO_IIC    0x080000     /* ITE IIC bus */
  113.  
  114. #define I2C_ALGO_EC     0x100000        /* ACPI embedded controller     */
  115.  
  116. #define I2C_ALGO_MPC8XX 0x110000    /* MPC8xx PowerPC I2C algorithm */
  117.  
  118. #define I2C_ALGO_EXP    0x800000    /* experimental            */
  119.  
  120. #define I2C_ALGO_MASK    0xff0000    /* Mask for algorithms        */
  121. #define I2C_ALGO_SHIFT    0x10    /* right shift to get index values     */
  122.  
  123. #define I2C_HW_ADAPS    0x10000        /* # adapter types        */
  124. #define I2C_HW_MASK    0xffff        
  125.  
  126.  
  127. /* hw specific modules that are defined per algorithm layer
  128.  */
  129.  
  130. /* --- Bit algorithm adapters                         */
  131. #define I2C_HW_B_LP    0x00    /* Parallel port Philips style adapter    */
  132. #define I2C_HW_B_LPC    0x01    /* Parallel port, over control reg.    */
  133. #define I2C_HW_B_SER    0x02    /* Serial line interface        */
  134. #define I2C_HW_B_ELV    0x03    /* ELV Card                */
  135. #define I2C_HW_B_VELLE    0x04    /* Vellemann K8000            */
  136. #define I2C_HW_B_BT848    0x05    /* BT848 video boards            */
  137. #define I2C_HW_B_WNV    0x06    /* Winnov Videums            */
  138. #define I2C_HW_B_VIA    0x07    /* Via vt82c586b            */
  139. #define I2C_HW_B_HYDRA    0x08    /* Apple Hydra Mac I/O            */
  140. #define I2C_HW_B_G400    0x09    /* Matrox G400                */
  141. #define I2C_HW_B_I810    0x0a    /* Intel I810                 */
  142. #define I2C_HW_B_VOO    0x0b    /* 3dfx Voodoo 3 / Banshee          */
  143. #define I2C_HW_B_RIVA    0x10    /* Riva based graphics cards        */
  144. #define I2C_HW_B_IOC    0x11    /* IOC bit-wiggling            */
  145.  
  146. /* --- PCF 8584 based algorithms                    */
  147. #define I2C_HW_P_LP    0x00    /* Parallel port interface        */
  148. #define I2C_HW_P_ISA    0x01    /* generic ISA Bus inteface card    */
  149. #define I2C_HW_P_ELEK    0x02    /* Elektor ISA Bus inteface card    */
  150.  
  151. /* --- ACPI Embedded controller algorithms                              */
  152. #define I2C_HW_ACPI_EC          0x00
  153.  
  154. /* --- MPC8xx PowerPC adapters                        */
  155. #define I2C_HW_MPC8XX_EPON 0x00    /* Eponymous MPC8xx I2C adapter     */
  156.  
  157. /* --- ITE based algorithms                        */
  158. #define I2C_HW_I_IIC    0x00    /* controller on the ITE */
  159.  
  160. /* --- SMBus only adapters                        */
  161. #define I2C_HW_SMBUS_PIIX4    0x00
  162. #define I2C_HW_SMBUS_ALI15X3    0x01
  163. #define I2C_HW_SMBUS_VIA2    0x02
  164. #define I2C_HW_SMBUS_VOODOO3    0x03
  165. #define I2C_HW_SMBUS_I801    0x04
  166. #define I2C_HW_SMBUS_AMD756    0x05
  167. #define I2C_HW_SMBUS_SIS5595    0x06
  168. #define I2C_HW_SMBUS_ALI1535    0x07
  169.  
  170. /* --- ISA pseudo-adapter                        */
  171. #define I2C_HW_ISA 0x00
  172.  
  173. #endif /* I2C_ID_H */
  174.