drm/nouveau/i2c: start hiding subdev-internal interfaces
authorBen Skeggs <bskeggs@redhat.com>
Tue, 13 May 2014 03:59:26 +0000 (13:59 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 11 Jun 2014 06:09:15 +0000 (16:09 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
21 files changed:
drivers/gpu/drm/nouveau/core/engine/device/gm100.c
drivers/gpu/drm/nouveau/core/engine/device/nv04.c
drivers/gpu/drm/nouveau/core/engine/device/nv10.c
drivers/gpu/drm/nouveau/core/engine/device/nv20.c
drivers/gpu/drm/nouveau/core/engine/device/nv30.c
drivers/gpu/drm/nouveau/core/engine/device/nv40.c
drivers/gpu/drm/nouveau/core/engine/device/nv50.c
drivers/gpu/drm/nouveau/core/engine/device/nvc0.c
drivers/gpu/drm/nouveau/core/engine/device/nve0.c
drivers/gpu/drm/nouveau/core/include/subdev/i2c.h
drivers/gpu/drm/nouveau/core/subdev/i2c/anx9805.c
drivers/gpu/drm/nouveau/core/subdev/i2c/aux.c
drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
drivers/gpu/drm/nouveau/core/subdev/i2c/bit.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nv04.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nv50.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nv50.h
drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nvd0.c
drivers/gpu/drm/nouveau/core/subdev/i2c/priv.h [new file with mode: 0644]

index c5d1ee00f668c2b78620d581341071f98661a60a..a520029e25d938818ae0b6193c1c516aabf63a19 100644 (file)
@@ -61,7 +61,7 @@ gm100_identify(struct nouveau_device *device)
                device->cname = "GM107";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nve0_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nvd0_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nvd0_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nve0_clock_oclass;
 #if 0
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nvd0_therm_oclass;
index 0a51ff4e9e00547b4649f43b2eadf55f86d44300..40b29d0214cb162ed6de884eb08ba98c548ee1ee 100644 (file)
@@ -47,7 +47,7 @@ nv04_identify(struct nouveau_device *device)
        case 0x04:
                device->cname = "NV04";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv04_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -65,7 +65,7 @@ nv04_identify(struct nouveau_device *device)
        case 0x05:
                device->cname = "NV05";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv05_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
index 772ef2c9fd2a82411c31def954a9cc706d38fa6f..5f7c25ff523d181d2b20fa9480bb72809a782bcf 100644 (file)
@@ -49,7 +49,7 @@ nv10_identify(struct nouveau_device *device)
                device->cname = "NV10";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv10_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -66,7 +66,7 @@ nv10_identify(struct nouveau_device *device)
                device->cname = "NV15";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv10_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -85,7 +85,7 @@ nv10_identify(struct nouveau_device *device)
                device->cname = "NV16";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv10_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -104,7 +104,7 @@ nv10_identify(struct nouveau_device *device)
                device->cname = "nForce";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -123,7 +123,7 @@ nv10_identify(struct nouveau_device *device)
                device->cname = "NV11";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv10_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -142,7 +142,7 @@ nv10_identify(struct nouveau_device *device)
                device->cname = "NV17";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv10_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -161,7 +161,7 @@ nv10_identify(struct nouveau_device *device)
                device->cname = "nForce2";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -180,7 +180,7 @@ nv10_identify(struct nouveau_device *device)
                device->cname = "NV18";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv10_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
index 38669dfd6ee3e6337b3934bd0bbb05677f07782f..75fed11bba0ac9e7b04e66ecb95d16b9ed314170 100644 (file)
@@ -50,7 +50,7 @@ nv20_identify(struct nouveau_device *device)
                device->cname = "NV20";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv20_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -69,7 +69,7 @@ nv20_identify(struct nouveau_device *device)
                device->cname = "NV25";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv20_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -88,7 +88,7 @@ nv20_identify(struct nouveau_device *device)
                device->cname = "NV28";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv20_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -107,7 +107,7 @@ nv20_identify(struct nouveau_device *device)
                device->cname = "NV2A";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv20_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
index 7d13c7efa2714454f3afec50487c786469e2eda6..36919d7db7ccb5250faaab837311ead535ba42ac 100644 (file)
@@ -50,7 +50,7 @@ nv30_identify(struct nouveau_device *device)
                device->cname = "NV30";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv20_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -69,7 +69,7 @@ nv30_identify(struct nouveau_device *device)
                device->cname = "NV35";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv20_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -88,7 +88,7 @@ nv30_identify(struct nouveau_device *device)
                device->cname = "NV31";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv20_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -108,7 +108,7 @@ nv30_identify(struct nouveau_device *device)
                device->cname = "NV36";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv20_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
@@ -128,7 +128,7 @@ nv30_identify(struct nouveau_device *device)
                device->cname = "NV34";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv04_clock_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv10_devinit_oclass;
                device->oclass[NVDEV_SUBDEV_MC     ] =  nv04_mc_oclass;
index d8b8ca83e906862c1492a3c721f404ff2c30bfce..1130a62be2c7cfaec6196529bd228fb0d583a9c6 100644 (file)
@@ -54,7 +54,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "NV40";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -77,7 +77,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "NV41";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -100,7 +100,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "NV42";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -123,7 +123,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "NV43";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -146,7 +146,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "NV45";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -169,7 +169,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "G70";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -192,7 +192,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "G71";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -215,7 +215,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "G73";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -238,7 +238,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "NV44";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -261,7 +261,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "G72";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -284,7 +284,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "NV44A";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -307,7 +307,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "C61";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -330,7 +330,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "C51";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv4e_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv4e_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -353,7 +353,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "C73";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -376,7 +376,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "C67";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
@@ -399,7 +399,7 @@ nv40_identify(struct nouveau_device *device)
                device->cname = "C68";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv04_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nv40_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv40_therm_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv1a_devinit_oclass;
index 4f35781e5e8070370e8429f931a74bb514616c72..ef0b0bde1a91d5d8502529cf69859a9efb2503a5 100644 (file)
@@ -61,7 +61,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "G80";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv50_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv50_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nv50_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv50_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -86,7 +86,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "G84";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv50_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv50_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nv84_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv84_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -114,7 +114,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "G86";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv50_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv50_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nv84_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv84_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -142,7 +142,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "G92";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv50_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nv84_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv84_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -170,7 +170,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "G94";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nv84_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv84_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -198,7 +198,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "G96";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nv84_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv84_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -226,7 +226,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "G98";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nv84_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv84_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -254,7 +254,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "G200";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv50_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nv84_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv84_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -282,7 +282,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "MCP77/MCP78";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nvaa_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv84_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -310,7 +310,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "MCP79/MCP7A";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] =  nvaa_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nv84_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -338,7 +338,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "GT215";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nva3_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -368,7 +368,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "GT216";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nva3_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -397,7 +397,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "GT218";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nva3_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -426,7 +426,7 @@ nv50_identify(struct nouveau_device *device)
                device->cname = "MCP89";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nva3_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
index 4bef0e4cfb2507acbf42a3ffaba828c0eb6c30f0..f199957995facf518a3f8aa9d0ad34cbba9eadf5 100644 (file)
@@ -61,7 +61,7 @@ nvc0_identify(struct nouveau_device *device)
                device->cname = "GF100";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nvc0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -93,7 +93,7 @@ nvc0_identify(struct nouveau_device *device)
                device->cname = "GF104";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nvc0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -125,7 +125,7 @@ nvc0_identify(struct nouveau_device *device)
                device->cname = "GF106";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nvc0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -156,7 +156,7 @@ nvc0_identify(struct nouveau_device *device)
                device->cname = "GF114";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nvc0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -188,7 +188,7 @@ nvc0_identify(struct nouveau_device *device)
                device->cname = "GF116";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nvc0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -220,7 +220,7 @@ nvc0_identify(struct nouveau_device *device)
                device->cname = "GF108";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nvc0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -251,7 +251,7 @@ nvc0_identify(struct nouveau_device *device)
                device->cname = "GF110";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv92_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nv94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nvc0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -283,7 +283,7 @@ nvc0_identify(struct nouveau_device *device)
                device->cname = "GF119";
                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    ] =  nvd0_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;
@@ -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    ] =  nvd0_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;
index 3e23ee3d468629ad0c72e12d7095d673225aba3a..9c921b35aa5d4edf5bd33dcb2aa4a1ba6f072c91 100644 (file)
@@ -61,7 +61,7 @@ nve0_identify(struct nouveau_device *device)
                device->cname = "GK104";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nve0_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nvd0_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nvd0_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nve0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nvd0_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -94,7 +94,7 @@ nve0_identify(struct nouveau_device *device)
                device->cname = "GK107";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nve0_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nvd0_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nvd0_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nve0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nvd0_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -127,7 +127,7 @@ nve0_identify(struct nouveau_device *device)
                device->cname = "GK106";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nve0_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nvd0_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nvd0_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nve0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nvd0_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -177,7 +177,7 @@ nve0_identify(struct nouveau_device *device)
                device->cname = "GK110";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nve0_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nvd0_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nvd0_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nve0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nvd0_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -210,7 +210,7 @@ nve0_identify(struct nouveau_device *device)
                device->cname = "GK110B";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nve0_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nvd0_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nvd0_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nve0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nvd0_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
@@ -243,7 +243,7 @@ nve0_identify(struct nouveau_device *device)
                device->cname = "GK208";
                device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nve0_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] = &nvd0_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  nvd0_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLOCK  ] = &nve0_clock_oclass;
                device->oclass[NVDEV_SUBDEV_THERM  ] = &nvd0_therm_oclass;
                device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
index 05f4453fd752838adcde844357045ef7577de0cd..857a11025dac8128970a511a5dc2f2dd7a0bae9f 100644 (file)
@@ -39,27 +39,6 @@ struct nouveau_i2c_func {
        int  (*drv_ctl)(struct nouveau_i2c_port *, int lane, int sw, int pe);
 };
 
-#define nouveau_i2c_port_create(p,e,o,i,a,f,d)                                 \
-       nouveau_i2c_port_create_((p), (e), (o), (i), (a), (f),                 \
-                                sizeof(**d), (void **)d)
-#define nouveau_i2c_port_destroy(p) ({                                         \
-       struct nouveau_i2c_port *port = (p);                                   \
-       _nouveau_i2c_port_dtor(nv_object(i2c));                                \
-})
-#define nouveau_i2c_port_init(p)                                               \
-       nouveau_object_init(&(p)->base)
-#define nouveau_i2c_port_fini(p,s)                                             \
-       nouveau_object_fini(&(p)->base, (s))
-
-int nouveau_i2c_port_create_(struct nouveau_object *, struct nouveau_object *,
-                            struct nouveau_oclass *, u8,
-                            const struct i2c_algorithm *,
-                            const struct nouveau_i2c_func *,
-                            int, void **);
-void _nouveau_i2c_port_dtor(struct nouveau_object *);
-#define _nouveau_i2c_port_init nouveau_object_init
-#define _nouveau_i2c_port_fini nouveau_object_fini
-
 struct nouveau_i2c_board_info {
        struct i2c_board_info dev;
        u8 udelay; /* set to 0 to use the standard delay */
@@ -83,37 +62,11 @@ nouveau_i2c(void *obj)
        return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_I2C];
 }
 
-#define nouveau_i2c_create(p,e,o,s,d)                                          \
-       nouveau_i2c_create_((p), (e), (o), (s), sizeof(**d), (void **)d)
-#define nouveau_i2c_destroy(p) ({                                              \
-       struct nouveau_i2c *i2c = (p);                                         \
-       _nouveau_i2c_dtor(nv_object(i2c));                                     \
-})
-#define nouveau_i2c_init(p) ({                                                 \
-       struct nouveau_i2c *i2c = (p);                                         \
-       _nouveau_i2c_init(nv_object(i2c));                                     \
-})
-#define nouveau_i2c_fini(p,s) ({                                               \
-       struct nouveau_i2c *i2c = (p);                                         \
-       _nouveau_i2c_fini(nv_object(i2c), (s));                                \
-})
-
-int nouveau_i2c_create_(struct nouveau_object *, struct nouveau_object *,
-                       struct nouveau_oclass *, struct nouveau_oclass *,
-                       int, void **);
-void _nouveau_i2c_dtor(struct nouveau_object *);
-int  _nouveau_i2c_init(struct nouveau_object *);
-int  _nouveau_i2c_fini(struct nouveau_object *, bool);
-
-extern struct nouveau_oclass nv04_i2c_oclass;
-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 nouveau_anx9805_sclass[];
-
-extern const struct i2c_algorithm nouveau_i2c_bit_algo;
-extern const struct i2c_algorithm nouveau_i2c_aux_algo;
+extern struct nouveau_oclass *nv04_i2c_oclass;
+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;
 
 static inline int
 nv_rdi2cr(struct nouveau_i2c_port *port, u8 addr, u8 reg)
index 29a5a7fe5c2b5d5e9103f1836e55b5d5aa92d49c..477f5a0b7393b0c97b1d62dff1b30b5671825019 100644 (file)
@@ -22,7 +22,7 @@
  * Authors: Ben Skeggs <bskeggs@redhat.com>
  */
 
-#include <subdev/i2c.h>
+#include "priv.h"
 
 struct anx9805_i2c_port {
        struct nouveau_i2c_port base;
index 73d027b281f2d520996ff53f4149c59573174fd5..cad742bde4d5c555f7c97ea94f6c38dbf1cc743f 100644 (file)
@@ -22,7 +22,7 @@
  * Authors: Ben Skeggs
  */
 
-#include <subdev/i2c.h>
+#include "priv.h"
 
 int
 nv_rdaux(struct nouveau_i2c_port *port, u32 addr, u8 *data, u8 size)
index 30529fd3b0d23e3d6f952cdcd8da6cc6fd69b1f3..1c6fa86e9425789ab3a4997ca0e6a54e3b63c4d9 100644 (file)
 #include <subdev/bios.h>
 #include <subdev/bios/dcb.h>
 #include <subdev/bios/i2c.h>
-#include <subdev/i2c.h>
 #include <subdev/vga.h>
 
+#include "priv.h"
+
 /******************************************************************************
  * interface to linux i2c bit-banging algorithm
  *****************************************************************************/
@@ -304,9 +305,9 @@ int
 nouveau_i2c_create_(struct nouveau_object *parent,
                    struct nouveau_object *engine,
                    struct nouveau_oclass *oclass,
-                   struct nouveau_oclass *sclass,
                    int length, void **pobject)
 {
+       const struct nouveau_i2c_impl *impl = (void *)oclass;
        struct nouveau_bios *bios = nouveau_bios(parent);
        struct nouveau_i2c *i2c;
        struct nouveau_object *object;
@@ -331,7 +332,7 @@ nouveau_i2c_create_(struct nouveau_object *parent,
                if (info.type == DCB_I2C_UNUSED)
                        continue;
 
-               oclass = sclass;
+               oclass = impl->sclass;
                do {
                        ret = -EINVAL;
                        if (oclass->handle == info.type) {
@@ -380,3 +381,19 @@ nouveau_i2c_create_(struct nouveau_object *parent,
 
        return 0;
 }
+
+int
+_nouveau_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
+                 struct nouveau_oclass *oclass, void *data, u32 size,
+                 struct nouveau_object **pobject)
+{
+       struct nouveau_i2c *i2c;
+       int ret;
+
+       ret = nouveau_i2c_create(parent, engine, oclass, &i2c);
+       *pobject = nv_object(i2c);
+       if (ret)
+               return ret;
+
+       return 0;
+}
index a6e72d3b06b594e1e4939eebae23353024c4280c..8fda0547e19d8aa35bc56098be20f0ca210c8108 100644 (file)
@@ -22,7 +22,7 @@
  * Authors: Ben Skeggs
  */
 
-#include "subdev/i2c.h"
+#include "priv.h"
 
 #ifdef CONFIG_NOUVEAU_I2C_INTERNAL
 #define T_TIMEOUT  2200000
index 860d5d2365dac4e6c76a7dcf7c6301b416bfba22..a37528d5cc9410357c9f4dc5d00e3aa8c2214c66 100644 (file)
  * Authors: Ben Skeggs
  */
 
-#include <subdev/i2c.h>
 #include <subdev/vga.h>
 
+#include "priv.h"
+
 struct nv04_i2c_priv {
        struct nouveau_i2c base;
 };
@@ -115,29 +116,14 @@ nv04_i2c_sclass[] = {
        {}
 };
 
-static int
-nv04_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
-             struct nouveau_oclass *oclass, void *data, u32 size,
-             struct nouveau_object **pobject)
-{
-       struct nv04_i2c_priv *priv;
-       int ret;
-
-       ret = nouveau_i2c_create(parent, engine, oclass, nv04_i2c_sclass, &priv);
-       *pobject = nv_object(priv);
-       if (ret)
-               return ret;
-
-       return 0;
-}
-
-struct nouveau_oclass
-nv04_i2c_oclass = {
-       .handle = NV_SUBDEV(I2C, 0x04),
-       .ofuncs = &(struct nouveau_ofuncs) {
-               .ctor = nv04_i2c_ctor,
+struct nouveau_oclass *
+nv04_i2c_oclass = &(struct nouveau_i2c_impl) {
+       .base.handle = NV_SUBDEV(I2C, 0x04),
+       .base.ofuncs = &(struct nouveau_ofuncs) {
+               .ctor = _nouveau_i2c_ctor,
                .dtor = _nouveau_i2c_dtor,
                .init = _nouveau_i2c_init,
                .fini = _nouveau_i2c_fini,
        },
-};
+       .sclass = nv04_i2c_sclass,
+}.base;
index 0c2655a03bb43f98fbac43b8d0053259b78c57e5..d97101b3c695b61f850d4b8e5568b90bc74ea29f 100644 (file)
  * Authors: Ben Skeggs
  */
 
-#include <subdev/i2c.h>
 #include <subdev/vga.h>
 
+#include "priv.h"
+
 struct nv4e_i2c_priv {
        struct nouveau_i2c base;
 };
@@ -107,29 +108,14 @@ nv4e_i2c_sclass[] = {
        {}
 };
 
-static int
-nv4e_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
-             struct nouveau_oclass *oclass, void *data, u32 size,
-             struct nouveau_object **pobject)
-{
-       struct nv4e_i2c_priv *priv;
-       int ret;
-
-       ret = nouveau_i2c_create(parent, engine, oclass, nv4e_i2c_sclass, &priv);
-       *pobject = nv_object(priv);
-       if (ret)
-               return ret;
-
-       return 0;
-}
-
-struct nouveau_oclass
-nv4e_i2c_oclass = {
-       .handle = NV_SUBDEV(I2C, 0x4e),
-       .ofuncs = &(struct nouveau_ofuncs) {
-               .ctor = nv4e_i2c_ctor,
+struct nouveau_oclass *
+nv4e_i2c_oclass = &(struct nouveau_i2c_impl) {
+       .base.handle = NV_SUBDEV(I2C, 0x4e),
+       .base.ofuncs = &(struct nouveau_ofuncs) {
+               .ctor = _nouveau_i2c_ctor,
                .dtor = _nouveau_i2c_dtor,
                .init = _nouveau_i2c_init,
                .fini = _nouveau_i2c_fini,
        },
-};
+       .sclass = nv4e_i2c_sclass,
+}.base;
index a8d67a287704df9272af233e5fc755780fca8670..bb854981a24bbec9bf572ad28fb89267a8b6e566 100644 (file)
@@ -121,29 +121,14 @@ nv50_i2c_sclass[] = {
        {}
 };
 
-static int
-nv50_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
-             struct nouveau_oclass *oclass, void *data, u32 size,
-             struct nouveau_object **pobject)
-{
-       struct nv50_i2c_priv *priv;
-       int ret;
-
-       ret = nouveau_i2c_create(parent, engine, oclass, nv50_i2c_sclass, &priv);
-       *pobject = nv_object(priv);
-       if (ret)
-               return ret;
-
-       return 0;
-}
-
-struct nouveau_oclass
-nv50_i2c_oclass = {
-       .handle = NV_SUBDEV(I2C, 0x50),
-       .ofuncs = &(struct nouveau_ofuncs) {
-               .ctor = nv50_i2c_ctor,
+struct nouveau_oclass *
+nv50_i2c_oclass = &(struct nouveau_i2c_impl) {
+       .base.handle = NV_SUBDEV(I2C, 0x50),
+       .base.ofuncs = &(struct nouveau_ofuncs) {
+               .ctor = _nouveau_i2c_ctor,
                .dtor = _nouveau_i2c_dtor,
                .init = _nouveau_i2c_init,
                .fini = _nouveau_i2c_fini,
        },
-};
+       .sclass = nv50_i2c_sclass,
+}.base;
index 4e5ba48ebf5a8300dc0b349a7f4cda87a24a4189..5d2a77421c7408f909018a9ef46d0d041208b223 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __NV50_I2C_H__
 #define __NV50_I2C_H__
 
-#include <subdev/i2c.h>
+#include "priv.h"
 
 struct nv50_i2c_priv {
        struct nouveau_i2c base;
index d790ef165f922fa571aad7c94328afe1ea2d81d8..768b849a7370cad2b1288cad4aa18fb54b641a68 100644 (file)
@@ -262,29 +262,14 @@ nv94_i2c_sclass[] = {
        {}
 };
 
-static int
-nv94_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
-             struct nouveau_oclass *oclass, void *data, u32 size,
-             struct nouveau_object **pobject)
-{
-       struct nv50_i2c_priv *priv;
-       int ret;
-
-       ret = nouveau_i2c_create(parent, engine, oclass, nv94_i2c_sclass, &priv);
-       *pobject = nv_object(priv);
-       if (ret)
-               return ret;
-
-       return 0;
-}
-
-struct nouveau_oclass
-nv94_i2c_oclass = {
-       .handle = NV_SUBDEV(I2C, 0x94),
-       .ofuncs = &(struct nouveau_ofuncs) {
-               .ctor = nv94_i2c_ctor,
+struct nouveau_oclass *
+nv94_i2c_oclass = &(struct nouveau_i2c_impl) {
+       .base.handle = NV_SUBDEV(I2C, 0x94),
+       .base.ofuncs = &(struct nouveau_ofuncs) {
+               .ctor = _nouveau_i2c_ctor,
                .dtor = _nouveau_i2c_dtor,
                .init = _nouveau_i2c_init,
                .fini = _nouveau_i2c_fini,
        },
-};
+       .sclass = nv94_i2c_sclass,
+}.base;
index 29967d30f97cbcbb7a1c3e889dd7310a98897e02..5237906e568f603d5ad062a691b25561d1f7d4c4 100644 (file)
@@ -96,29 +96,14 @@ nvd0_i2c_sclass[] = {
        {}
 };
 
-static int
-nvd0_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
-             struct nouveau_oclass *oclass, void *data, u32 size,
-             struct nouveau_object **pobject)
-{
-       struct nv50_i2c_priv *priv;
-       int ret;
-
-       ret = nouveau_i2c_create(parent, engine, oclass, nvd0_i2c_sclass, &priv);
-       *pobject = nv_object(priv);
-       if (ret)
-               return ret;
-
-       return 0;
-}
-
-struct nouveau_oclass
-nvd0_i2c_oclass = {
-       .handle = NV_SUBDEV(I2C, 0xd0),
-       .ofuncs = &(struct nouveau_ofuncs) {
-               .ctor = nvd0_i2c_ctor,
+struct nouveau_oclass *
+nvd0_i2c_oclass = &(struct nouveau_i2c_impl) {
+       .base.handle = NV_SUBDEV(I2C, 0xd0),
+       .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,
+}.base;
diff --git a/drivers/gpu/drm/nouveau/core/subdev/i2c/priv.h b/drivers/gpu/drm/nouveau/core/subdev/i2c/priv.h
new file mode 100644 (file)
index 0000000..ec19342
--- /dev/null
@@ -0,0 +1,61 @@
+#ifndef __NVKM_I2C_H__
+#define __NVKM_I2C_H__
+
+#include <subdev/i2c.h>
+
+#define nouveau_i2c_port_create(p,e,o,i,a,f,d)                                 \
+       nouveau_i2c_port_create_((p), (e), (o), (i), (a), (f),                 \
+                                sizeof(**d), (void **)d)
+#define nouveau_i2c_port_destroy(p) ({                                         \
+       struct nouveau_i2c_port *port = (p);                                   \
+       _nouveau_i2c_port_dtor(nv_object(i2c));                                \
+})
+#define nouveau_i2c_port_init(p)                                               \
+       nouveau_object_init(&(p)->base)
+#define nouveau_i2c_port_fini(p,s)                                             \
+       nouveau_object_fini(&(p)->base, (s))
+
+int nouveau_i2c_port_create_(struct nouveau_object *, struct nouveau_object *,
+                            struct nouveau_oclass *, u8,
+                            const struct i2c_algorithm *,
+                            const struct nouveau_i2c_func *,
+                            int, void **);
+void _nouveau_i2c_port_dtor(struct nouveau_object *);
+#define _nouveau_i2c_port_init nouveau_object_init
+#define _nouveau_i2c_port_fini nouveau_object_fini
+
+#define nouveau_i2c_create(p,e,o,d)                                            \
+       nouveau_i2c_create_((p), (e), (o), sizeof(**d), (void **)d)
+#define nouveau_i2c_destroy(p) ({                                              \
+       struct nouveau_i2c *i2c = (p);                                         \
+       _nouveau_i2c_dtor(nv_object(i2c));                                     \
+})
+#define nouveau_i2c_init(p) ({                                                 \
+       struct nouveau_i2c *i2c = (p);                                         \
+       _nouveau_i2c_init(nv_object(i2c));                                     \
+})
+#define nouveau_i2c_fini(p,s) ({                                               \
+       struct nouveau_i2c *i2c = (p);                                         \
+       _nouveau_i2c_fini(nv_object(i2c), (s));                                \
+})
+
+int nouveau_i2c_create_(struct nouveau_object *, struct nouveau_object *,
+                       struct nouveau_oclass *, int, void **);
+int  _nouveau_i2c_ctor(struct nouveau_object *, struct nouveau_object *,
+                      struct nouveau_oclass *, void *, u32,
+                      struct nouveau_object **);
+void _nouveau_i2c_dtor(struct nouveau_object *);
+int  _nouveau_i2c_init(struct nouveau_object *);
+int  _nouveau_i2c_fini(struct nouveau_object *, bool);
+
+extern struct nouveau_oclass nouveau_anx9805_sclass[];
+
+extern const struct i2c_algorithm nouveau_i2c_bit_algo;
+extern const struct i2c_algorithm nouveau_i2c_aux_algo;
+
+struct nouveau_i2c_impl {
+       struct nouveau_oclass base;
+       struct nouveau_oclass *sclass;
+};
+
+#endif