These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / gpu / drm / nouveau / dispnv04 / tvnv04.c
index 70e95cf..5345eb5 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <drm/i2c/ch7006.h>
 
-static struct nvkm_i2c_board_info nv04_tv_encoder_info[] = {
+static struct nvkm_i2c_bus_probe nv04_tv_encoder_info[] = {
        {
                {
                        I2C_BOARD_INFO("ch7006", 0x75),
@@ -55,9 +55,13 @@ int nv04_tv_identify(struct drm_device *dev, int i2c_index)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
-
-       return i2c->identify(i2c, i2c_index, "TV encoder",
-                            nv04_tv_encoder_info, NULL, NULL);
+       struct nvkm_i2c_bus *bus = nvkm_i2c_bus_find(i2c, i2c_index);
+       if (bus) {
+               return nvkm_i2c_bus_probe(bus, "TV encoder",
+                                         nv04_tv_encoder_info,
+                                         NULL, NULL);
+       }
+       return -ENODEV;
 }
 
 
@@ -205,7 +209,7 @@ nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry)
        struct drm_device *dev = connector->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
-       struct nvkm_i2c_port *port = i2c->find(i2c, entry->i2c_index);
+       struct nvkm_i2c_bus *bus = nvkm_i2c_bus_find(i2c, entry->i2c_index);
        int type, ret;
 
        /* Ensure that we can talk to this encoder */
@@ -231,7 +235,7 @@ nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry)
 
        /* Run the slave-specific initialization */
        ret = drm_i2c_encoder_init(dev, to_encoder_slave(encoder),
-                                  &port->adapter,
+                                  &bus->i2c,
                                   &nv04_tv_encoder_info[type].dev);
        if (ret < 0)
                goto fail_cleanup;