summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_i2c.h
diff options
context:
space:
mode:
authorBen Skeggs2011-11-11 01:22:19 +0100
committerBen Skeggs2011-12-21 10:01:40 +0100
commit486a45c2a6c19b159602d044ab601a92cd81f524 (patch)
tree350a368208768873667cd1a659a6d264a76f7c91 /drivers/gpu/drm/nouveau/nouveau_i2c.h
parentdrm/nouveau/bios: start refactoring dcb routines (diff)
downloadkernel-qcow2-linux-486a45c2a6c19b159602d044ab601a92cd81f524.tar.gz
kernel-qcow2-linux-486a45c2a6c19b159602d044ab601a92cd81f524.tar.xz
kernel-qcow2-linux-486a45c2a6c19b159602d044ab601a92cd81f524.zip
drm/nouveau/i2c: do parsing of i2c-related vbios info in nouveau_i2c.c
Not much point parsing the vbios data into a struct which is only used once to parse the data into another struct, go directly from vbios to nouveau_i2c_chan. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_i2c.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_i2c.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.h b/drivers/gpu/drm/nouveau/nouveau_i2c.h
index 422b62fd8272..cf5f67d51fba 100644
--- a/drivers/gpu/drm/nouveau/nouveau_i2c.h
+++ b/drivers/gpu/drm/nouveau/nouveau_i2c.h
@@ -27,20 +27,26 @@
#include <linux/i2c-algo-bit.h>
#include "drm_dp_helper.h"
-struct dcb_i2c_entry;
+#define NV_I2C_PORT(n) (0x00 + (n))
+#define NV_I2C_PORT_NUM 0x10
+#define NV_I2C_DEFAULT(n) (0x80 + (n))
struct nouveau_i2c_chan {
struct i2c_adapter adapter;
struct drm_device *dev;
struct i2c_algo_bit_data bit;
+ struct list_head head;
+ u8 index;
+ u8 type;
+ u32 dcb;
unsigned rd;
unsigned wr;
unsigned data;
};
-int nouveau_i2c_init(struct drm_device *, struct dcb_i2c_entry *, int index);
-void nouveau_i2c_fini(struct drm_device *, struct dcb_i2c_entry *);
-struct nouveau_i2c_chan *nouveau_i2c_find(struct drm_device *, int index);
+int nouveau_i2c_init(struct drm_device *);
+void nouveau_i2c_fini(struct drm_device *);
+struct nouveau_i2c_chan *nouveau_i2c_find(struct drm_device *, u8 index);
bool nouveau_probe_i2c_addr(struct nouveau_i2c_chan *i2c, int addr);
int nouveau_i2c_identify(struct drm_device *dev, const char *what,
struct i2c_board_info *info,