From: Zheng Yang Date: Tue, 11 Jul 2017 08:28:19 +0000 (+0800) Subject: drm: bridge: dw-hdmi: delete phy ops read/write X-Git-Tag: release-20171130_firefly~4^2~233 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=70b06ed6f5b095c8fa9522ed43dc9f394bc76028;p=firefly-linux-kernel-4.4.55.git drm: bridge: dw-hdmi: delete phy ops read/write 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 --- diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c index 731460097b86..922587e990b3 100644 --- a/drivers/gpu/drm/bridge/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/dw-hdmi.c @@ -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, diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index d5c8d2be0311..770427b0df7b 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -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 {