~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/gpu/drm/radeon/radeon_i2c.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
888
888
 
889
889
        i2c->rec = *rec;
890
890
        i2c->adapter.owner = THIS_MODULE;
 
891
        i2c->adapter.class = I2C_CLASS_DDC;
891
892
        i2c->dev = dev;
892
893
        i2c_set_adapdata(&i2c->adapter, i2c);
893
894
        if (rec->mm_i2c ||
947
948
 
948
949
        i2c->rec = *rec;
949
950
        i2c->adapter.owner = THIS_MODULE;
 
951
        i2c->adapter.class = I2C_CLASS_DDC;
950
952
        i2c->dev = dev;
951
953
        snprintf(i2c->adapter.name, sizeof(i2c->adapter.name),
952
954
                 "Radeon aux bus %s", name);
1062
1064
                *val = in_buf[0];
1063
1065
                DRM_DEBUG("val = 0x%02x\n", *val);
1064
1066
        } else {
1065
 
                DRM_ERROR("i2c 0x%02x 0x%02x read failed\n",
 
1067
                DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n",
1066
1068
                          addr, *val);
1067
1069
        }
1068
1070
}
1084
1086
        out_buf[1] = val;
1085
1087
 
1086
1088
        if (i2c_transfer(&i2c_bus->adapter, &msg, 1) != 1)
1087
 
                DRM_ERROR("i2c 0x%02x 0x%02x write failed\n",
 
1089
                DRM_DEBUG("i2c 0x%02x 0x%02x write failed\n",
1088
1090
                          addr, val);
1089
1091
}
1090
1092
 
1096
1098
        if (!radeon_connector->router.ddc_valid)
1097
1099
                return;
1098
1100
 
 
1101
        if (!radeon_connector->router_bus)
 
1102
                return;
 
1103
 
1099
1104
        radeon_i2c_get_byte(radeon_connector->router_bus,
1100
1105
                            radeon_connector->router.i2c_addr,
1101
1106
                            0x3, &val);
1121
1126
        if (!radeon_connector->router.cd_valid)
1122
1127
                return;
1123
1128
 
 
1129
        if (!radeon_connector->router_bus)
 
1130
                return;
 
1131
 
1124
1132
        radeon_i2c_get_byte(radeon_connector->router_bus,
1125
1133
                            radeon_connector->router.i2c_addr,
1126
1134
                            0x3, &val);