Commit bfb6e014 authored by Tomi Valkeinen's avatar Tomi Valkeinen Committed by Andrzej Hajda

drm/bridge: tc358767: fix tc_aux_get_status error handling

tc_aux_get_status() does not report AUX_TIMEOUT correctly, as it only
checks the AUX_TIMEOUT if aux is still busy. Fix this by always checking
for AUX_TIMEOUT.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-2-tomi.valkeinen@ti.com
parent c25b84c0
......@@ -286,13 +286,16 @@ static int tc_aux_get_status(struct tc_data *tc, u8 *reply)
ret = regmap_read(tc->regmap, DP0_AUXSTATUS, &value);
if (ret < 0)
return ret;
if (value & AUX_BUSY) {
dev_err(tc->dev, "aux busy!\n");
return -EBUSY;
}
if (value & AUX_TIMEOUT) {
dev_err(tc->dev, "i2c access timeout!\n");
dev_err(tc->dev, "aux access timeout!\n");
return -ETIMEDOUT;
}
return -EBUSY;
}
*reply = (value & AUX_STATUS_MASK) >> AUX_STATUS_SHIFT;
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment