summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-06-18 15:46:22 +1000
committerBen Skeggs <bskeggs@redhat.com>2014-06-18 15:46:22 +1000
commit1d6cd9948102b59fb468f8feb67cee74a84714fe (patch)
tree9b3ea78fe9bb885df22cf2085b22a7a866b79eaf
parent0db07fcd27c0d9cbe84ab5195b22072dfb909545 (diff)
i2c/gf117: no aux channels on this chipset
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drm/Kbuild1
l---------drm/core/subdev/i2c/gf117.c1
-rw-r--r--nvkm/engine/device/nvc0.c2
-rw-r--r--nvkm/include/subdev/i2c.h1
-rw-r--r--nvkm/subdev/i2c/Makefile.am1
-rw-r--r--nvkm/subdev/i2c/gf117.c39
6 files changed, 44 insertions, 1 deletions
diff --git a/drm/Kbuild b/drm/Kbuild
index 2b6156d0..8b307e14 100644
--- a/drm/Kbuild
+++ b/drm/Kbuild
@@ -140,6 +140,7 @@ nouveau-y += core/subdev/i2c/nv4e.o
nouveau-y += core/subdev/i2c/nv50.o
nouveau-y += core/subdev/i2c/nv94.o
nouveau-y += core/subdev/i2c/nvd0.o
+nouveau-y += core/subdev/i2c/gf117.o
nouveau-y += core/subdev/i2c/nve0.o
nouveau-y += core/subdev/ibus/nvc0.o
nouveau-y += core/subdev/ibus/nve0.o
diff --git a/drm/core/subdev/i2c/gf117.c b/drm/core/subdev/i2c/gf117.c
new file mode 120000
index 00000000..453d3d04
--- /dev/null
+++ b/drm/core/subdev/i2c/gf117.c
@@ -0,0 +1 @@
+../../../../nvkm/subdev/i2c/gf117.c \ No newline at end of file
diff --git a/nvkm/engine/device/nvc0.c b/nvkm/engine/device/nvc0.c
index f1999579..8d55ed63 100644
--- a/nvkm/engine/device/nvc0.c
+++ b/nvkm/engine/device/nvc0.c
@@ -314,7 +314,7 @@ nvc0_identify(struct nouveau_device *device)
device->cname = "GF117";
device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass;
device->oclass[NVDEV_SUBDEV_GPIO ] = nvd0_gpio_oclass;
- device->oclass[NVDEV_SUBDEV_I2C ] = nvd0_i2c_oclass;
+ device->oclass[NVDEV_SUBDEV_I2C ] = gf117_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLOCK ] = &nvc0_clock_oclass;
device->oclass[NVDEV_SUBDEV_THERM ] = &nvd0_therm_oclass;
device->oclass[NVDEV_SUBDEV_MXM ] = &nv50_mxm_oclass;
diff --git a/nvkm/include/subdev/i2c.h b/nvkm/include/subdev/i2c.h
index db1b39d0..825f7bb4 100644
--- a/nvkm/include/subdev/i2c.h
+++ b/nvkm/include/subdev/i2c.h
@@ -84,6 +84,7 @@ extern struct nouveau_oclass *nv4e_i2c_oclass;
extern struct nouveau_oclass *nv50_i2c_oclass;
extern struct nouveau_oclass *nv94_i2c_oclass;
extern struct nouveau_oclass *nvd0_i2c_oclass;
+extern struct nouveau_oclass *gf117_i2c_oclass;
extern struct nouveau_oclass *nve0_i2c_oclass;
static inline int
diff --git a/nvkm/subdev/i2c/Makefile.am b/nvkm/subdev/i2c/Makefile.am
index 729207a3..72d9a4fc 100644
--- a/nvkm/subdev/i2c/Makefile.am
+++ b/nvkm/subdev/i2c/Makefile.am
@@ -12,6 +12,7 @@ libi2c_la_SOURCES = base.c \
nv50.c \
nv94.c \
nvd0.c \
+ gf117.c \
nve0.c
include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/i2c/gf117.c b/nvkm/subdev/i2c/gf117.c
new file mode 100644
index 00000000..fa891c39
--- /dev/null
+++ b/nvkm/subdev/i2c/gf117.c
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2012 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Ben Skeggs
+ */
+
+#include "nv50.h"
+
+struct nouveau_oclass *
+gf117_i2c_oclass = &(struct nouveau_i2c_impl) {
+ .base.handle = NV_SUBDEV(I2C, 0xd7),
+ .base.ofuncs = &(struct nouveau_ofuncs) {
+ .ctor = _nouveau_i2c_ctor,
+ .dtor = _nouveau_i2c_dtor,
+ .init = _nouveau_i2c_init,
+ .fini = _nouveau_i2c_fini,
+ },
+ .sclass = nvd0_i2c_sclass,
+ .pad_x = &nv04_i2c_pad_oclass,
+ .pad_s = &nv04_i2c_pad_oclass,
+}.base;