summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-12-04 11:21:38 +1000
committerBen Skeggs <bskeggs@redhat.com>2021-02-11 11:49:52 +1000
commit01055c01ba435cce2e9644a2c1582948f4c64883 (patch)
treeb424b6b5765aa1c7b6765f089097ce468daac368 /drivers
parent8d056d9987e3fb0189ffd281c7ba065bd265d8b0 (diff)
downloadlinux-01055c01ba435cce2e9644a2c1582948f4c64883.tar.bz2
drm/nouveau/gpio: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/core/device.h2
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/core/layout.h1
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h12
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/subdev.c1
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/base.c165
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/g94.c5
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/ga102.c5
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gf119.c5
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c5
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv10.c5
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv50.c5
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/priv.h4
13 files changed, 111 insertions, 108 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h
index 3a264d25201d..42ce75d325fa 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h
@@ -60,7 +60,6 @@ struct nvkm_device {
struct notifier_block nb;
} acpi;
- struct nvkm_gpio *gpio;
struct nvkm_gsp *gsp;
struct nvkm_i2c *i2c;
struct nvkm_subdev *ibus;
@@ -139,7 +138,6 @@ struct nvkm_device_chip {
#include <core/layout.h>
#undef NVKM_LAYOUT_INST
#undef NVKM_LAYOUT_ONCE
- int (*gpio )(struct nvkm_device *, int idx, struct nvkm_gpio **);
int (*gsp )(struct nvkm_device *, int idx, struct nvkm_gsp **);
int (*i2c )(struct nvkm_device *, int idx, struct nvkm_i2c **);
int (*ibus )(struct nvkm_device *, int idx, struct nvkm_subdev **);
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
index e34c1b9c77b6..13c8d3736eed 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: MIT */
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_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)
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h
index cdcce5ece6ff..0e46ea1fe972 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h
@@ -32,10 +32,10 @@ int nvkm_gpio_find(struct nvkm_gpio *, int idx, u8 tag, u8 line,
int nvkm_gpio_set(struct nvkm_gpio *, int idx, u8 tag, u8 line, int state);
int nvkm_gpio_get(struct nvkm_gpio *, int idx, u8 tag, u8 line);
-int nv10_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
-int nv50_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
-int g94_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
-int gf119_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
-int gk104_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
-int ga102_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
+int nv10_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
+int nv50_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
+int g94_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
+int gf119_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
+int gk104_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
+int ga102_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
#endif
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
index fbe8a2379a6c..b83dd00160c9 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
@@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
#include <core/layout.h>
#undef NVKM_LAYOUT_ONCE
#undef NVKM_LAYOUT_INST
- [NVKM_SUBDEV_GPIO ] = "gpio",
[NVKM_SUBDEV_GSP ] = "gsp",
[NVKM_SUBDEV_I2C ] = "i2c",
[NVKM_SUBDEV_IBUS ] = "priv",
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
index 0a4355686fcb..86dd1353b52b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
@@ -124,7 +124,7 @@ nv10_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv10_devinit_new },
.fb = { 0x00000001, nv10_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv04_mc_new,
@@ -144,7 +144,7 @@ nv11_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv10_devinit_new },
.fb = { 0x00000001, nv10_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv11_mc_new,
@@ -166,7 +166,7 @@ nv15_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv10_devinit_new },
.fb = { 0x00000001, nv10_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv04_mc_new,
@@ -188,7 +188,7 @@ nv17_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv10_devinit_new },
.fb = { 0x00000001, nv10_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -210,7 +210,7 @@ nv18_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv10_devinit_new },
.fb = { 0x00000001, nv10_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -232,7 +232,7 @@ nv1a_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv1a_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv04_mc_new,
@@ -254,7 +254,7 @@ nv1f_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv1a_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -276,7 +276,7 @@ nv20_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv20_devinit_new },
.fb = { 0x00000001, nv20_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -298,7 +298,7 @@ nv25_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv20_devinit_new },
.fb = { 0x00000001, nv25_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -320,7 +320,7 @@ nv28_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv20_devinit_new },
.fb = { 0x00000001, nv25_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -342,7 +342,7 @@ nv2a_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv20_devinit_new },
.fb = { 0x00000001, nv25_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -364,7 +364,7 @@ nv30_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv20_devinit_new },
.fb = { 0x00000001, nv30_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -386,7 +386,7 @@ nv31_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv20_devinit_new },
.fb = { 0x00000001, nv30_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -409,7 +409,7 @@ nv34_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv10_devinit_new },
.fb = { 0x00000001, nv10_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -432,7 +432,7 @@ nv35_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv20_devinit_new },
.fb = { 0x00000001, nv35_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -454,7 +454,7 @@ nv36_chipset = {
.clk = { 0x00000001, nv04_clk_new },
.devinit = { 0x00000001, nv20_devinit_new },
.fb = { 0x00000001, nv36_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
.mc = nv17_mc_new,
@@ -477,7 +477,7 @@ nv40_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv40_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv17_mc_new,
@@ -503,7 +503,7 @@ nv41_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv41_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv17_mc_new,
@@ -529,7 +529,7 @@ nv42_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv41_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv17_mc_new,
@@ -555,7 +555,7 @@ nv43_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv41_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv17_mc_new,
@@ -581,7 +581,7 @@ nv44_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv44_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv44_mc_new,
@@ -607,7 +607,7 @@ nv45_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv40_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv17_mc_new,
@@ -633,7 +633,7 @@ nv46_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv46_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv44_mc_new,
@@ -659,7 +659,7 @@ nv47_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv47_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv17_mc_new,
@@ -685,7 +685,7 @@ nv49_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv49_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv17_mc_new,
@@ -711,7 +711,7 @@ nv4a_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv44_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv44_mc_new,
@@ -737,7 +737,7 @@ nv4b_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv49_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv17_mc_new,
@@ -763,7 +763,7 @@ nv4c_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv46_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv44_mc_new,
@@ -789,7 +789,7 @@ nv4e_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv4e_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv4e_i2c_new,
.imem = nv40_instmem_new,
.mc = nv44_mc_new,
@@ -817,7 +817,7 @@ nv50_chipset = {
.devinit = { 0x00000001, nv50_devinit_new },
.fb = { 0x00000001, nv50_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = nv50_gpio_new,
+ .gpio = { 0x00000001, nv50_gpio_new },
.i2c = nv50_i2c_new,
.imem = nv50_instmem_new,
.mc = nv50_mc_new,
@@ -844,7 +844,7 @@ nv63_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv46_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv44_mc_new,
@@ -870,7 +870,7 @@ nv67_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv46_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv44_mc_new,
@@ -896,7 +896,7 @@ nv68_chipset = {
.clk = { 0x00000001, nv40_clk_new },
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = { 0x00000001, nv46_fb_new },
- .gpio = nv10_gpio_new,
+ .gpio = { 0x00000001, nv10_gpio_new },
.i2c = nv04_i2c_new,
.imem = nv40_instmem_new,
.mc = nv44_mc_new,
@@ -924,7 +924,7 @@ nv84_chipset = {
.devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = nv50_gpio_new,
+ .gpio = { 0x00000001, nv50_gpio_new },
.i2c = nv50_i2c_new,
.imem = nv50_instmem_new,
.mc = g84_mc_new,
@@ -956,7 +956,7 @@ nv86_chipset = {
.devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = nv50_gpio_new,
+ .gpio = { 0x00000001, nv50_gpio_new },
.i2c = nv50_i2c_new,
.imem = nv50_instmem_new,
.mc = g84_mc_new,
@@ -988,7 +988,7 @@ nv92_chipset = {
.devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = nv50_gpio_new,
+ .gpio = { 0x00000001, nv50_gpio_new },
.i2c = nv50_i2c_new,
.imem = nv50_instmem_new,
.mc = g84_mc_new,
@@ -1020,7 +1020,7 @@ nv94_chipset = {
.devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.imem = nv50_instmem_new,
.mc = g84_mc_new,
@@ -1052,7 +1052,7 @@ nv96_chipset = {
.devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.imem = nv50_instmem_new,
.mc = g84_mc_new,
@@ -1084,7 +1084,7 @@ nv98_chipset = {
.devinit = { 0x00000001, g98_devinit_new },
.fb = { 0x00000001, g84_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.imem = nv50_instmem_new,
.mc = g98_mc_new,
@@ -1116,7 +1116,7 @@ nva0_chipset = {
.devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = nv50_i2c_new,
.imem = nv50_instmem_new,
.mc = g84_mc_new,
@@ -1148,7 +1148,7 @@ nva3_chipset = {
.devinit = { 0x00000001, gt215_devinit_new },
.fb = { 0x00000001, gt215_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.imem = nv50_instmem_new,
.mc = gt215_mc_new,
@@ -1182,7 +1182,7 @@ nva5_chipset = {
.devinit = { 0x00000001, gt215_devinit_new },
.fb = { 0x00000001, gt215_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.imem = nv50_instmem_new,
.mc = gt215_mc_new,
@@ -1215,7 +1215,7 @@ nva8_chipset = {
.devinit = { 0x00000001, gt215_devinit_new },
.fb = { 0x00000001, gt215_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.imem = nv50_instmem_new,
.mc = gt215_mc_new,
@@ -1248,7 +1248,7 @@ nvaa_chipset = {
.devinit = { 0x00000001, g98_devinit_new },
.fb = { 0x00000001, mcp77_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.imem = nv50_instmem_new,
.mc = g98_mc_new,
@@ -1280,7 +1280,7 @@ nvac_chipset = {
.devinit = { 0x00000001, g98_devinit_new },
.fb = { 0x00000001, mcp77_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.imem = nv50_instmem_new,
.mc = g98_mc_new,
@@ -1312,7 +1312,7 @@ nvaf_chipset = {
.devinit = { 0x00000001, mcp89_devinit_new },
.fb = { 0x00000001, mcp89_fb_new },
.fuse = { 0x00000001, nv50_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.imem = nv50_instmem_new,
.mc = gt215_mc_new,
@@ -1345,7 +1345,7 @@ nvc0_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.ibus = gf100_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1382,7 +1382,7 @@ nvc1_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf108_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.ibus = gf100_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1418,7 +1418,7 @@ nvc3_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.ibus = gf100_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1454,7 +1454,7 @@ nvc4_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.ibus = gf100_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1491,7 +1491,7 @@ nvc8_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.ibus = gf100_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1528,7 +1528,7 @@ nvce_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.ibus = gf100_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1565,7 +1565,7 @@ nvcf_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = g94_gpio_new,
+ .gpio = { 0x00000001, g94_gpio_new },
.i2c = g94_i2c_new,
.ibus = gf100_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1601,7 +1601,7 @@ nvd7_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = gf119_gpio_new,
+ .gpio = { 0x00000001, gf119_gpio_new },
.i2c = gf117_i2c_new,
.ibus = gf117_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1636,7 +1636,7 @@ nvd9_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = gf119_gpio_new,
+ .gpio = { 0x00000001, gf119_gpio_new },
.i2c = gf119_i2c_new,
.ibus = gf117_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1672,7 +1672,7 @@ nve4_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk104_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gk104_i2c_new,
.ibus = gk104_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1711,7 +1711,7 @@ nve6_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk104_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gk104_i2c_new,
.ibus = gk104_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1750,7 +1750,7 @@ nve7_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk104_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gk104_i2c_new,
.ibus = gk104_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1814,7 +1814,7 @@ nvf0_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk110_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gk110_i2c_new,
.ibus = gk104_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1852,7 +1852,7 @@ nvf1_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk110_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gk110_i2c_new,
.ibus = gk104_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1890,7 +1890,7 @@ nv106_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk110_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gk110_i2c_new,
.ibus = gk104_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1928,7 +1928,7 @@ nv108_chipset = {
.devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk110_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gk110_i2c_new,
.ibus = gk104_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -1966,7 +1966,7 @@ nv117_chipset = {
.devinit = { 0x00000001, gm107_devinit_new },
.fb = { 0x00000001, gm107_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gk110_i2c_new,
.ibus = gk104_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -2002,7 +2002,7 @@ nv118_chipset = {
.devinit = { 0x00000001, gm107_devinit_new },
.fb = { 0x00000001, gm107_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gk110_i2c_new,
.ibus = gk104_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -2036,7 +2036,7 @@ nv120_chipset = {
.devinit = { 0x00000001, gm200_devinit_new },
.fb = { 0x00000001, gm200_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -2074,7 +2074,7 @@ nv124_chipset = {
.devinit = { 0x00000001, gm200_devinit_new },
.fb = { 0x00000001, gm200_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -2112,7 +2112,7 @@ nv126_chipset = {
.devinit = { 0x00000001, gm200_devinit_new },
.fb = { 0x00000001, gm200_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.iccsense = gf100_iccsense_new,
@@ -2175,7 +2175,7 @@ nv130_chipset = {
.fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp100_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.imem = nv50_instmem_new,
@@ -2215,7 +2215,7 @@ nv132_chipset = {
.fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.imem = nv50_instmem_new,
@@ -2253,7 +2253,7 @@ nv134_chipset = {
.fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.imem = nv50_instmem_new,
@@ -2291,7 +2291,7 @@ nv136_chipset = {
.fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.imem = nv50_instmem_new,
@@ -2328,7 +2328,7 @@ nv137_chipset = {
.fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.imem = nv50_instmem_new,
@@ -2366,7 +2366,7 @@ nv138_chipset = {
.fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.imem = nv50_instmem_new,
@@ -2426,7 +2426,7 @@ nv140_chipset = {
.fault = { 0x00000001, gv100_fault_new },
.fb = { 0x00000001, gv100_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.gsp = gv100_gsp_new,
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
@@ -2470,7 +2470,7 @@ nv162_chipset = {
.fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.gsp = gv100_gsp_new,
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
@@ -2508,7 +2508,7 @@ nv164_chipset = {
.fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.gsp = gv100_gsp_new,
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
@@ -2547,7 +2547,7 @@ nv166_chipset = {
.fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.gsp = gv100_gsp_new,
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
@@ -2587,7 +2587,7 @@ nv167_chipset = {
.fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.gsp = gv100_gsp_new,
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
@@ -2625,7 +2625,7 @@ nv168_chipset = {
.fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.gsp = gv100_gsp_new,
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
@@ -2659,7 +2659,7 @@ nv170_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.devinit = { 0x00000001, ga100_devinit_new },
.fb = { 0x00000001, ga100_fb_new },
- .gpio = gk104_gpio_new,
+ .gpio = { 0x00000001, gk104_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.imem = nv50_instmem_new,
@@ -2676,7 +2676,7 @@ nv172_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.devinit = { 0x00000001, ga100_devinit_new },
.fb = { 0x00000001, ga102_fb_new },
- .gpio = ga102_gpio_new,
+ .gpio = { 0x00000001, ga102_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.imem = nv50_instmem_new,
@@ -2695,7 +2695,7 @@ nv174_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.devinit = { 0x00000001, ga100_devinit_new },
.fb = { 0x00000001, ga102_fb_new },
- .gpio = ga102_gpio_new,
+ .gpio = { 0x00000001, ga102_gpio_new },
.i2c = gm200_i2c_new,
.ibus = gm200_ibus_new,
.imem = nv50_instmem_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_GPIO , gpio);
_(NVKM_SUBDEV_GSP , gsp);
_(NVKM_SUBDEV_I2C , i2c);
_(NVKM_SUBDEV_IBUS , ibus);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
index 914276410ef8..048bcc70c3f4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
@@ -241,14 +241,14 @@ nvkm_gpio = {
int
nvkm_gpio_new_(const struct nvkm_gpio_func *func, struct nvkm_device *device,
- int index, struct nvkm_gpio **pgpio)
+ enum nvkm_subdev_type type, int inst, struct nvkm_gpio **pgpio)
{
struct nvkm_gpio *gpio;
if (!(gpio = *pgpio = kzalloc(sizeof(*gpio), GFP_KERNEL)))
return -ENOMEM;
- nvkm_subdev_ctor(&nvkm_gpio, device, index, &gpio->subdev);
+ nvkm_subdev_ctor(&nvkm_gpio, device, type, inst, &gpio->subdev);
gpio->func = func;
return nvkm_event_init(&nvkm_gpio_intr_func, 2, func->lines,
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/g94.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/g94.c
index 6dcda55fb865..114728ccdf8e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/g94.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/g94.c
@@ -68,7 +68,8 @@ g94_gpio = {
};
int
-g94_gpio_new(struct nvkm_device *device, int index, struct nvkm_gpio **pgpio)
+g94_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+ struct nvkm_gpio **pgpio)
{
- return nvkm_gpio_new_(&g94_gpio, device, index, pgpio);
+ return nvkm_gpio_new_(&g94_gpio, device, type, inst, pgpio);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/ga102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/ga102.c
index 62c791baf400..4a96f926b66d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/ga102.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/ga102.c
@@ -112,7 +112,8 @@ ga102_gpio = {
};
int
-ga102_gpio_new(struct nvkm_device *device, int index, struct nvkm_gpio **pgpio)
+ga102_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+ struct nvkm_gpio **pgpio)
{
- return nvkm_gpio_new_(&ga102_gpio, device, index, pgpio);
+ return nvkm_gpio_new_(&ga102_gpio, device, type, inst, pgpio);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gf119.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gf119.c
index bb7400dfaef8..ecb19e4f5c48 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gf119.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gf119.c
@@ -80,7 +80,8 @@ gf119_gpio = {
};
int
-gf119_gpio_new(struct nvkm_device *device, int index, struct nvkm_gpio **pgpio)
+gf119_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+ struct nvkm_gpio **pgpio)
{
- return nvkm_gpio_new_(&gf119_gpio, device, index, pgpio);
+ return nvkm_gpio_new_(&gf119_gpio, device, type, inst, pgpio);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c
index 2ead515b8530..c0e4cdb45520 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c
@@ -68,7 +68,8 @@ gk104_gpio = {
};
int
-gk104_gpio_new(struct nvkm_device *device, int index, struct nvkm_gpio **pgpio)
+gk104_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+ struct nvkm_gpio **pgpio)
{
- return nvkm_gpio_new_(&gk104_gpio, device, index, pgpio);
+ return nvkm_gpio_new_(&gk104_gpio, device, type, inst, pgpio);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv10.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv10.c
index ae3499b48330..48ad29b5638f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv10.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv10.c
@@ -112,7 +112,8 @@ nv10_gpio = {
};
int
-nv10_gpio_new(struct nvkm_device *device, int index, struct nvkm_gpio **pgpio)
+nv10_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+ struct nvkm_gpio **pgpio)
{
- return nvkm_gpio_new_(&nv10_gpio, device, index, pgpio);
+ return nvkm_gpio_new_(&nv10_gpio, device, type, inst, pgpio);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv50.c
index 73923fd5f7f2..b86c49762f11 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/nv50.c
@@ -126,7 +126,8 @@ nv50_gpio = {
};
int
-nv50_gpio_new(struct nvkm_device *device, int index, struct nvkm_gpio **pgpio)
+nv50_gpio_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+ struct nvkm_gpio **pgpio)
{
- return nvkm_gpio_new_(&nv50_gpio, device, index, pgpio);
+ return nvkm_gpio_new_(&nv50_gpio, device, type, inst, pgpio);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/priv.h
index 59e39affe2a0..6590d81164e7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/priv.h
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/priv.h
@@ -28,8 +28,8 @@ struct nvkm_gpio_func {
void (*reset)(struct nvkm_gpio *, u8);
};
-int nvkm_gpio_new_(const struct nvkm_gpio_func *, struct nvkm_device *,
- int index, struct nvkm_gpio **);
+int nvkm_gpio_new_(const struct nvkm_gpio_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
+ struct nvkm_gpio **);
void nv50_gpio_reset(struct nvkm_gpio *, u8);
int nv50_gpio_drive(struct nvkm_gpio *, int, int, int);