Commit da279eb9 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/dp: Implement I2C_M_STOP for i2c-over-aux

Consult the I2C_M_STOP flag to determine whether to set the MOT bit or
not. Makes it possible to send multiple messages in one go with
stop+start generated between the messages (as opposed nothing or
repstart depending on whether thr address/rw changed).

Not sure anyone has actual use for this but figured I'd handle it
since I started to look at that flag for MST remote i2c xfers.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180928180403.22499-3-ville.syrjala@linux.intel.comReviewed-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
parent b6467446
...@@ -887,6 +887,7 @@ static void drm_dp_i2c_msg_set_request(struct drm_dp_aux_msg *msg, ...@@ -887,6 +887,7 @@ static void drm_dp_i2c_msg_set_request(struct drm_dp_aux_msg *msg,
{ {
msg->request = (i2c_msg->flags & I2C_M_RD) ? msg->request = (i2c_msg->flags & I2C_M_RD) ?
DP_AUX_I2C_READ : DP_AUX_I2C_WRITE; DP_AUX_I2C_READ : DP_AUX_I2C_WRITE;
if (!(i2c_msg->flags & I2C_M_STOP))
msg->request |= DP_AUX_I2C_MOT; msg->request |= DP_AUX_I2C_MOT;
} }
......
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