2013-02-16 15:21:58 +10:00
|
|
|
#ifndef __NV50_I2C_H__
|
|
|
|
|
#define __NV50_I2C_H__
|
2014-05-13 13:59:26 +10:00
|
|
|
#include "priv.h"
|
2013-02-16 15:21:58 +10:00
|
|
|
|
|
|
|
|
struct nv50_i2c_priv {
|
2015-01-14 15:04:16 +10:00
|
|
|
struct nvkm_i2c base;
|
2013-02-16 15:21:58 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct nv50_i2c_port {
|
2015-01-14 15:04:16 +10:00
|
|
|
struct nvkm_i2c_port base;
|
2013-02-16 15:21:58 +10:00
|
|
|
u32 addr;
|
|
|
|
|
u32 state;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern const u32 nv50_i2c_addr[];
|
|
|
|
|
extern const int nv50_i2c_addr_nr;
|
2015-01-14 15:04:16 +10:00
|
|
|
int nv50_i2c_port_init(struct nvkm_object *);
|
|
|
|
|
int nv50_i2c_sense_scl(struct nvkm_i2c_port *);
|
|
|
|
|
int nv50_i2c_sense_sda(struct nvkm_i2c_port *);
|
|
|
|
|
void nv50_i2c_drive_scl(struct nvkm_i2c_port *, int state);
|
|
|
|
|
void nv50_i2c_drive_sda(struct nvkm_i2c_port *, int state);
|
2013-02-16 15:21:58 +10:00
|
|
|
|
2015-01-14 15:04:16 +10:00
|
|
|
int g94_aux_port_ctor(struct nvkm_object *, struct nvkm_object *,
|
|
|
|
|
struct nvkm_oclass *, void *, u32,
|
|
|
|
|
struct nvkm_object **);
|
|
|
|
|
void g94_i2c_acquire(struct nvkm_i2c_port *);
|
|
|
|
|
void g94_i2c_release(struct nvkm_i2c_port *);
|
2014-08-19 07:26:08 +10:00
|
|
|
|
2015-01-14 15:04:16 +10:00
|
|
|
int gf110_i2c_port_ctor(struct nvkm_object *, struct nvkm_object *,
|
|
|
|
|
struct nvkm_oclass *, void *, u32,
|
|
|
|
|
struct nvkm_object **);
|
2013-02-16 15:21:58 +10:00
|
|
|
#endif
|