diff options
author | Leilk.Liu <leilk.liu@mediatek.com> | 2025-09-06 16:24:06 +0800 |
---|---|---|
committer | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2025-09-25 23:14:59 +0200 |
commit | b492183652808e0f389272bf63dc836241b287ff (patch) | |
tree | 15b5333c4c555a54c2c26bc3d70f56ab8a5d6e31 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 1a2b423be6a89dd07d5fc27ea042be68697a6a49 (diff) |
i2c: mediatek: fix potential incorrect use of I2C_MASTER_WRRD
The old IC does not support the I2C_MASTER_WRRD (write-then-read)
function, but the current code’s handling of i2c->auto_restart may
potentially lead to entering the I2C_MASTER_WRRD software flow,
resulting in unexpected bugs.
Instead of repurposing the auto_restart flag, add a separate flag
to signal I2C_MASTER_WRRD operations.
Also fix handling of msgs. If the operation (i2c->op) is
I2C_MASTER_WRRD, then the msgs pointer is incremented by 2.
For all other operations, msgs is simply incremented by 1.
Fixes: b2ed11e224a2 ("I2C: mediatek: Add driver for MediaTek MT8173 I2C controller")
Signed-off-by: Leilk.Liu <leilk.liu@mediatek.com>
Suggested-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions