diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-06-18 01:46:22 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-06-18 01:49:50 -0400 |
commit | 82c2b5ed6f2760caaa7871f018166fadd849d2d2 (patch) | |
tree | 978673ca2f38a627f9d1dcc18c5ee2941a51e088 | |
parent | 0946807ae669d388a813a083f1184053206b99c5 (diff) |
drm/gf117/i2c: 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-- | drivers/gpu/drm/nouveau/Makefile | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/nvc0.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/subdev/i2c.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/i2c/gf117.c | 39 |
4 files changed, 42 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile index 2b6156d0e4b5..8b307e143632 100644 --- a/drivers/gpu/drm/nouveau/Makefile +++ b/drivers/gpu/drm/nouveau/Makefile | |||
@@ -140,6 +140,7 @@ nouveau-y += core/subdev/i2c/nv4e.o | |||
140 | nouveau-y += core/subdev/i2c/nv50.o | 140 | nouveau-y += core/subdev/i2c/nv50.o |
141 | nouveau-y += core/subdev/i2c/nv94.o | 141 | nouveau-y += core/subdev/i2c/nv94.o |
142 | nouveau-y += core/subdev/i2c/nvd0.o | 142 | nouveau-y += core/subdev/i2c/nvd0.o |
143 | nouveau-y += core/subdev/i2c/gf117.o | ||
143 | nouveau-y += core/subdev/i2c/nve0.o | 144 | nouveau-y += core/subdev/i2c/nve0.o |
144 | nouveau-y += core/subdev/ibus/nvc0.o | 145 | nouveau-y += core/subdev/ibus/nvc0.o |
145 | nouveau-y += core/subdev/ibus/nve0.o | 146 | nouveau-y += core/subdev/ibus/nve0.o |
diff --git a/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c index f199957995fa..8d55ed633b19 100644 --- a/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c | |||
@@ -314,7 +314,7 @@ nvc0_identify(struct nouveau_device *device) | |||
314 | device->cname = "GF117"; | 314 | device->cname = "GF117"; |
315 | device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; | 315 | device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; |
316 | device->oclass[NVDEV_SUBDEV_GPIO ] = nvd0_gpio_oclass; | 316 | device->oclass[NVDEV_SUBDEV_GPIO ] = nvd0_gpio_oclass; |
317 | device->oclass[NVDEV_SUBDEV_I2C ] = nvd0_i2c_oclass; | 317 | device->oclass[NVDEV_SUBDEV_I2C ] = gf117_i2c_oclass; |
318 | device->oclass[NVDEV_SUBDEV_CLOCK ] = &nvc0_clock_oclass; | 318 | device->oclass[NVDEV_SUBDEV_CLOCK ] = &nvc0_clock_oclass; |
319 | device->oclass[NVDEV_SUBDEV_THERM ] = &nvd0_therm_oclass; | 319 | device->oclass[NVDEV_SUBDEV_THERM ] = &nvd0_therm_oclass; |
320 | device->oclass[NVDEV_SUBDEV_MXM ] = &nv50_mxm_oclass; | 320 | device->oclass[NVDEV_SUBDEV_MXM ] = &nv50_mxm_oclass; |
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/i2c.h b/drivers/gpu/drm/nouveau/core/include/subdev/i2c.h index db1b39d08013..825f7bb46b67 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/i2c.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/i2c.h | |||
@@ -84,6 +84,7 @@ extern struct nouveau_oclass *nv4e_i2c_oclass; | |||
84 | extern struct nouveau_oclass *nv50_i2c_oclass; | 84 | extern struct nouveau_oclass *nv50_i2c_oclass; |
85 | extern struct nouveau_oclass *nv94_i2c_oclass; | 85 | extern struct nouveau_oclass *nv94_i2c_oclass; |
86 | extern struct nouveau_oclass *nvd0_i2c_oclass; | 86 | extern struct nouveau_oclass *nvd0_i2c_oclass; |
87 | extern struct nouveau_oclass *gf117_i2c_oclass; | ||
87 | extern struct nouveau_oclass *nve0_i2c_oclass; | 88 | extern struct nouveau_oclass *nve0_i2c_oclass; |
88 | 89 | ||
89 | static inline int | 90 | static inline int |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/i2c/gf117.c b/drivers/gpu/drm/nouveau/core/subdev/i2c/gf117.c new file mode 100644 index 000000000000..fa891c39866b --- /dev/null +++ b/drivers/gpu/drm/nouveau/core/subdev/i2c/gf117.c | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Red Hat Inc. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * Authors: Ben Skeggs | ||
23 | */ | ||
24 | |||
25 | #include "nv50.h" | ||
26 | |||
27 | struct nouveau_oclass * | ||
28 | gf117_i2c_oclass = &(struct nouveau_i2c_impl) { | ||
29 | .base.handle = NV_SUBDEV(I2C, 0xd7), | ||
30 | .base.ofuncs = &(struct nouveau_ofuncs) { | ||
31 | .ctor = _nouveau_i2c_ctor, | ||
32 | .dtor = _nouveau_i2c_dtor, | ||
33 | .init = _nouveau_i2c_init, | ||
34 | .fini = _nouveau_i2c_fini, | ||
35 | }, | ||
36 | .sclass = nvd0_i2c_sclass, | ||
37 | .pad_x = &nv04_i2c_pad_oclass, | ||
38 | .pad_s = &nv04_i2c_pad_oclass, | ||
39 | }.base; | ||