OSDN Git Service

drm/nouveau/i2c: switch to instanced constructor
authorBen Skeggs <bskeggs@redhat.com>
Fri, 4 Dec 2020 02:03:13 +0000 (12:03 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 11 Feb 2021 01:49:53 +0000 (11:49 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
16 files changed:
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/g94.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gf117.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gf119.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gk104.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gk110.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm200.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv04.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h

index 4b7f75a..2dc7134 100644 (file)
@@ -60,7 +60,6 @@ struct nvkm_device {
                struct notifier_block nb;
        } acpi;
 
-       struct nvkm_i2c *i2c;
        struct nvkm_subdev *ibus;
        struct nvkm_iccsense *iccsense;
        struct nvkm_instmem *imem;
@@ -137,7 +136,6 @@ struct nvkm_device_chip {
 #include <core/layout.h>
 #undef NVKM_LAYOUT_INST
 #undef NVKM_LAYOUT_ONCE
-       int (*i2c     )(struct nvkm_device *, int idx, struct nvkm_i2c **);
        int (*ibus    )(struct nvkm_device *, int idx, struct nvkm_subdev **);
        int (*iccsense)(struct nvkm_device *, int idx, struct nvkm_iccsense **);
        int (*imem    )(struct nvkm_device *, int idx, struct nvkm_instmem **);
index a307c98..61f8237 100644 (file)
@@ -2,6 +2,7 @@
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VBIOS   , struct nvkm_bios    ,     bios)
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_DEVINIT , struct nvkm_devinit ,  devinit)
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_GPIO    , struct nvkm_gpio    ,     gpio)
+NVKM_LAYOUT_ONCE(NVKM_SUBDEV_I2C     , struct nvkm_i2c     ,      i2c)
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FUSE    , struct nvkm_fuse    ,     fuse)
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BUS     , struct nvkm_bus     ,      bus)
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FB      , struct nvkm_fb      ,       fb)
index 640f649..146e132 100644 (file)
@@ -85,15 +85,15 @@ struct nvkm_i2c {
 struct nvkm_i2c_bus *nvkm_i2c_bus_find(struct nvkm_i2c *, int);
 struct nvkm_i2c_aux *nvkm_i2c_aux_find(struct nvkm_i2c *, int);
 
-int nv04_i2c_new(struct nvkm_device *, int, struct nvkm_i2c **);
-int nv4e_i2c_new(struct nvkm_device *, int, struct nvkm_i2c **);
-int nv50_i2c_new(struct nvkm_device *, int, struct nvkm_i2c **);
-int g94_i2c_new(struct nvkm_device *, int, struct nvkm_i2c **);
-int gf117_i2c_new(struct nvkm_device *, int, struct nvkm_i2c **);
-int gf119_i2c_new(struct nvkm_device *, int, struct nvkm_i2c **);
-int gk104_i2c_new(struct nvkm_device *, int, struct nvkm_i2c **);
-int gk110_i2c_new(struct nvkm_device *, int, struct nvkm_i2c **);
-int gm200_i2c_new(struct nvkm_device *, int, struct nvkm_i2c **);
+int nv04_i2c_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_i2c **);
+int nv4e_i2c_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_i2c **);
+int nv50_i2c_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_i2c **);
+int g94_i2c_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_i2c **);
+int gf117_i2c_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_i2c **);
+int gf119_i2c_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_i2c **);
+int gk104_i2c_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_i2c **);
+int gk110_i2c_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_i2c **);
+int gm200_i2c_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_i2c **);
 
 static inline int
 nvkm_rdi2cr(struct i2c_adapter *adap, u8 addr, u8 reg)
index 17156b1..cfd4ba0 100644 (file)
@@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
 #include <core/layout.h>
 #undef NVKM_LAYOUT_ONCE
 #undef NVKM_LAYOUT_INST
-       [NVKM_SUBDEV_I2C     ] = "i2c",
        [NVKM_SUBDEV_IBUS    ] = "priv",
        [NVKM_SUBDEV_ICCSENSE] = "iccsense",
        [NVKM_SUBDEV_INSTMEM ] = "imem",
index 8f043d7..2de8630 100644 (file)
@@ -82,7 +82,7 @@ nv4_chipset = {
        .clk      = { 0x00000001, nv04_clk_new },
        .devinit  = { 0x00000001, nv04_devinit_new },
        .fb       = { 0x00000001, nv04_fb_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv04_mc_new,
        .mmu = nv04_mmu_new,
@@ -103,7 +103,7 @@ nv5_chipset = {
        .clk      = { 0x00000001, nv04_clk_new },
        .devinit  = { 0x00000001, nv05_devinit_new },
        .fb       = { 0x00000001, nv04_fb_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv04_mc_new,
        .mmu = nv04_mmu_new,
@@ -125,7 +125,7 @@ nv10_chipset = {
        .devinit  = { 0x00000001, nv10_devinit_new },
        .fb       = { 0x00000001, nv10_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv04_mc_new,
        .mmu = nv04_mmu_new,
@@ -145,7 +145,7 @@ nv11_chipset = {
        .devinit  = { 0x00000001, nv10_devinit_new },
        .fb       = { 0x00000001, nv10_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv11_mc_new,
        .mmu = nv04_mmu_new,
@@ -167,7 +167,7 @@ nv15_chipset = {
        .devinit  = { 0x00000001, nv10_devinit_new },
        .fb       = { 0x00000001, nv10_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv04_mc_new,
        .mmu = nv04_mmu_new,
@@ -189,7 +189,7 @@ nv17_chipset = {
        .devinit  = { 0x00000001, nv10_devinit_new },
        .fb       = { 0x00000001, nv10_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -211,7 +211,7 @@ nv18_chipset = {
        .devinit  = { 0x00000001, nv10_devinit_new },
        .fb       = { 0x00000001, nv10_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -233,7 +233,7 @@ nv1a_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv1a_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv04_mc_new,
        .mmu = nv04_mmu_new,
@@ -255,7 +255,7 @@ nv1f_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv1a_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -277,7 +277,7 @@ nv20_chipset = {
        .devinit  = { 0x00000001, nv20_devinit_new },
        .fb       = { 0x00000001, nv20_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -299,7 +299,7 @@ nv25_chipset = {
        .devinit  = { 0x00000001, nv20_devinit_new },
        .fb       = { 0x00000001, nv25_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -321,7 +321,7 @@ nv28_chipset = {
        .devinit  = { 0x00000001, nv20_devinit_new },
        .fb       = { 0x00000001, nv25_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -343,7 +343,7 @@ nv2a_chipset = {
        .devinit  = { 0x00000001, nv20_devinit_new },
        .fb       = { 0x00000001, nv25_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -365,7 +365,7 @@ nv30_chipset = {
        .devinit  = { 0x00000001, nv20_devinit_new },
        .fb       = { 0x00000001, nv30_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -387,7 +387,7 @@ nv31_chipset = {
        .devinit  = { 0x00000001, nv20_devinit_new },
        .fb       = { 0x00000001, nv30_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -410,7 +410,7 @@ nv34_chipset = {
        .devinit  = { 0x00000001, nv10_devinit_new },
        .fb       = { 0x00000001, nv10_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -433,7 +433,7 @@ nv35_chipset = {
        .devinit  = { 0x00000001, nv20_devinit_new },
        .fb       = { 0x00000001, nv35_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -455,7 +455,7 @@ nv36_chipset = {
        .devinit  = { 0x00000001, nv20_devinit_new },
        .fb       = { 0x00000001, nv36_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv04_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -478,7 +478,7 @@ nv40_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv40_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -504,7 +504,7 @@ nv41_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv41_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv41_mmu_new,
@@ -530,7 +530,7 @@ nv42_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv41_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv41_mmu_new,
@@ -556,7 +556,7 @@ nv43_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv41_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv41_mmu_new,
@@ -582,7 +582,7 @@ nv44_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv44_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv44_mc_new,
        .mmu = nv44_mmu_new,
@@ -608,7 +608,7 @@ nv45_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv40_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv04_mmu_new,
@@ -634,7 +634,7 @@ nv46_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv46_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv44_mc_new,
        .mmu = nv44_mmu_new,
@@ -660,7 +660,7 @@ nv47_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv47_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv41_mmu_new,
@@ -686,7 +686,7 @@ nv49_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv49_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv41_mmu_new,
@@ -712,7 +712,7 @@ nv4a_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv44_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv44_mc_new,
        .mmu = nv04_mmu_new,
@@ -738,7 +738,7 @@ nv4b_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv49_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv17_mc_new,
        .mmu = nv41_mmu_new,
@@ -764,7 +764,7 @@ nv4c_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv46_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv44_mc_new,
        .mmu = nv44_mmu_new,
@@ -790,7 +790,7 @@ nv4e_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv4e_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv4e_i2c_new,
+       .i2c      = { 0x00000001, nv4e_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv44_mc_new,
        .mmu = nv44_mmu_new,
@@ -818,7 +818,7 @@ nv50_chipset = {
        .fb       = { 0x00000001, nv50_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, nv50_gpio_new },
-       .i2c = nv50_i2c_new,
+       .i2c      = { 0x00000001, nv50_i2c_new },
        .imem = nv50_instmem_new,
        .mc = nv50_mc_new,
        .mmu = nv50_mmu_new,
@@ -845,7 +845,7 @@ nv63_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv46_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv44_mc_new,
        .mmu = nv44_mmu_new,
@@ -871,7 +871,7 @@ nv67_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv46_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv44_mc_new,
        .mmu = nv44_mmu_new,
@@ -897,7 +897,7 @@ nv68_chipset = {
        .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb       = { 0x00000001, nv46_fb_new },
        .gpio     = { 0x00000001, nv10_gpio_new },
-       .i2c = nv04_i2c_new,
+       .i2c      = { 0x00000001, nv04_i2c_new },
        .imem = nv40_instmem_new,
        .mc = nv44_mc_new,
        .mmu = nv44_mmu_new,
@@ -925,7 +925,7 @@ nv84_chipset = {
        .fb       = { 0x00000001, g84_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, nv50_gpio_new },
-       .i2c = nv50_i2c_new,
+       .i2c      = { 0x00000001, nv50_i2c_new },
        .imem = nv50_instmem_new,
        .mc = g84_mc_new,
        .mmu = g84_mmu_new,
@@ -957,7 +957,7 @@ nv86_chipset = {
        .fb       = { 0x00000001, g84_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, nv50_gpio_new },
-       .i2c = nv50_i2c_new,
+       .i2c      = { 0x00000001, nv50_i2c_new },
        .imem = nv50_instmem_new,
        .mc = g84_mc_new,
        .mmu = g84_mmu_new,
@@ -989,7 +989,7 @@ nv92_chipset = {
        .fb       = { 0x00000001, g84_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, nv50_gpio_new },
-       .i2c = nv50_i2c_new,
+       .i2c      = { 0x00000001, nv50_i2c_new },
        .imem = nv50_instmem_new,
        .mc = g84_mc_new,
        .mmu = g84_mmu_new,
@@ -1021,7 +1021,7 @@ nv94_chipset = {
        .fb       = { 0x00000001, g84_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .imem = nv50_instmem_new,
        .mc = g84_mc_new,
        .mmu = g84_mmu_new,
@@ -1053,7 +1053,7 @@ nv96_chipset = {
        .fb       = { 0x00000001, g84_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .imem = nv50_instmem_new,
        .mc = g84_mc_new,
        .mmu = g84_mmu_new,
@@ -1085,7 +1085,7 @@ nv98_chipset = {
        .fb       = { 0x00000001, g84_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .imem = nv50_instmem_new,
        .mc = g98_mc_new,
        .mmu = g84_mmu_new,
@@ -1117,7 +1117,7 @@ nva0_chipset = {
        .fb       = { 0x00000001, g84_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = nv50_i2c_new,
+       .i2c      = { 0x00000001, nv50_i2c_new },
        .imem = nv50_instmem_new,
        .mc = g84_mc_new,
        .mmu = g84_mmu_new,
@@ -1149,7 +1149,7 @@ nva3_chipset = {
        .fb       = { 0x00000001, gt215_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .imem = nv50_instmem_new,
        .mc = gt215_mc_new,
        .mmu = g84_mmu_new,
@@ -1183,7 +1183,7 @@ nva5_chipset = {
        .fb       = { 0x00000001, gt215_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .imem = nv50_instmem_new,
        .mc = gt215_mc_new,
        .mmu = g84_mmu_new,
@@ -1216,7 +1216,7 @@ nva8_chipset = {
        .fb       = { 0x00000001, gt215_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .imem = nv50_instmem_new,
        .mc = gt215_mc_new,
        .mmu = g84_mmu_new,
@@ -1249,7 +1249,7 @@ nvaa_chipset = {
        .fb       = { 0x00000001, mcp77_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .imem = nv50_instmem_new,
        .mc = g98_mc_new,
        .mmu = mcp77_mmu_new,
@@ -1281,7 +1281,7 @@ nvac_chipset = {
        .fb       = { 0x00000001, mcp77_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .imem = nv50_instmem_new,
        .mc = g98_mc_new,
        .mmu = mcp77_mmu_new,
@@ -1313,7 +1313,7 @@ nvaf_chipset = {
        .fb       = { 0x00000001, mcp89_fb_new },
        .fuse     = { 0x00000001, nv50_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .imem = nv50_instmem_new,
        .mc = gt215_mc_new,
        .mmu = mcp77_mmu_new,
@@ -1346,7 +1346,7 @@ nvc0_chipset = {
        .fb       = { 0x00000001, gf100_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .ibus = gf100_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1383,7 +1383,7 @@ nvc1_chipset = {
        .fb       = { 0x00000001, gf108_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .ibus = gf100_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1419,7 +1419,7 @@ nvc3_chipset = {
        .fb       = { 0x00000001, gf100_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .ibus = gf100_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1455,7 +1455,7 @@ nvc4_chipset = {
        .fb       = { 0x00000001, gf100_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .ibus = gf100_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1492,7 +1492,7 @@ nvc8_chipset = {
        .fb       = { 0x00000001, gf100_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .ibus = gf100_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1529,7 +1529,7 @@ nvce_chipset = {
        .fb       = { 0x00000001, gf100_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .ibus = gf100_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1566,7 +1566,7 @@ nvcf_chipset = {
        .fb       = { 0x00000001, gf100_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, g94_gpio_new },
-       .i2c = g94_i2c_new,
+       .i2c      = { 0x00000001, g94_i2c_new },
        .ibus = gf100_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1602,7 +1602,7 @@ nvd7_chipset = {
        .fb       = { 0x00000001, gf100_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, gf119_gpio_new },
-       .i2c = gf117_i2c_new,
+       .i2c      = { 0x00000001, gf117_i2c_new },
        .ibus = gf117_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1637,7 +1637,7 @@ nvd9_chipset = {
        .fb       = { 0x00000001, gf100_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, gf119_gpio_new },
-       .i2c = gf119_i2c_new,
+       .i2c      = { 0x00000001, gf119_i2c_new },
        .ibus = gf117_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1673,7 +1673,7 @@ nve4_chipset = {
        .fb       = { 0x00000001, gk104_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gk104_i2c_new,
+       .i2c      = { 0x00000001, gk104_i2c_new },
        .ibus = gk104_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1712,7 +1712,7 @@ nve6_chipset = {
        .fb       = { 0x00000001, gk104_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gk104_i2c_new,
+       .i2c      = { 0x00000001, gk104_i2c_new },
        .ibus = gk104_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1751,7 +1751,7 @@ nve7_chipset = {
        .fb       = { 0x00000001, gk104_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gk104_i2c_new,
+       .i2c      = { 0x00000001, gk104_i2c_new },
        .ibus = gk104_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1815,7 +1815,7 @@ nvf0_chipset = {
        .fb       = { 0x00000001, gk110_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gk110_i2c_new,
+       .i2c      = { 0x00000001, gk110_i2c_new },
        .ibus = gk104_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1853,7 +1853,7 @@ nvf1_chipset = {
        .fb       = { 0x00000001, gk110_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gk110_i2c_new,
+       .i2c      = { 0x00000001, gk110_i2c_new },
        .ibus = gk104_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1891,7 +1891,7 @@ nv106_chipset = {
        .fb       = { 0x00000001, gk110_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gk110_i2c_new,
+       .i2c      = { 0x00000001, gk110_i2c_new },
        .ibus = gk104_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1929,7 +1929,7 @@ nv108_chipset = {
        .fb       = { 0x00000001, gk110_fb_new },
        .fuse     = { 0x00000001, gf100_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gk110_i2c_new,
+       .i2c      = { 0x00000001, gk110_i2c_new },
        .ibus = gk104_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -1967,7 +1967,7 @@ nv117_chipset = {
        .fb       = { 0x00000001, gm107_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gk110_i2c_new,
+       .i2c      = { 0x00000001, gk110_i2c_new },
        .ibus = gk104_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -2003,7 +2003,7 @@ nv118_chipset = {
        .fb       = { 0x00000001, gm107_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gk110_i2c_new,
+       .i2c      = { 0x00000001, gk110_i2c_new },
        .ibus = gk104_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -2037,7 +2037,7 @@ nv120_chipset = {
        .fb       = { 0x00000001, gm200_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -2075,7 +2075,7 @@ nv124_chipset = {
        .fb       = { 0x00000001, gm200_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -2113,7 +2113,7 @@ nv126_chipset = {
        .fb       = { 0x00000001, gm200_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .iccsense = gf100_iccsense_new,
        .imem = nv50_instmem_new,
@@ -2176,7 +2176,7 @@ nv130_chipset = {
        .fb       = { 0x00000001, gp100_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp100_ltc_new,
@@ -2216,7 +2216,7 @@ nv132_chipset = {
        .fb       = { 0x00000001, gp102_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2254,7 +2254,7 @@ nv134_chipset = {
        .fb       = { 0x00000001, gp102_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2292,7 +2292,7 @@ nv136_chipset = {
        .fb       = { 0x00000001, gp102_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2329,7 +2329,7 @@ nv137_chipset = {
        .fb       = { 0x00000001, gp102_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2367,7 +2367,7 @@ nv138_chipset = {
        .fb       = { 0x00000001, gp102_fb_new },
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2428,7 +2428,7 @@ nv140_chipset = {
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
        .gsp      = { 0x00000001, gv100_gsp_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2472,7 +2472,7 @@ nv162_chipset = {
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
        .gsp      = { 0x00000001, gv100_gsp_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2510,7 +2510,7 @@ nv164_chipset = {
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
        .gsp      = { 0x00000001, gv100_gsp_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2549,7 +2549,7 @@ nv166_chipset = {
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
        .gsp      = { 0x00000001, gv100_gsp_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2589,7 +2589,7 @@ nv167_chipset = {
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
        .gsp      = { 0x00000001, gv100_gsp_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2627,7 +2627,7 @@ nv168_chipset = {
        .fuse     = { 0x00000001, gm107_fuse_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
        .gsp      = { 0x00000001, gv100_gsp_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .ltc = gp102_ltc_new,
@@ -2660,7 +2660,7 @@ nv170_chipset = {
        .devinit  = { 0x00000001, ga100_devinit_new },
        .fb       = { 0x00000001, ga100_fb_new },
        .gpio     = { 0x00000001, gk104_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .mc = ga100_mc_new,
@@ -2677,7 +2677,7 @@ nv172_chipset = {
        .devinit  = { 0x00000001, ga100_devinit_new },
        .fb       = { 0x00000001, ga102_fb_new },
        .gpio     = { 0x00000001, ga102_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .mc = ga100_mc_new,
@@ -2696,7 +2696,7 @@ nv174_chipset = {
        .devinit  = { 0x00000001, ga100_devinit_new },
        .fb       = { 0x00000001, ga102_fb_new },
        .gpio     = { 0x00000001, ga102_gpio_new },
-       .i2c = gm200_i2c_new,
+       .i2c      = { 0x00000001, gm200_i2c_new },
        .ibus = gm200_ibus_new,
        .imem = nv50_instmem_new,
        .mc = ga100_mc_new,
@@ -3248,7 +3248,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
 #include <core/layout.h>
 #undef NVKM_LAYOUT_INST
 #undef NVKM_LAYOUT_ONCE
-               _(NVKM_SUBDEV_I2C     ,      i2c);
                _(NVKM_SUBDEV_IBUS    ,     ibus);
                _(NVKM_SUBDEV_ICCSENSE, iccsense);
                _(NVKM_SUBDEV_INSTMEM ,     imem);
index 7193450..cb5cb53 100644 (file)
@@ -277,7 +277,7 @@ nvkm_i2c_drv[] = {
 
 int
 nvkm_i2c_new_(const struct nvkm_i2c_func *func, struct nvkm_device *device,
-             int index, struct nvkm_i2c **pi2c)
+             enum nvkm_subdev_type type, int inst, struct nvkm_i2c **pi2c)
 {
        struct nvkm_bios *bios = device->bios;
        struct nvkm_i2c *i2c;
@@ -289,7 +289,7 @@ nvkm_i2c_new_(const struct nvkm_i2c_func *func, struct nvkm_device *device,
        if (!(i2c = *pi2c = kzalloc(sizeof(*i2c), GFP_KERNEL)))
                return -ENOMEM;
 
-       nvkm_subdev_ctor(&nvkm_i2c, device, index, &i2c->subdev);
+       nvkm_subdev_ctor(&nvkm_i2c, device, type, inst, &i2c->subdev);
        i2c->func = func;
        INIT_LIST_HEAD(&i2c->pad);
        INIT_LIST_HEAD(&i2c->bus);
index bb2a31d..e5bad08 100644 (file)
@@ -66,7 +66,8 @@ g94_i2c = {
 };
 
 int
-g94_i2c_new(struct nvkm_device *device, int index, struct nvkm_i2c **pi2c)
+g94_i2c_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+           struct nvkm_i2c **pi2c)
 {
-       return nvkm_i2c_new_(&g94_i2c, device, index, pi2c);
+       return nvkm_i2c_new_(&g94_i2c, device, type, inst, pi2c);
 }
index ae4aad3..cda30ee 100644 (file)
@@ -30,7 +30,8 @@ gf117_i2c = {
 };
 
 int
-gf117_i2c_new(struct nvkm_device *device, int index, struct nvkm_i2c **pi2c)
+gf117_i2c_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+             struct nvkm_i2c **pi2c)
 {
-       return nvkm_i2c_new_(&gf117_i2c, device, index, pi2c);
+       return nvkm_i2c_new_(&gf117_i2c, device, type, inst, pi2c);
 }
index 6f2b02a..e9c6a6c 100644 (file)
@@ -34,7 +34,8 @@ gf119_i2c = {
 };
 
 int
-gf119_i2c_new(struct nvkm_device *device, int index, struct nvkm_i2c **pi2c)
+gf119_i2c_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+             struct nvkm_i2c **pi2c)
 {
-       return nvkm_i2c_new_(&gf119_i2c, device, index, pi2c);
+       return nvkm_i2c_new_(&gf119_i2c, device, type, inst, pi2c);
 }
index f9f6bf4..d35aa6f 100644 (file)
@@ -66,7 +66,8 @@ gk104_i2c = {
 };
 
 int
-gk104_i2c_new(struct nvkm_device *device, int index, struct nvkm_i2c **pi2c)
+gk104_i2c_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+             struct nvkm_i2c **pi2c)
 {
-       return nvkm_i2c_new_(&gk104_i2c, device, index, pi2c);
+       return nvkm_i2c_new_(&gk104_i2c, device, type, inst, pi2c);
 }
index 8e3bfa1..9fec6af 100644 (file)
@@ -39,7 +39,8 @@ gk110_i2c = {
 };
 
 int
-gk110_i2c_new(struct nvkm_device *device, int index, struct nvkm_i2c **pi2c)
+gk110_i2c_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+             struct nvkm_i2c **pi2c)
 {
-       return nvkm_i2c_new_(&gk110_i2c, device, index, pi2c);
+       return nvkm_i2c_new_(&gk110_i2c, device, type, inst, pi2c);
 }
index 7b2375b..46917eb 100644 (file)
@@ -41,7 +41,8 @@ gm200_i2c = {
 };
 
 int
-gm200_i2c_new(struct nvkm_device *device, int index, struct nvkm_i2c **pi2c)
+gm200_i2c_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+             struct nvkm_i2c **pi2c)
 {
-       return nvkm_i2c_new_(&gm200_i2c, device, index, pi2c);
+       return nvkm_i2c_new_(&gm200_i2c, device, type, inst, pi2c);
 }
index 18776f4..ecfcf14 100644 (file)
@@ -30,7 +30,8 @@ nv04_i2c = {
 };
 
 int
-nv04_i2c_new(struct nvkm_device *device, int index, struct nvkm_i2c **pi2c)
+nv04_i2c_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+            struct nvkm_i2c **pi2c)
 {
-       return nvkm_i2c_new_(&nv04_i2c, device, index, pi2c);
+       return nvkm_i2c_new_(&nv04_i2c, device, type, inst, pi2c);
 }
index 6b762f7..ad1d3fd 100644 (file)
@@ -30,7 +30,8 @@ nv4e_i2c = {
 };
 
 int
-nv4e_i2c_new(struct nvkm_device *device, int index, struct nvkm_i2c **pi2c)
+nv4e_i2c_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+            struct nvkm_i2c **pi2c)
 {
-       return nvkm_i2c_new_(&nv4e_i2c, device, index, pi2c);
+       return nvkm_i2c_new_(&nv4e_i2c, device, type, inst, pi2c);
 }
index 75640ab..2f94bed 100644 (file)
@@ -30,7 +30,8 @@ nv50_i2c = {
 };
 
 int
-nv50_i2c_new(struct nvkm_device *device, int index, struct nvkm_i2c **pi2c)
+nv50_i2c_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+            struct nvkm_i2c **pi2c)
 {
-       return nvkm_i2c_new_(&nv50_i2c, device, index, pi2c);
+       return nvkm_i2c_new_(&nv50_i2c, device, type, inst, pi2c);
 }
index e35f603..f9d79f7 100644 (file)
@@ -4,8 +4,8 @@
 #define nvkm_i2c(p) container_of((p), struct nvkm_i2c, subdev)
 #include <subdev/i2c.h>
 
-int nvkm_i2c_new_(const struct nvkm_i2c_func *, struct nvkm_device *,
-                 int index, struct nvkm_i2c **);
+int nvkm_i2c_new_(const struct nvkm_i2c_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
+                 struct nvkm_i2c **);
 
 struct nvkm_i2c_func {
        int (*pad_x_new)(struct nvkm_i2c *, int id, struct nvkm_i2c_pad **);