Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1029 | serge | 1 | /* |
2 | * Copyright 2007 Luc Verhaegen |
||
3 | * Copyright 2007 Matthias Hopf |
||
4 | * Copyright 2007 Egbert Eich |
||
5 | * Copyright 2007 Advanced Micro Devices, Inc. |
||
6 | * |
||
7 | * Permission is hereby granted, free of charge, to any person obtaining a |
||
8 | * copy of this software and associated documentation files (the "Software"), |
||
9 | * to deal in the Software without restriction, including without limitation |
||
10 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||
11 | * and/or sell copies of the Software, and to permit persons to whom the |
||
12 | * Software is furnished to do so, subject to the following conditions: |
||
13 | * |
||
14 | * The above copyright notice and this permission notice shall be included in |
||
15 | * all copies or substantial portions of the Software. |
||
16 | * |
||
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||
20 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR |
||
21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
||
22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
23 | * OTHER DEALINGS IN THE SOFTWARE. |
||
24 | */ |
||
25 | #ifndef RHD_I2C_H_ |
||
26 | # define RHD_I2C_H_ |
||
27 | |||
28 | //#include "xf86DDC.h" |
||
29 | #include "xf86i2c.h" |
||
30 | |||
31 | |||
32 | typedef enum { |
||
33 | RHD_I2C_INIT, |
||
34 | RHD_I2C_DDC, |
||
35 | RHD_I2C_PROBE_ADDR_LINE, |
||
36 | RHD_I2C_PROBE_ADDR, |
||
37 | RHD_I2C_GETBUS, |
||
38 | RHD_I2C_TEARDOWN |
||
39 | } RHDi2cFunc; |
||
40 | |||
41 | typedef union RHDI2CDataArg |
||
42 | { |
||
43 | I2CBusPtr *I2CBusList; |
||
44 | int i; |
||
45 | struct { |
||
46 | int line; |
||
47 | CARD8 slave; |
||
48 | } target; |
||
49 | struct { |
||
50 | CARD8 slave; |
||
51 | I2CBusPtr i2cBusPtr; |
||
52 | } probe; |
||
53 | struct |
||
54 | { |
||
55 | int line; |
||
56 | CARD32 slaves[4]; |
||
57 | } scanbus; |
||
58 | xf86MonPtr monitor; |
||
59 | I2CBusPtr i2cBusPtr; |
||
60 | } RHDI2CDataArg, *RHDI2CDataArgPtr; |
||
61 | |||
62 | typedef enum { |
||
63 | RHD_I2C_SUCCESS, |
||
64 | RHD_I2C_NOLINE, |
||
65 | RHD_I2C_FAILED |
||
66 | } RHDI2CResult; |
||
67 | |||
68 | RHDI2CResult |
||
69 | RHDI2CFunc(int scrnIndex, I2CBusPtr *I2CList, RHDi2cFunc func, |
||
70 | RHDI2CDataArgPtr data); |
||
71 | #endif |