summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-07-10 14:36:38 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-10-03 13:12:46 +1000
commit4196faa8623264b79279a06fd186654c959f2767 (patch)
treed84bb1e28744a3dfbafc1e9203a2ea1fda43eb86 /drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h
parente0996aea4c349ba302b63203b7d5cab6034dbdca (diff)
downloadop-kernel-dev-4196faa8623264b79279a06fd186654c959f2767.zip
op-kernel-dev-4196faa8623264b79279a06fd186654c959f2767.tar.gz
drm/nouveau/i2c: port to subdev interfaces
v2/v3: Ben Skeggs <bskeggs@redhat.com> - fix typo in default bus selection - fix accidental loss of destructor v4: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> - fix typo causing incorrect default i2c port settings when no BMP data Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h')
-rw-r--r--drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h b/drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h
new file mode 100644
index 0000000..5079bedf
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h
@@ -0,0 +1,25 @@
+#ifndef __NVBIOS_I2C_H__
+#define __NVBIOS_I2C_H__
+
+struct nouveau_bios;
+
+enum dcb_i2c_type {
+ DCB_I2C_NV04_BIT = 0,
+ DCB_I2C_NV4E_BIT = 4,
+ DCB_I2C_NVIO_BIT = 5,
+ DCB_I2C_NVIO_AUX = 6,
+ DCB_I2C_UNUSED = 0xff
+};
+
+struct dcb_i2c_entry {
+ enum dcb_i2c_type type;
+ u8 drive;
+ u8 sense;
+ u32 data;
+};
+
+u16 dcb_i2c_table(struct nouveau_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len);
+u16 dcb_i2c_entry(struct nouveau_bios *, u8 index, u8 *ver, u8 *len);
+int dcb_i2c_parse(struct nouveau_bios *, u8 index, struct dcb_i2c_entry *);
+
+#endif
OpenPOWER on IntegriCloud