Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
955 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
#define I2C_LINES 5
32
 
33
typedef enum {
34
    RHD_I2C_INIT,
35
    RHD_I2C_DDC,
36
    RHD_I2C_PROBE_ADDR_LINE,
37
    RHD_I2C_PROBE_ADDR,
38
    RHD_I2C_GETBUS,
39
    RHD_I2C_TEARDOWN
40
} RHDi2cFunc;
41
 
42
typedef union RHDI2CDataArg
43
{
44
    I2CBusPtr *I2CBusList;
45
    int i;
46
    struct {
47
	int line;
48
	CARD8 slave;
49
    } target;
50
    struct {
51
	CARD8 slave;
52
	I2CBusPtr i2cBusPtr;
53
    } probe;
54
    struct
55
    {
56
	int line;
57
    CARD32 slaves[4];
58
    } scanbus;
59
    xf86MonPtr monitor;
60
    I2CBusPtr i2cBusPtr;
61
} RHDI2CDataArg, *RHDI2CDataArgPtr;
62
 
63
typedef enum {
64
    RHD_I2C_SUCCESS,
65
    RHD_I2C_NOLINE,
66
    RHD_I2C_FAILED
67
} RHDI2CResult;
68
 
69
RHDI2CResult
70
RHDI2CFunc(int scrnIndex, I2CBusPtr *I2CList, RHDi2cFunc func,
71
			RHDI2CDataArgPtr data);
72
#endif