aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:09 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:15 +1000
commit6f2274991043a3db2ab84b5d9462a085d38f1fb1 (patch)
treea63bbb4ebd844d8d80fecac7ce90926dbe46b35d /drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c
parentdrm/nouveau/gpio: switch to device pri macros (diff)
downloadlinux-dev-6f2274991043a3db2ab84b5d9462a085d38f1fb1.tar.xz
linux-dev-6f2274991043a3db2ab84b5d9462a085d38f1fb1.zip
drm/nouveau/i2c: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
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