Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
gpu
drm
nouveau
core
include
subdev
i2c.h
Go to the documentation of this file.
1
#ifndef __NOUVEAU_I2C_H__
2
#define __NOUVEAU_I2C_H__
3
4
#include <
core/subdev.h
>
5
#include <
core/device.h
>
6
7
#include <
subdev/bios.h
>
8
#include <
subdev/bios/i2c.h
>
9
10
#define NV_I2C_PORT(n) (0x00 + (n))
11
#define NV_I2C_DEFAULT(n) (0x80 + (n))
12
13
struct
nouveau_i2c_port
{
14
struct
i2c_adapter
adapter
;
15
struct
nouveau_i2c
*
i2c
;
16
struct
i2c_algo_bit_data
bit
;
17
struct
list_head
head
;
18
u8
index
;
19
u8
type
;
20
u32
dcb
;
21
u32
drive
;
22
u32
sense
;
23
u32
state
;
24
};
25
26
struct
nouveau_i2c
{
27
struct
nouveau_subdev
base
;
28
29
struct
nouveau_i2c_port
*(*find)(
struct
nouveau_i2c
*,
u8
index
);
30
int
(*
identify
)(
struct
nouveau_i2c
*,
int
index
,
31
const
char
*
what
,
struct
i2c_board_info
*,
32
bool
(*
match
)(
struct
nouveau_i2c_port
*,
33
struct
i2c_board_info
*));
34
struct
list_head
ports
;
35
};
36
37
static
inline
struct
nouveau_i2c
*
38
nouveau_i2c
(
void
*obj)
39
{
40
return
(
void
*)nv_device(obj)->subdev[
NVDEV_SUBDEV_I2C
];
41
}
42
43
extern
struct
nouveau_oclass
nouveau_i2c_oclass
;
44
45
void
nouveau_i2c_drive_scl
(
void
*,
int
);
46
void
nouveau_i2c_drive_sda
(
void
*,
int
);
47
int
nouveau_i2c_sense_scl
(
void
*);
48
int
nouveau_i2c_sense_sda
(
void
*);
49
50
int
nv_rdi2cr
(
struct
nouveau_i2c_port
*,
u8
addr
,
u8
reg
);
51
int
nv_wri2cr
(
struct
nouveau_i2c_port
*,
u8
addr
,
u8
reg
,
u8
val
);
52
bool
nv_probe_i2c
(
struct
nouveau_i2c_port
*,
u8
addr
);
53
54
int
nv_rdaux
(
struct
nouveau_i2c_port
*,
u32
addr
,
u8
*
data
,
u8
size
);
55
int
nv_wraux
(
struct
nouveau_i2c_port
*,
u32
addr
,
u8
*
data
,
u8
size
);
56
57
extern
const
struct
i2c_algorithm
nouveau_i2c_bit_algo
;
58
extern
const
struct
i2c_algorithm
nouveau_i2c_aux_algo
;
59
60
#endif
Generated on Thu Jan 10 2013 13:01:42 for Linux Kernel by
1.8.2