summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c
index ba3116f686fa..24edcdbca3de 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c
@@ -34,32 +34,36 @@ static void
nv4e_i2c_drive_scl(struct nvkm_i2c_port *base, int state)
{
struct nvkm_i2c *i2c = (void *)nvkm_i2c(base);
+ struct nvkm_device *device = i2c->subdev.device;
struct nv4e_i2c_port *port = (void *)base;
- nv_mask(i2c, port->addr, 0x2f, state ? 0x21 : 0x01);
+ nvkm_mask(device, port->addr, 0x2f, state ? 0x21 : 0x01);
}
static void
nv4e_i2c_drive_sda(struct nvkm_i2c_port *base, int state)
{
struct nvkm_i2c *i2c = (void *)nvkm_i2c(base);
+ struct nvkm_device *device = i2c->subdev.device;
struct nv4e_i2c_port *port = (void *)base;
- nv_mask(i2c, port->addr, 0x1f, state ? 0x11 : 0x01);
+ nvkm_mask(device, port->addr, 0x1f, state ? 0x11 : 0x01);
}
static int
nv4e_i2c_sense_scl(struct nvkm_i2c_port *base)
{
struct nvkm_i2c *i2c = (void *)nvkm_i2c(base);
+ struct nvkm_device *device = i2c->subdev.device;
struct nv4e_i2c_port *port = (void *)base;
- return !!(nv_rd32(i2c, port->addr) & 0x00040000);
+ return !!(nvkm_rd32(device, port->addr) & 0x00040000);
}
static int
nv4e_i2c_sense_sda(struct nvkm_i2c_port *base)
{
struct nvkm_i2c *i2c = (void *)nvkm_i2c(base);
+ struct nvkm_device *device = i2c->subdev.device;
struct nv4e_i2c_port *port = (void *)base;
- return !!(nv_rd32(i2c, port->addr) & 0x00080000);
+ return !!(nvkm_rd32(device, port->addr) & 0x00080000);
}
static const struct nvkm_i2c_func