Commit Graph

4 Commits

Author SHA1 Message Date
Even Xu
a788b20570 HID: Intel-thc-hid: Intel-quicki2c: Add output report support
Add support for HID output reports in the intel-quicki2c driver by
implementing the output_report callback in the HID low-level driver
interface.

This enables proper communication with HID devices that require
output report functionality, such as setting device configuration or
updating device firmware.

Tested-by: Rui Zhang <rui1.zhang@intel.com>
Signed-off-by: Even Xu <even.xu@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-01-07 22:03:47 +01:00
Even Xu
dabc153c79 HID: Intel-thc-hid: Intel-quicki2c: Use size_t for all length variables
Convert all length-related variables in the QuickI2C protocol layer to use
size_t type to follow kernel coding conventions.

This includes:
- All buffer length parameters and variables
- Return values of quicki2c_encode_cmd() function which represents
  encoded command buffer size.
- Return values of quicki2c_init_write_buf() function which represents
  process result: either prepared output buffer size or error code.

This change improves type consistency and aligns with standard kernel
practices for memory size representation, reducing potential issues
with size calculations and comparisons.

Signed-off-by: Even Xu <even.xu@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-01-07 22:03:47 +01:00
Even Xu
66b59bfce6 HID: intel-thc-hid: intel-quicki2c: Complete THC QuickI2C driver
Fully implement QuickI2C driver probe/remove callbacks, interrupt
handler, integrate HIDI2C protocol, enumerate HID device and register
HID device.

Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com>
Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com>
Signed-off-by: Even Xu <even.xu@intel.com>
Tested-by: Rui Zhang <rui1.zhang@intel.com>
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2025-01-09 10:14:16 +01:00
Even Xu
6fc761385b HID: intel-thc-hid: intel-quicki2c: Add HIDI2C protocol implementation
Intel QuickI2C driver uses THC hardware to accelerate HID over I2C
(HIDI2C) protocol flow.

This patch implements all data flows described in HID over I2C protocol
SPEC by using THC hardware layer APIs.

HID over I2C SPEC:
https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn642101(v=vs.85)

Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com>
Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com>
Signed-off-by: Even Xu <even.xu@intel.com>
Tested-by: Rui Zhang <rui1.zhang@intel.com>
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2025-01-09 10:14:16 +01:00