]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/aty/radeon_i2c.c
radeonfb: give i2c buses nicer names
[linux-2.6-omap-h63xx.git] / drivers / video / aty / radeon_i2c.c
index 5084799207056941f1fc3a6c03aa6529801a2460..8c8fa35f1b7c2b13cd6a35341abddcf7ca42d9f5 100644 (file)
@@ -1,7 +1,8 @@
+#include "radeonfb.h"
+
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
-#include <linux/pci.h>
 #include <linux/fb.h>
 
 
@@ -12,7 +13,6 @@
 #include <asm/io.h>
 
 #include <video/radeon.h>
-#include "radeonfb.h"
 #include "../edid.h"
 
 static void radeon_gpio_setscl(void* data, int state)
@@ -69,7 +69,8 @@ static int radeon_setup_i2c_bus(struct radeon_i2c_chan *chan, const char *name)
 {
        int rc;
 
-       strcpy(chan->adapter.name, name);
+       snprintf(chan->adapter.name, sizeof(chan->adapter.name),
+                "radeonfb %s", name);
        chan->adapter.owner             = THIS_MODULE;
        chan->adapter.id                = I2C_HW_B_RADEON;
        chan->adapter.algo_data         = &chan->algo;
@@ -78,7 +79,7 @@ static int radeon_setup_i2c_bus(struct radeon_i2c_chan *chan, const char *name)
        chan->algo.setscl               = radeon_gpio_setscl;
        chan->algo.getsda               = radeon_gpio_getsda;
        chan->algo.getscl               = radeon_gpio_getscl;
-       chan->algo.udelay               = 40;
+       chan->algo.udelay               = 10;
        chan->algo.timeout              = 20;
        chan->algo.data                 = chan; 
        
@@ -149,21 +150,21 @@ int radeon_probe_i2c_connector(struct radeonfb_info *rinfo, int conn,
        if (out_edid)
                *out_edid = edid;
        if (!edid) {
-               RTRACE("radeonfb: I2C (port %d) ... not found\n", conn);
+               pr_debug("radeonfb: I2C (port %d) ... not found\n", conn);
                return MT_NONE;
        }
        if (edid[0x14] & 0x80) {
                /* Fix detection using BIOS tables */
                if (rinfo->is_mobility /*&& conn == ddc_dvi*/ &&
                    (INREG(LVDS_GEN_CNTL) & LVDS_ON)) {
-                       RTRACE("radeonfb: I2C (port %d) ... found LVDS panel\n", conn);
+                       pr_debug("radeonfb: I2C (port %d) ... found LVDS panel\n", conn);
                        return MT_LCD;
                } else {
-                       RTRACE("radeonfb: I2C (port %d) ... found TMDS panel\n", conn);
+                       pr_debug("radeonfb: I2C (port %d) ... found TMDS panel\n", conn);
                        return MT_DFP;
                }
        }
-               RTRACE("radeonfb: I2C (port %d) ... found CRT display\n", conn);
+       pr_debug("radeonfb: I2C (port %d) ... found CRT display\n", conn);
        return MT_CRT;
 }