~ubuntu-branches/ubuntu/karmic/virtualbox-ose/karmic-updates

« back to all changes in this revision

Viewing changes to src/VBox/Additions/x11/x11include/7.0/xorg/xf86i2c.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-09-14 18:25:07 UTC
  • mfrom: (0.4.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090914182507-c98g07mq16hjmn6d
Tags: 3.0.6-dfsg-1ubuntu1
* Merge from debian unstable (LP: #429697), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
  - virtualbox, virtualbox-* (names of the upstream proprietary packages)
    conflict with virtualbox-ose (LP: #379878)
* Make debug package depend on normal or guest utils package
* Drop patches/22-pulseaudio-stubs.dpatch (applied upstream)
* Rename Ubuntu specific patches to uXX-*.dpatch
* Fix lintian warnings in maintainer scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* 
2
 
 *  Copyright (C) 1998 Itai Nahshon, Michael Schimek
3
 
 */
4
 
 
5
 
/* $XFree86: xc/programs/Xserver/hw/xfree86/i2c/xf86i2c.h,v 1.10 2003/07/16 01:38:47 dawes Exp $ */
6
 
 
7
 
#ifndef _XF86I2C_H
8
 
#define _XF86I2C_H
9
 
 
10
 
#include "regionstr.h"
11
 
 
12
 
typedef unsigned char  I2CByte;
13
 
typedef unsigned short I2CSlaveAddr;
14
 
 
15
 
typedef struct _I2CBusRec *I2CBusPtr;
16
 
typedef struct _I2CDevRec *I2CDevPtr;
17
 
 
18
 
/* I2C masters have to register themselves */
19
 
 
20
 
typedef struct _I2CBusRec {
21
 
    char *              BusName;
22
 
    int                 scrnIndex;
23
 
    
24
 
    void                (*I2CUDelay) (I2CBusPtr b, int usec);
25
 
    
26
 
    void                (*I2CPutBits)(I2CBusPtr b, int  scl, int  sda);
27
 
    void                (*I2CGetBits)(I2CBusPtr b, int *scl, int *sda);
28
 
 
29
 
    /* Look at the generic routines to see how these functions should behave. */
30
 
 
31
 
    Bool                (*I2CStart)  (I2CBusPtr b, int timeout);
32
 
    Bool                (*I2CAddress)(I2CDevPtr d, I2CSlaveAddr);
33
 
    void                (*I2CStop)   (I2CDevPtr d);
34
 
    Bool                (*I2CPutByte)(I2CDevPtr d, I2CByte data);
35
 
    Bool                (*I2CGetByte)(I2CDevPtr d, I2CByte *data, Bool);
36
 
 
37
 
    DevUnion            DriverPrivate;
38
 
 
39
 
    int                 HoldTime;       /* 1 / bus clock frequency, 5 or 2 usec */
40
 
 
41
 
    int                 BitTimeout;     /* usec */
42
 
    int                 ByteTimeout;    /* usec */
43
 
    int                 AcknTimeout;    /* usec */
44
 
    int                 StartTimeout;   /* usec */
45
 
    int                 RiseFallTime;   /* usec */
46
 
 
47
 
    I2CDevPtr           FirstDev;
48
 
    I2CBusPtr           NextBus;
49
 
    Bool                (*I2CWriteRead)(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite,
50
 
                                   I2CByte *ReadBuffer,  int nRead);
51
 
} I2CBusRec;
52
 
 
53
 
I2CBusPtr       xf86CreateI2CBusRec(void);
54
 
void            xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too);
55
 
Bool            xf86I2CBusInit(I2CBusPtr pI2CBus);
56
 
I2CBusPtr       xf86I2CFindBus(int scrnIndex, char *name);
57
 
int             xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus);
58
 
 
59
 
 
60
 
/* I2C slave devices */
61
 
 
62
 
typedef struct _I2CDevRec {
63
 
    char *              DevName;
64
 
 
65
 
    int                 BitTimeout;     /* usec */
66
 
    int                 ByteTimeout;    /* usec */
67
 
    int                 AcknTimeout;    /* usec */
68
 
    int                 StartTimeout;   /* usec */
69
 
 
70
 
    I2CSlaveAddr        SlaveAddr;
71
 
    I2CBusPtr           pI2CBus;
72
 
    I2CDevPtr           NextDev;
73
 
    DevUnion            DriverPrivate;
74
 
} I2CDevRec;
75
 
 
76
 
I2CDevPtr       xf86CreateI2CDevRec(void);
77
 
void            xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc);
78
 
Bool            xf86I2CDevInit(I2CDevPtr pI2CDev);
79
 
I2CDevPtr       xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr);
80
 
 
81
 
/* See descriptions of these functions in xf86i2c.c */
82
 
 
83
 
Bool            xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr);
84
 
Bool            xf86I2CWriteRead(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite,
85
 
                                   I2CByte *ReadBuffer,  int nRead);
86
 
#define         xf86I2CRead(d, rb, nr) xf86I2CWriteRead(d, NULL, 0, rb, nr)
87
 
Bool            xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte);
88
 
Bool            xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte);
89
 
Bool            xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n);
90
 
Bool            xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword);
91
 
#define         xf86I2CWrite(d, wb, nw) xf86I2CWriteRead(d, wb, nw, NULL, 0)
92
 
Bool            xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte);
93
 
Bool            xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *WriteBuffer, int nWrite);
94
 
Bool            xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word);
95
 
Bool            xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues);
96
 
 
97
 
#endif /*_XF86I2C_H */