Commit 45e92a09 authored by Even Xu's avatar Even Xu Committed by Jiri Kosina
Browse files

HID: Intel-thc-hid: Intel-thc: Introduce max input size control



This patch adds support for a new feature, named "Max Input Size
Control", allowing driver to set a maximum input size for RxDMA. This
enhancement aims to prevent RxDMA buffer overruns caused by data
corruption on the I2C bus, thereby improving overall system stability.

APIs added:
- thc_i2c_set_rx_max_size(): Set the maximum input size for I2C RxDMA.
- thc_i2c_rx_max_size_enable(): Enable or disable the max input size
  control.

As this max input size control feature is only applicable to RxDMA
and must remain disabled during SWDMA operations, it also involves
a change in SWDMA code to record the max input size control feature
state before SWDMA and restore the state after SWDMA.

Signed-off-by: default avatarEven Xu <even.xu@intel.com>
Tested-by: default avatarChong Han <chong.han@intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 13dd6094
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment