drm/rockchip: dw-hdmi: Fix hdmi i2c scl configuration error
If ddc-i2c-scl-high-time-ns and ddc-i2c-scl-low-time-ns are not set in dts, scl_high_ns and scl_low_ns will set to -1. Because of these variables are unsigned int, misjudgment may occur when their values are judged. Change-Id: I8b94f7c2ab8bcb0d966182f220877f9268b7981b Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
parent
84a1bd9cfb
commit
19c2faf2ce
|
|
@ -2325,15 +2325,10 @@ int rockchip_dw_hdmi_init(struct display_state *state)
|
|||
*/
|
||||
hdmi->i2c->scl_high_ns =
|
||||
ofnode_read_s32_default(hdmi_node,
|
||||
"ddc-i2c-scl-high-time-ns", -1);
|
||||
if (hdmi->i2c->scl_high_ns < 0)
|
||||
hdmi->i2c->scl_high_ns = 4708;
|
||||
|
||||
"ddc-i2c-scl-high-time-ns", 4708);
|
||||
hdmi->i2c->scl_low_ns =
|
||||
ofnode_read_s32_default(hdmi_node,
|
||||
"ddc-i2c-scl-low-time-ns", -1);
|
||||
if (hdmi->i2c->scl_low_ns < 0)
|
||||
hdmi->i2c->scl_low_ns = 4916;
|
||||
"ddc-i2c-scl-low-time-ns", 4916);
|
||||
|
||||
dw_hdmi_i2c_init(hdmi);
|
||||
conn_state->type = DRM_MODE_CONNECTOR_HDMIA;
|
||||
|
|
|
|||
Loading…
Reference in New Issue