drm: bridge: dw-hdmi: delete phy ops read/write
authorZheng Yang <zhengyang@rock-chips.com>
Tue, 11 Jul 2017 08:28:19 +0000 (16:28 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 12 Jul 2017 11:20:06 +0000 (19:20 +0800)
RK3328/RK3228 phy registers are mapped by inno-hdmi-phy driver,
there is no need to register hdmi phy debugfs on RK3328/RK3228.

Change-Id: I1e259b75ee7af6f29dffd5526d67776d5c6853ae
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
drivers/gpu/drm/bridge/dw-hdmi.c
include/drm/bridge/dw_hdmi.h

index 731460097b86e5158c33a004e2f1eafda297306b..922587e990b3b04e0721340db0c90a8e562a3ca2 100644 (file)
@@ -2703,21 +2703,11 @@ static const struct file_operations dw_hdmi_ctrl_fops = {
 static int dw_hdmi_phy_show(struct seq_file *s, void *v)
 {
        struct dw_hdmi *hdmi = s->private;
-       u32 i, total, val;
-
-       if (hdmi->dev_type == RK3228_HDMI)
-               return 0;
+       u32 i, val;
 
        seq_puts(s, "\n>>>hdmi_phy reg\n");
-       if (hdmi->dev_type != RK3328_HDMI)
-               total = 0x28;
-       else
-               total = 0x100;
-       for (i = 0; i < total; i++) {
-               if (hdmi->dev_type != RK3328_HDMI)
-                       val = hdmi_phy_i2c_read(hdmi, i);
-               else
-                       val = hdmi->phy.ops->read(hdmi, hdmi->phy.data, i);
+       for (i = 0; i < 0x28; i++) {
+               val = hdmi_phy_i2c_read(hdmi, i);
                seq_printf(s, "regs %02x val %04x\n", i, val);
        }
        return 0;
@@ -2747,10 +2737,7 @@ dw_hdmi_phy_write(struct file *file, const char __user *buf,
        }
        dev_info(hdmi->dev, "/*******hdmi phy register config******/");
        dev_info(hdmi->dev, "\n reg=%x val=%x\n", reg, val);
-       if (hdmi->dev_type != RK3328_HDMI)
-               dw_hdmi_phy_i2c_write(hdmi, val, reg);
-       else
-               hdmi->phy.ops->write(hdmi, hdmi->phy.data, val, reg);
+       dw_hdmi_phy_i2c_write(hdmi, val, reg);
        return count;
 }
 
@@ -2772,8 +2759,11 @@ static void dw_hdmi_register_debugfs(struct device *dev, struct dw_hdmi *hdmi)
        }
        debugfs_create_file("ctrl", 0400, hdmi->debugfs_dir,
                            hdmi, &dw_hdmi_ctrl_fops);
-       debugfs_create_file("phy", 0400, hdmi->debugfs_dir,
-                           hdmi, &dw_hdmi_phy_fops);
+
+       if (hdmi->dev_type != RK3228_HDMI &&
+           hdmi->dev_type != RK3328_HDMI)
+               debugfs_create_file("phy", 0400, hdmi->debugfs_dir,
+                                   hdmi, &dw_hdmi_phy_fops);
 }
 
 static void dw_hdmi_register_hdcp(struct device *dev, struct dw_hdmi *hdmi,
index d5c8d2be03115ddfe078b7d1e309533df47f7486..770427b0df7bff011f7a65ac6b8e8c74c577beed 100644 (file)
@@ -134,8 +134,6 @@ struct dw_hdmi_phy_ops {
                    struct drm_display_mode *mode);
        void (*disable)(struct dw_hdmi *hdmi, void *data);
        enum drm_connector_status (*read_hpd)(struct dw_hdmi *hdmi, void *data);
-       int (*read)(struct dw_hdmi *hdmi, void *data, int offset);
-       void (*write)(struct dw_hdmi *hdmi, void *data, int val, int offset);
 };
 
 struct dw_hdmi_plat_data {