Add two new features for QuickI2C
Subsystems (3)
Even Xu
maintainercover Add two new features for QuickI2C
In order to improve THC compatibility with lagacy HIDI2C touch device, on Panther lake (PTL) platform, THC hardware introduces two new features for I2C subsystem:
- Input max input size control
- Input interrupt delay
This patch set adds APIs for above two features' setting and enabling in THC hardware layer driver, and enable them in QuickI2C driver.
Even Xu (7):
HID: Intel-thc-hid: Intel-thc: Add thc_dma_content into kernel doc
HID: Intel-thc-hid: Intel-thc: Refine code comments
HID: Intel-thc-hid: Intel-thc: Introduce max input size control
HID: Intel-thc-hid: Intel-thc: Introduce interrupt delay control
HID: Intel-thc-hid: Intel-quicki2c: Refine code comments
HID: Intel-thc-hid: Intel-quicki2c: Add driver data support
HID: Intel-thc-hid: Intel-quicki2c: Add two new features to PTL
Documentation/hid/intel-thc-hid.rst | 27 +++ .../intel-quicki2c/pci-quicki2c.c | 204 +++++++++++------- .../intel-quicki2c/quicki2c-dev.h | 55 +++-- .../intel-thc-hid/intel-thc/intel-thc-dev.c | 140 ++++++++++++ .../intel-thc-hid/intel-thc/intel-thc-dev.h | 29 ++- .../intel-thc-hid/intel-thc/intel-thc-dma.c | 40 ++++ .../intel-thc-hid/intel-thc/intel-thc-dma.h | 38 ++-- .../intel-thc-hid/intel-thc/intel-thc-hw.h | 5 + 8 files changed, 417 insertions(+), 121 deletions(-)
Signature · 1 line
2.40.1
Even Xu
maintainerPATCH 1/7 HID: Intel-thc-hid: Intel-thc: Add thc_dma_content into kernel doc
Convert thc_dma_content structure comments format into kernel doc format, let it can be included into kernel doc.
--- drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.h +4 -3
@@ -117,9 +117,10 @@ struct thc_dma_configuration {u32 dma_cntrl; }; -/* -* THC DMA context -* Store all THC Channel configures +/** +* struct thc_dma_context - THC DMA context +* @thc_dma_configuration: Array of all THC Channel configures +* @use_write_interrupts: Indicate TxDMA using interrupt or polling */ struct thc_dma_context {struct thc_dma_configuration dma_config[MAX_THC_DMA_CHANNEL ];
Signature · 1 line
2.40.1
Even Xu
maintainerPATCH 2/7 HID: Intel-thc-hid: Intel-thc: Refine code comments
In reply to Even XuAlign capitalization of the first characters for THC structure definition comments in header files.
--- .../intel-thc-hid/intel-thc/intel-thc-dev.h | 16 ++++++------- .../intel-thc-hid/intel-thc/intel-thc-dma.h | 24 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-)
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.h +8 -8
@@ -52,16 +52,16 @@ enum thc_int_type {* struct thc_device - THC private device struct * @thc_regmap: MMIO regmap structure for accessing THC registers * @mmio_addr: MMIO registers address -* @thc_bus_lock: mutex locker for THC config -* @port_type: port type of THC port instance +* @thc_bus_lock: Mutex locker for THC config +* @port_type: Port type of THC port instance * @pio_int_supported: PIO interrupt supported flag * @dma_ctx: DMA specific data -* @write_complete_wait: signal event for DMA write complete -* @swdma_complete_wait: signal event for SWDMA sequence complete -* @write_done: bool value that indicates if DMA write is done -* @swdma_done: bool value that indicates if SWDMA swquence is done -* @perf_limit: the delay between read operation and write operation -* @i2c_subip_regs: the copy of THC I2C sub-system registers for resuming restore +* @write_complete_wait: Signal event for DMA write complete +* @swdma_complete_wait: Signal event for SWDMA sequence complete +* @write_done: Bool value that indicates if DMA write is done +* @swdma_done: Bool value that indicates if SWDMA sequence is done +* @perf_limit: The delay between read operation and write operation +* @i2c_subip_regs: The copy of THC I2C sub-system registers for resuming restore */ struct thc_device {struct device *dev;
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.h +12 -12
@@ -27,7 +27,7 @@/** * THC DMA channels: -* @THC_RXDMA1: legacy channel, reserved for raw data reading +* @THC_RXDMA1: Legacy channel, reserved for raw data reading * @THC_RXDMA2: DMA to read HID data from touch device * @THC_TXDMA: DMA to write to touch device * @THC_SWDMA: SW triggered DMA to write and read from touch device
@@ -42,11 +42,11 @@ enum thc_dma_channel {/** * THC DMA Physical Memory Descriptor (PRD) -* @dest_addr: bit[53:0], destination address in system memory -* @int_on_completion: bit[63], if set, thc will trigger interrupt to driver -* @len: bit[87:64], length of this entry -* @end_of_prd: bit[88], if set, this entry is last one of current PRD table -* @hw_status: bit[90:89], hw status bits +* @dest_addr: Bit[53:0], destination address in system memory +* @int_on_completion: Bit[63], if set, thc will trigger interrupt to driver +* @len: Bit[87:64], length of this entry +* @end_of_prd: Bit[88], if set, this entry is last one of current PRD table +* @hw_status: Bit[90:89], hardware status bits */ struct thc_prd_entry {u64 dest_addr :54 ;
@@ -88,14 +88,14 @@ struct thc_prd_table {* struct thc_dma_configuration - THC DMA configure * @dma_channel: DMA channel for current DMA configuration * @prd_tbls_dma_handle: DMA buffer handle -* @dir: direction of DMA for this config +* @dir: Direction of DMA for this config * @prd_tbls: PRD tables for current DMA -* @sgls: array of pointers to scatter-gather lists -* @sgls_nent: actual number of entries per sg list -* @prd_tbl_num: actual number of PRD tables -* @max_packet_size: size of the buffer needed for 1 DMA message (1 PRD table) +* @sgls: Array of pointers to scatter-gather lists +* @sgls_nent: Actual number of entries per scatter-gather list +* @prd_tbl_num: Actual number of PRD tables +* @max_packet_size: Size of the buffer needed for 1 DMA message (1 PRD table) * @prd_base_addr_high: High 32bits memory address where stores PRD table -* @prd_base_addr_low: low 32bits memory address where stores PRD table +* @prd_base_addr_low: Low 32bits memory address where stores PRD table * @prd_cntrl: PRD control register value * @dma_cntrl: DMA control register value */
Signature · 1 line
2.40.1
Even Xu
maintainerPATCH 3/7 HID: Intel-thc-hid: Intel-thc: Introduce max input size control
In reply to Even XuThis 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.
--- Documentation/hid/intel-thc-hid.rst | 14 ++++ .../intel-thc-hid/intel-thc/intel-thc-dev.c | 69 +++++++++++++++++++ .../intel-thc-hid/intel-thc/intel-thc-dev.h | 7 ++ .../intel-thc-hid/intel-thc/intel-thc-dma.c | 22 ++++++ .../intel-thc-hid/intel-thc/intel-thc-dma.h | 4 ++ .../intel-thc-hid/intel-thc/intel-thc-hw.h | 3 + 6 files changed, 119 insertions(+)
Documentation/hid/intel-thc-hid.rst +14 -0
@@ -188,6 +188,20 @@ Control register. Reset line is controlled by BIOS (or EFI) through ACPI _RST method, driver needs to call this device ACPI _RST method to reset touch IC during initialization. +2.3 Max input size control +-------------------------- + +This is a new feature introduced in Panther Lake platform, THC hardware allows driver to set +a max input size for RxDMA. After this max size gets set and enabled, for every input report +packet reading, THC hardware sequencer will first read incoming input packet size, then compare +input packet size with the given max size: +- if input packet size <= max size, THC continues using input packet size to finish the reading +- if input packet size > max size, there is potential input data crash risk during + transferring, THC will use max size instead of input packet size for reading + +This feature is used to avoid data corruption which will cause RxDMA buffer overrun issue for +I2C bus, and enhance whole system stability. + 3. High level concept =====================
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c +69 -0
75 lines not on this page · raw message
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.h +7 -0
@@ -62,6 +62,8 @@ enum thc_int_type {* @swdma_done: Bool value that indicates if SWDMA sequence is done * @perf_limit: The delay between read operation and write operation * @i2c_subip_regs: The copy of THC I2C sub-system registers for resuming restore +* @i2c_max_rx_size: I2C Rx transfer max input size +* @i2c_max_rx_size_en: Bool value that indicates I2C max input size control enabled or not */ struct thc_device {struct device *dev;
@@ -81,6 +83,9 @@ struct thc_device {u32 perf_limit;u32 *i2c_subip_regs; + +u32 i2c_max_rx_size; +bool i2c_max_rx_size_en; };struct thc_device *thc_dev_init (struct device *device,void __iomem *mem_addr);
@@ -112,5 +117,7 @@ int thc_i2c_subip_init(struct thc_device *dev, const u32 target_address, const u32 speed, const u32 hcnt, const u32 lcnt);int thc_i2c_subip_regs_save (struct thc_device *dev);int thc_i2c_subip_regs_restore (struct thc_device *dev); +int thc_i2c_set_rx_max_size (struct thc_device *dev,u32 max_rx_size); +int thc_i2c_rx_max_size_enable (struct thc_device *dev,bool enable);#endif /* _INTEL_THC_DEV_H_ */
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c +22 -0
@@ -712,6 +712,19 @@ static int thc_swdma_read_start(struct thc_device *dev, void *write_buff,thc_reset_dma_settings (dev); +/* +* Max input size control feature is only available for RxDMA, it must keep disabled +* during SWDMA operation, and restore to previous state after SWDMA is done. +* Max input size variables in THC device context track hardware state, and keep change +* when feature state was changed, so those variables cannot be used to record feature +* state after state was changed during SWDMA operation. Here have to use a temp variable +* in DMA context to record feature state before SWDMA operation. +*/ +if (dev->i2c_max_rx_size_en) { +thc_i2c_rx_max_size_enable (dev, false); + dev->dma_ctx->rx_max_size_en = true; + } + mask =THC_M_PRT_RPRD_CNTRL_SW_THC_SWDMA_I2C_WBC |THC_M_PRT_RPRD_CNTRL_SW_THC_SWDMA_I2C_RX_DLEN_EN ; val = FIELD_PREP(THC_M_PRT_RPRD_CNTRL_SW_THC_SWDMA_I2C_WBC, write_len) |
@@ -754,6 +767,15 @@ static int thc_swdma_read_completion(struct thc_device *dev)if (ret)return ret; +/* +* Restore max input size control feature to previous state after SWDMA if it was +* enabled before SWDMA, and reset temp rx_max_size_en variable for next time. +*/ +if (dev->dma_ctx->rx_max_size_en) { +thc_i2c_rx_max_size_enable (dev, true); + dev->dma_ctx->rx_max_size_en = false; + } +thc_reset_dma_settings (dev);dma_set_start_bit (dev, &dev->dma_ctx->dma_config[THC_RXDMA2 ]);
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.h +4 -0
@@ -121,10 +121,14 @@ struct thc_dma_configuration {* struct thc_dma_context - THC DMA context * @thc_dma_configuration: Array of all THC Channel configures * @use_write_interrupts: Indicate TxDMA using interrupt or polling +* @rx_max_size_en: Temp flag to indicate THC I2C Rx max input size control feature +* enabled or not, only be used during SWDMA operation. */ struct thc_dma_context {struct thc_dma_configuration dma_config[MAX_THC_DMA_CHANNEL ];u8 use_write_interrupts; + +bool rx_max_size_en; };struct thc_device ;
drivers/hid/intel-thc-hid/intel-thc/intel-thc-hw.h +3 -0
@@ -399,6 +399,9 @@#define THC_M_PRT_SPI_ICRRD_OPCODE_SPI_DIO GENMASK(23, 16)#define THC_M_PRT_SPI_ICRRD_OPCODE_SPI_QIO GENMASK(15, 8) +#define THC_M_PRT_SPI_ICRRD_OPCODE_I2C_MAX_SIZE GENMASK(15, 0) +#define THC_M_PRT_SPI_ICRRD_OPCODE_I2C_MAX_SIZE_EN BIT(31) +#define THC_M_PRT_INT_EN_SIPE BIT(0)#define THC_M_PRT_INT_EN_SBO BIT(1)#define THC_M_PRT_INT_EN_SIDR BIT(2)
Signature · 1 line
2.40.1
Even Xu
maintainerPATCH 4/7 HID: Intel-thc-hid: Intel-thc: Introduce interrupt delay control
In reply to Even XuThis patch adds support for a new feature, named "Interrupt Delay", allowing driver to set a specific delay time for next interrupt detection. It gives driver a capability to control THC waiting time for the next interrupt, to reduce the likelihood of spurious readings.
APIs added:
- thc_i2c_set_rx_int_delay(): Set I2C Rx input interrupt delay value
- thc_i2c_rx_int_delay_enable(): Enable or disable I2C Rx interrupt delay
As this interrupt delay 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.
--- Documentation/hid/intel-thc-hid.rst | 13 ++++ .../intel-thc-hid/intel-thc/intel-thc-dev.c | 71 +++++++++++++++++++ .../intel-thc-hid/intel-thc/intel-thc-dev.h | 6 ++ .../intel-thc-hid/intel-thc/intel-thc-dma.c | 18 +++++ .../intel-thc-hid/intel-thc/intel-thc-dma.h | 3 + .../intel-thc-hid/intel-thc/intel-thc-hw.h | 2 + 6 files changed, 113 insertions(+)
Documentation/hid/intel-thc-hid.rst +13 -0
@@ -202,6 +202,19 @@ input packet size with the given max size: This feature is used to avoid data corruption which will cause RxDMA buffer overrun issue for I2C bus, and enhance whole system stability. +2.4 Interrupt delay +------------------- + +Because of MCU performance limitation, some touch devices cannot de-assert interrupt pin +immediately after input data is transferred, which cause an interrupt toggle delay. But THC +always detects next interrupt immediately after last input interrupt is handled. In this +case, the delayed interrupt de-assertion will be recognized as a new interrupt signal by THC, +and causes THC to start an input report reading spuriously. + +In order to avoid this situation, THC introduced interrupt delay new feature in Panther Lake +platform, where THC allows driver to set an interrupt delay. After this feature is enabled, +THC will delay this given time for next interrupt detection. + 3. High level concept =====================
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c +71 -0
83 lines not on this page · raw message
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.h +6 -0
@@ -63,7 +63,9 @@ enum thc_int_type {* @perf_limit: The delay between read operation and write operation * @i2c_subip_regs: The copy of THC I2C sub-system registers for resuming restore * @i2c_max_rx_size: I2C Rx transfer max input size +* @i2c_int_delay_us: I2C input interrupt delay, unit is us * @i2c_max_rx_size_en: Bool value that indicates I2C max input size control enabled or not +* @i2c_int_delay_en: Bool value that indicates I2C input interrupt delay enabled or not */ struct thc_device {struct device *dev;
@@ -85,7 +87,9 @@ struct thc_device {u32 *i2c_subip_regs;u32 i2c_max_rx_size; +u32 i2c_int_delay_us;bool i2c_max_rx_size_en; +bool i2c_int_delay_en; };struct thc_device *thc_dev_init (struct device *device,void __iomem *mem_addr);
@@ -119,5 +123,7 @@ int thc_i2c_subip_regs_save(struct thc_device *dev);int thc_i2c_subip_regs_restore (struct thc_device *dev);int thc_i2c_set_rx_max_size (struct thc_device *dev,u32 max_rx_size);int thc_i2c_rx_max_size_enable (struct thc_device *dev,bool enable); +int thc_i2c_set_rx_int_delay (struct thc_device *dev,u32 delay_us); +int thc_i2c_rx_int_delay_enable (struct thc_device *dev,bool enable);#endif /* _INTEL_THC_DEV_H_ */
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c +18 -0
@@ -725,6 +725,15 @@ static int thc_swdma_read_start(struct thc_device *dev, void *write_buff, dev->dma_ctx->rx_max_size_en = true; } +/* +* Interrupt delay feature is in the same situation with max input size control feature, +* needs record feature state before SWDMA. +*/ +if (dev->i2c_int_delay_en) { +thc_i2c_rx_int_delay_enable (dev, false); + dev->dma_ctx->rx_int_delay_en = true; + } + mask =THC_M_PRT_RPRD_CNTRL_SW_THC_SWDMA_I2C_WBC |THC_M_PRT_RPRD_CNTRL_SW_THC_SWDMA_I2C_RX_DLEN_EN ; val = FIELD_PREP(THC_M_PRT_RPRD_CNTRL_SW_THC_SWDMA_I2C_WBC, write_len) |
@@ -776,6 +785,15 @@ static int thc_swdma_read_completion(struct thc_device *dev) dev->dma_ctx->rx_max_size_en = false; } +/* +* Restore input interrupt delay feature to previous state after SWDMA if it was +* enabled before SWDMA, and reset temp rx_int_delay_en variable for next time. +*/ +if (dev->dma_ctx->rx_int_delay_en) { +thc_i2c_rx_int_delay_enable (dev, true); + dev->dma_ctx->rx_int_delay_en = false; + } +thc_reset_dma_settings (dev);dma_set_start_bit (dev, &dev->dma_ctx->dma_config[THC_RXDMA2 ]);
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.h +3 -0
@@ -123,12 +123,15 @@ struct thc_dma_configuration {* @use_write_interrupts: Indicate TxDMA using interrupt or polling * @rx_max_size_en: Temp flag to indicate THC I2C Rx max input size control feature * enabled or not, only be used during SWDMA operation. +* @rx_int_delay_en: Temp flag to indicate THC I2C Rx interrupt delay feature +* enabled or not, only be used during SWDMA operation. */ struct thc_dma_context {struct thc_dma_configuration dma_config[MAX_THC_DMA_CHANNEL ];u8 use_write_interrupts;bool rx_max_size_en; +bool rx_int_delay_en; };struct thc_device ;
drivers/hid/intel-thc-hid/intel-thc/intel-thc-hw.h +2 -0
@@ -400,6 +400,8 @@#define THC_M_PRT_SPI_ICRRD_OPCODE_SPI_QIO GENMASK(15, 8)#define THC_M_PRT_SPI_ICRRD_OPCODE_I2C_MAX_SIZE GENMASK(15, 0) +#define THC_M_PRT_SPI_ICRRD_OPCODE_I2C_INTERVAL GENMASK(23, 16) +#define THC_M_PRT_SPI_ICRRD_OPCODE_I2C_INTERVAL_EN BIT(30)#define THC_M_PRT_SPI_ICRRD_OPCODE_I2C_MAX_SIZE_EN BIT(31)#define THC_M_PRT_INT_EN_SIPE BIT(0)
Signature · 1 line
2.40.1
Even Xu
maintainerPATCH 5/7 HID: Intel-thc-hid: Intel-quicki2c: Refine code comments
In reply to Even XuAlign capitalization of the first characters for all code comments and refine some descriptions.
--- .../intel-quicki2c/pci-quicki2c.c | 125 ++++++++---------- .../intel-quicki2c/quicki2c-dev.h | 25 ++-- 2 files changed, 69 insertions(+), 81 deletions(-)
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +57 -68
@@ -29,17 +29,16 @@ static guid_t thc_platform_guid =/** * quicki2c_acpi_get_dsm_property - Query device ACPI DSM parameter -* -* @adev: point to ACPI device +* @adev: Point to ACPI device * @guid: ACPI method's guid * @rev: ACPI method's revision * @func: ACPI method's function number * @type: ACPI parameter's data type -* @prop_buf: point to return buffer +* @prop_buf: Point to return buffer * * This is a helper function for device to query its ACPI DSM parameters. * -* Return: 0 if success or ENODEV on failed. +* Return: 0 if success or ENODEV on failure. */ static int quicki2c_acpi_get_dsm_property (struct acpi_device *adev,const guid_t *guid,u64 rev,u64 func,acpi_object_type type,void *prop_buf)
@@ -67,11 +66,10 @@ static int quicki2c_acpi_get_dsm_property(struct acpi_device *adev, const guid_t/** * quicki2c_acpi_get_dsd_property - Query device ACPI DSD parameter -* -* @adev: point to ACPI device +* @adev: Point to ACPI device * @dsd_method_name: ACPI method's property name * @type: ACPI parameter's data type -* @prop_buf: point to return buffer +* @prop_buf: Point to return buffer * * This is a helper function for device to query its ACPI DSD parameters. *
@@ -105,13 +103,12 @@ static int quicki2c_acpi_get_dsd_property(struct acpi_device *adev, acpi_string }/** -* quicki2c_get_acpi_resources - Query all quicki2c devices' ACPI parameters -* -* @qcdev: point to quicki2c device +* quicki2c_get_acpi_resources - Query all QuickI2C devices' ACPI parameters +* @qcdev: Point to quicki2c_device structure * -* This function gets all quicki2c devices' ACPI resource. +* This function gets all QuickI2C devices' ACPI resource. * -* Return: 0 if success or error code on failed. +* Return: 0 if success or error code on failure. */ static int quicki2c_get_acpi_resources (struct quicki2c_device *qcdev) {
@@ -197,10 +194,9 @@ static int quicki2c_get_acpi_resources(struct quicki2c_device *qcdev) }/** -* quicki2c_irq_quick_handler - The ISR of the quicki2c driver -* +* quicki2c_irq_quick_handler - The ISR of the QuickI2C driver * @irq: The irq number -* @dev_id: pointer to the device structure +* @dev_id: Pointer to the quicki2c_device structure * * Return: IRQ_WAKE_THREAD if further process needed. */
@@ -219,13 +215,13 @@ static irqreturn_t quicki2c_irq_quick_handler(int irq, void *dev_id)/** * try_recover - Try to recovery THC and Device -* @qcdev: pointer to quicki2c device +* @qcdev: Pointer to quicki2c_device structure * -* This function is a error handler, called when fatal error happens. -* It try to reset Touch Device and re-configure THC to recovery -* transferring between Device and THC. +* This function is an error handler, called when fatal error happens. +* It try to reset touch device and re-configure THC to recovery +* communication between touch device and THC. * -* Return: 0 if successful or error code on failed +* Return: 0 if successful or error code on failure */ static int try_recover (struct quicki2c_device *qcdev) {
@@ -269,7 +265,7 @@ static int handle_input_report(struct quicki2c_device *qcdev)continue ; } -/* discard samples before driver probe complete */ +/* Discard samples before driver probe complete */ if (qcdev->state !=QUICKI2C_ENABLED )continue ;
@@ -281,10 +277,9 @@ static int handle_input_report(struct quicki2c_device *qcdev) }/** -* quicki2c_irq_thread_handler - IRQ thread handler of quicki2c driver -* +* quicki2c_irq_thread_handler - IRQ thread handler of QuickI2C driver * @irq: The IRQ number -* @dev_id: pointer to the quicki2c device structure +* @dev_id: Pointer to the quicki2c_device structure * * Return: IRQ_HANDLED to finish this handler. */
@@ -330,18 +325,17 @@ static irqreturn_t quicki2c_irq_thread_handler(int irq, void *dev_id) }/** -* quicki2c_dev_init - Initialize quicki2c device -* -* @pdev: pointer to the thc pci device -* @mem_addr: The pointer of MMIO memory address +* quicki2c_dev_init - Initialize QuickI2C device +* @pdev: Pointer to the THC PCI device +* @mem_addr: The Pointer of MMIO memory address * -* Alloc quicki2c device structure and initialized THC device, +* Alloc quicki2c_device structure and initialized THC device, * then configure THC to HIDI2C mode. * * If success, enable THC hardware interrupt. * -* Return: pointer to the quicki2c device structure if success -* or NULL on failed. +* Return: Pointer to the quicki2c_device structure if success +* or NULL on failure. */ static struct quicki2c_device *quicki2c_dev_init (struct pci_dev *pdev,void __iomem *mem_addr) {
@@ -360,7 +354,7 @@ static struct quicki2c_device *quicki2c_dev_init(struct pci_dev *pdev, void __ioinit_waitqueue_head (&qcdev->reset_ack_wq); -/* thc hw init */ +/* THC hardware init */ qcdev->thc_hw =thc_dev_init (qcdev->dev, qcdev->mem_addr);if (IS_ERR (qcdev->thc_hw)) { ret =PTR_ERR (qcdev->thc_hw);
@@ -403,9 +397,8 @@ static struct quicki2c_device *quicki2c_dev_init(struct pci_dev *pdev, void __io }/** -* quicki2c_dev_deinit - De-initialize quicki2c device -* -* @qcdev: pointer to the quicki2c device structure +* quicki2c_dev_deinit - De-initialize QuickI2C device +* @qcdev: Pointer to the quicki2c_device structure * * Disable THC interrupt and deinitilize THC. */
@@ -418,13 +411,13 @@ static void quicki2c_dev_deinit(struct quicki2c_device *qcdev) }/** -* quicki2c_dma_init - Configure THC DMA for quicki2c device -* @qcdev: pointer to the quicki2c device structure +* quicki2c_dma_init - Configure THC DMA for QuickI2C device +* @qcdev: Pointer to the quicki2c_device structure * * This function uses TIC's parameters(such as max input length, max output * length) to allocate THC DMA buffers and configure THC DMA engines. * -* Return: 0 if success or error code on failed. +* Return: 0 if success or error code on failure. */ static int quicki2c_dma_init (struct quicki2c_device *qcdev) {
@@ -456,12 +449,12 @@ static int quicki2c_dma_init(struct quicki2c_device *qcdev)return ret; } -return ret; +return 0 ; }/** -* quicki2c_dma_deinit - Release THC DMA for quicki2c device -* @qcdev: pointer to the quicki2c device structure +* quicki2c_dma_deinit - Release THC DMA for QuickI2C device +* @qcdev: Pointer to the quicki2c_device structure * * Stop THC DMA engines and release all DMA buffers. *
@@ -474,7 +467,7 @@ static void quicki2c_dma_deinit(struct quicki2c_device *qcdev)/** * quicki2c_alloc_report_buf - Alloc report buffers -* @qcdev: pointer to the quicki2c device structure +* @qcdev: Pointer to the quicki2c_device structure * * Allocate report descriptor buffer, it will be used for restore TIC HID * report descriptor.
@@ -485,7 +478,7 @@ static void quicki2c_dma_deinit(struct quicki2c_device *qcdev)* Allocate output report buffer, it will be used for store HID output report, * such as set feature. * -* Return: 0 if success or error code on failed. +* Return: 0 if success or error code on failure. */ static int quicki2c_alloc_report_buf (struct quicki2c_device *qcdev) {
@@ -523,24 +516,23 @@ static int quicki2c_alloc_report_buf(struct quicki2c_device *qcdev) }/* -* quicki2c_probe: Quicki2c driver probe function -* -* @pdev: point to pci device -* @id: point to pci_device_id structure +* quicki2c_probe: QuickI2C driver probe function +* @pdev: Point to PCI device +* @id: Point to pci_device_id structure * * This function initializes THC and HIDI2C device, the flow is: -* - do THC pci device initialization -* - query HIDI2C ACPI parameters -* - configure THC to HIDI2C mode -* - go through HIDI2C enumeration flow -* |- read device descriptor -* |- reset HIDI2C device -* - enable THC interrupt and DMA -* - read report descriptor -* - register HID device -* - enable runtime power management -* -* Return 0 if success or error code on failed. +* - Do THC pci device initialization +* - Query HIDI2C ACPI parameters +* - Configure THC to HIDI2C mode +* - Go through HIDI2C enumeration flow +* |- Read device descriptor +* |- Reset HIDI2C device +* - Enable THC interrupt and DMA +* - Read report descriptor +* - Register HID device +* - Enable runtime power management +* +* Return 0 if success or error code on failure. */ static int quicki2c_probe (struct pci_dev *pdev,const struct pci_device_id *id)
@@ -673,11 +665,10 @@ static int quicki2c_probe(struct pci_dev *pdev,/** * quicki2c_remove - Device Removal Routine +* @pdev: Point to PCI device structure * -* @pdev: PCI device structure -* -* This is called by the PCI subsystem to alert the driver -* that it should release a PCI device. +* This is called by the PCI subsystem to alert the driver that it should +* release a PCI device. */ static void quicki2c_remove (struct pci_dev *pdev) {
@@ -699,12 +690,10 @@ static void quicki2c_remove(struct pci_dev *pdev)/** * quicki2c_shutdown - Device Shutdown Routine +* @pdev: Point to PCI device structure * -* @pdev: PCI device structure -* -* This is called from the reboot notifier -* it's a simplified version of remove so we go down -* faster. +* This is called from the reboot notifier, it's a simplified version of remove +* so we go down faster. */ static void quicki2c_shutdown (struct pci_dev *pdev) {
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h +12 -13
@@ -130,15 +130,14 @@ struct acpi_device;/** * struct quicki2c_device - THC QuickI2C device struct -* @dev: point to kernel device -* @pdev: point to PCI device -* @thc_hw: point to THC device -* @hid_dev: point to hid device -* @acpi_dev: point to ACPI device -* @driver_data: point to quicki2c specific driver data +* @dev: Point to kernel device +* @pdev: Point to PCI device +* @thc_hw: Point to THC device +* @hid_dev: Point to HID device +* @acpi_dev: Point to ACPI device * @state: THC I2C device state * @mem_addr: MMIO memory address -* @dev_desc: device descriptor for HIDI2C protocol +* @dev_desc: Device descriptor for HIDI2C protocol * @i2c_slave_addr: HIDI2C device slave address * @hid_desc_addr: Register address for retrieve HID device descriptor * @active_ltr_val: THC active LTR value
@@ -146,12 +145,12 @@ struct acpi_device;* @i2c_speed_mode: 0 - standard mode, 1 - fast mode, 2 - fast mode plus * @i2c_clock_hcnt: I2C CLK high period time (unit in cycle count) * @i2c_clock_lcnt: I2C CLK low period time (unit in cycle count) -* @report_descriptor: store a copy of device report descriptor -* @input_buf: store a copy of latest input report data -* @report_buf: store a copy of latest input/output report packet from set/get feature -* @report_len: the length of input/output report packet -* @reset_ack_wq: workqueue for waiting reset response from device -* @reset_ack: indicate reset response received or not +* @report_descriptor: Store a copy of device report descriptor +* @input_buf: Store a copy of latest input report data +* @report_buf: Store a copy of latest input/output report packet from set/get feature +* @report_len: The length of input/output report packet +* @reset_ack_wq: Workqueue for waiting reset response from device +* @reset_ack: Indicate reset response received or not */ struct quicki2c_device {struct device *dev;
Signature · 1 line
2.40.1
Even Xu
maintainerPATCH 6/7 HID: Intel-thc-hid: Intel-quicki2c: Add driver data support
In reply to Even XuThis patch defines driver data structure and adds it into QuickI2C device structure. Changes PCI ID table to use PCI_DEVICE_DATA() to pass platform specific driver data into driver, let driver has capability to enable different hardware features according to different platform driver data.
--- .../intel-quicki2c/pci-quicki2c.c | 25 +++++++++++-------- .../intel-quicki2c/quicki2c-dev.h | 24 +++++++++++++----- 2 files changed, 32 insertions(+), 17 deletions(-)
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +14 -11
@@ -328,6 +328,7 @@ static irqreturn_t quicki2c_irq_thread_handler(int irq, void *dev_id)* quicki2c_dev_init - Initialize QuickI2C device * @pdev: Pointer to the THC PCI device * @mem_addr: The Pointer of MMIO memory address +* @ddata: Point to quicki2c_ddata structure * * Alloc quicki2c_device structure and initialized THC device, * then configure THC to HIDI2C mode.
@@ -337,7 +338,8 @@ static irqreturn_t quicki2c_irq_thread_handler(int irq, void *dev_id)* Return: Pointer to the quicki2c_device structure if success * or NULL on failure. */ -static struct quicki2c_device *quicki2c_dev_init (struct pci_dev *pdev,void __iomem *mem_addr) +static struct quicki2c_device *quicki2c_dev_init (struct pci_dev *pdev,void __iomem *mem_addr, +const struct quicki2c_ddata *ddata) {struct device *dev = &pdev->dev;struct quicki2c_device *qcdev;
@@ -351,6 +353,7 @@ static struct quicki2c_device *quicki2c_dev_init(struct pci_dev *pdev, void __io qcdev->dev = dev; qcdev->mem_addr = mem_addr; qcdev->state =QUICKI2C_DISABLED ; + qcdev->ddata = ddata;init_waitqueue_head (&qcdev->reset_ack_wq);
@@ -534,9 +537,9 @@ static int quicki2c_alloc_report_buf(struct quicki2c_device *qcdev)* * Return 0 if success or error code on failure. */ -static int quicki2c_probe (struct pci_dev *pdev, -const struct pci_device_id *id) +static int quicki2c_probe (struct pci_dev *pdev,const struct pci_device_id *id) { +const struct quicki2c_ddata *ddata = (const struct quicki2c_ddata *)id->driver_data;struct quicki2c_device *qcdev;void __iomem *mem_addr;int ret;
@@ -574,7 +577,7 @@ static int quicki2c_probe(struct pci_dev *pdev, pdev->irq =pci_irq_vector (pdev,0 ); - qcdev =quicki2c_dev_init (pdev, mem_addr); + qcdev =quicki2c_dev_init (pdev, mem_addr, ddata);if (IS_ERR (qcdev)) {dev_err_once (&pdev->dev,"QuickI2C device init failed\n" ); ret =PTR_ERR (qcdev);
@@ -924,13 +927,13 @@ static const struct dev_pm_ops quicki2c_pm_ops = { };static const struct pci_device_id quicki2c_pci_tbl[] = { - {PCI_VDEVICE (INTEL ,THC_LNL_DEVICE_ID_I2C_PORT1 ), }, - {PCI_VDEVICE (INTEL ,THC_LNL_DEVICE_ID_I2C_PORT2 ), }, - {PCI_VDEVICE (INTEL ,THC_PTL_H_DEVICE_ID_I2C_PORT1 ), }, - {PCI_VDEVICE (INTEL ,THC_PTL_H_DEVICE_ID_I2C_PORT2 ), }, - {PCI_VDEVICE (INTEL ,THC_PTL_U_DEVICE_ID_I2C_PORT1 ), }, - {PCI_VDEVICE (INTEL ,THC_PTL_U_DEVICE_ID_I2C_PORT2 ), }, - {} + {PCI_DEVICE_DATA (INTEL ,THC_LNL_DEVICE_ID_I2C_PORT1 ,NULL ) }, + {PCI_DEVICE_DATA (INTEL ,THC_LNL_DEVICE_ID_I2C_PORT2 ,NULL ) }, + {PCI_DEVICE_DATA (INTEL ,THC_PTL_H_DEVICE_ID_I2C_PORT1 ,NULL ) }, + {PCI_DEVICE_DATA (INTEL ,THC_PTL_H_DEVICE_ID_I2C_PORT2 ,NULL ) }, + {PCI_DEVICE_DATA (INTEL ,THC_PTL_U_DEVICE_ID_I2C_PORT1 ,NULL ) }, + {PCI_DEVICE_DATA (INTEL ,THC_PTL_U_DEVICE_ID_I2C_PORT2 ,NULL ) }, + { } };MODULE_DEVICE_TABLE (pci, quicki2c_pci_tbl);
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h +18 -6
@@ -7,12 +7,12 @@#include <linux/hid-over-i2c.h> #include <linux/workqueue.h> -#define THC_LNL_DEVICE_ID_I2C_PORT1 0xA848 -#define THC_LNL_DEVICE_ID_I2C_PORT2 0xA84A -#define THC_PTL_H_DEVICE_ID_I2C_PORT1 0xE348 -#define THC_PTL_H_DEVICE_ID_I2C_PORT2 0xE34A -#define THC_PTL_U_DEVICE_ID_I2C_PORT1 0xE448 -#define THC_PTL_U_DEVICE_ID_I2C_PORT2 0xE44A +#define PCI_DEVICE_ID_INTEL_THC_LNL_DEVICE_ID_I2C_PORT1 0xA848 +#define PCI_DEVICE_ID_INTEL_THC_LNL_DEVICE_ID_I2C_PORT2 0xA84A +#define PCI_DEVICE_ID_INTEL_THC_PTL_H_DEVICE_ID_I2C_PORT1 0xE348 +#define PCI_DEVICE_ID_INTEL_THC_PTL_H_DEVICE_ID_I2C_PORT2 0xE34A +#define PCI_DEVICE_ID_INTEL_THC_PTL_U_DEVICE_ID_I2C_PORT1 0xE448 +#define PCI_DEVICE_ID_INTEL_THC_PTL_U_DEVICE_ID_I2C_PORT2 0xE44A/* Packet size value, the unit is 16 bytes */ #define MAX_PACKET_SIZE_VALUE_LNL 256
@@ -122,6 +122,16 @@ struct quicki2c_subip_acpi_config {u64 HMSL ; }; +/** +* struct quicki2c_ddata - Driver specific data for quicki2c device +* @max_detect_size: Identify max packet size detect for rx +* @interrupt_delay: Identify interrupt detect delay for rx +*/ +struct quicki2c_ddata { +u32 max_detect_size; +u32 interrupt_delay; +}; +struct device ;struct pci_dev ;struct thc_device ;
@@ -135,6 +145,7 @@ struct acpi_device;* @thc_hw: Point to THC device * @hid_dev: Point to HID device * @acpi_dev: Point to ACPI device +* @ddata: Point to QuickI2C platform specific driver data * @state: THC I2C device state * @mem_addr: MMIO memory address * @dev_desc: Device descriptor for HIDI2C protocol
@@ -158,6 +169,7 @@ struct quicki2c_device {struct thc_device *thc_hw;struct hid_device *hid_dev;struct acpi_device *acpi_dev; +const struct quicki2c_ddata *ddata;enum quicki2c_dev_state state;void __iomem *mem_addr;
Signature · 1 line
2.40.1
Even Xu
maintainerPATCH 7/7 HID: Intel-thc-hid: Intel-quicki2c: Add two new features to PTL
In reply to Even XuOn Panther Lake platform (PTL), THC hardware introduces two new features for I2C subsystem:
- Input max input size control
- Input interrupt delay
This patch adds above new advanced features into QuickI2C driver, and enables max input size control feature on PTL to improve QuickI2C driver compatibility.
--- .../intel-quicki2c/pci-quicki2c.c | 62 +++++++++++++++++-- .../intel-quicki2c/quicki2c-dev.h | 6 ++ 2 files changed, 64 insertions(+), 4 deletions(-)
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +58 -4
@@ -18,6 +18,10 @@#include "quicki2c-hid.h" #include "quicki2c-protocol.h" +struct quicki2c_ddata ptl_ddata = { + .max_detect_size =MAX_RX_DETECT_SIZE_PTL , +}; +/* THC QuickI2C ACPI method to get device properties */ /* HIDI2C device method */ static guid_t i2c_hid_guid =
@@ -413,6 +417,50 @@ static void quicki2c_dev_deinit(struct quicki2c_device *qcdev) qcdev->state =QUICKI2C_DISABLED ; } +/** +* quicki2c_dma_adv_enable - Configure and enable DMA advanced features +* @qcdev: Pointer to the quicki2c_device structure +* +* If platform supports THC DMA advanced features, such as max input size +* control or interrupt delay, configures and enables them. +*/ +static void quicki2c_dma_adv_enable (struct quicki2c_device *qcdev) +{ +/* +* If platform supports max input size control feature and touch device +* max input length <= THC detect capability, enable the feature with device +* max input length. +*/ +if (qcdev->ddata->max_detect_size >= +le16_to_cpu (qcdev->dev_desc.max_input_len)) { +thc_i2c_set_rx_max_size (qcdev->thc_hw, +le16_to_cpu (qcdev->dev_desc.max_input_len)); +thc_i2c_rx_max_size_enable (qcdev->thc_hw, true); + } + +/* If platform supports interrupt delay feature, enable it with given delay */ +if (qcdev->ddata->interrupt_delay) { +thc_i2c_set_rx_int_delay (qcdev->thc_hw, + qcdev->ddata->interrupt_delay); +thc_i2c_rx_int_delay_enable (qcdev->thc_hw, true); + } +} + +/** +* quicki2c_dma_adv_disable - Disable DMA advanced features +* @qcdev: Pointer to the quicki2c device structure +* +* Disable all DMA advanced features if platform supports. +*/ +static void quicki2c_dma_adv_disable (struct quicki2c_device *qcdev) +{ +if (qcdev->ddata->max_detect_size) +thc_i2c_rx_max_size_enable (qcdev->thc_hw, false); + +if (qcdev->ddata->interrupt_delay) +thc_i2c_rx_int_delay_enable (qcdev->thc_hw, false); +} +/** * quicki2c_dma_init - Configure THC DMA for QuickI2C device * @qcdev: Pointer to the quicki2c_device structure
@@ -452,6 +500,9 @@ static int quicki2c_dma_init(struct quicki2c_device *qcdev)return ret; } +if (qcdev->ddata) +quicki2c_dma_adv_enable (qcdev); +return 0 ; }
@@ -466,6 +517,9 @@ static void quicki2c_dma_deinit(struct quicki2c_device *qcdev) {thc_dma_unconfigure (qcdev->thc_hw);thc_dma_release (qcdev->thc_hw); + +if (qcdev->ddata) +quicki2c_dma_adv_disable (qcdev); }/**
@@ -929,10 +983,10 @@ static const struct dev_pm_ops quicki2c_pm_ops = {static const struct pci_device_id quicki2c_pci_tbl[] = { {PCI_DEVICE_DATA (INTEL ,THC_LNL_DEVICE_ID_I2C_PORT1 ,NULL ) }, {PCI_DEVICE_DATA (INTEL ,THC_LNL_DEVICE_ID_I2C_PORT2 ,NULL ) }, - {PCI_DEVICE_DATA (INTEL ,THC_PTL_H_DEVICE_ID_I2C_PORT1 ,NULL ) }, - {PCI_DEVICE_DATA (INTEL ,THC_PTL_H_DEVICE_ID_I2C_PORT2 ,NULL ) }, - {PCI_DEVICE_DATA (INTEL ,THC_PTL_U_DEVICE_ID_I2C_PORT1 ,NULL ) }, - {PCI_DEVICE_DATA (INTEL ,THC_PTL_U_DEVICE_ID_I2C_PORT2 ,NULL ) }, + {PCI_DEVICE_DATA (INTEL ,THC_PTL_H_DEVICE_ID_I2C_PORT1 , &ptl_ddata) }, + {PCI_DEVICE_DATA (INTEL ,THC_PTL_H_DEVICE_ID_I2C_PORT2 , &ptl_ddata) }, + {PCI_DEVICE_DATA (INTEL ,THC_PTL_U_DEVICE_ID_I2C_PORT1 , &ptl_ddata) }, + {PCI_DEVICE_DATA (INTEL ,THC_PTL_U_DEVICE_ID_I2C_PORT2 , &ptl_ddata) }, { } };MODULE_DEVICE_TABLE (pci, quicki2c_pci_tbl);
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h +6 -0
@@ -36,6 +36,12 @@#define QUICKI2C_DEFAULT_LP_LTR_VALUE 500#define QUICKI2C_RPM_TIMEOUT_MS 500 +/* PTL Max packet size detection capability is 255 Bytes */ +#define MAX_RX_DETECT_SIZE_PTL 255 + +/* Default interrupt delay is 1ms, suitable for most devices */ +#define DEFAULT_INTERRUPT_DELAY_US (1 * USEC_PER_MSEC) +/* * THC uses runtime auto suspend to dynamically switch between THC active LTR * and low power LTR to save CPU power.
Signature · 1 line
2.40.1
kernel test robot
build botRe: [PATCH v1 7/7] HID: Intel-thc-hid: Intel-quicki2c: Add two new features to PTL
kernel test robot noticed the following build warnings:
Hi Even,
kernel test robot noticed the following build warnings:
[auto build test WARNING on hid/for-next]
[also build test WARNING on linus/master v6.15-rc6 next-20250516] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Even-Xu/HID-Intel-thc-hid-Intel-thc-Add-thc_dma_content-into-kernel-doc/20250514-142347 base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next patch link: https://lore.kernel.org/r/20250514061944.125857-8-even.xu%40intel.com patch subject: [PATCH v1 7/7] HID: Intel-thc-hid: Intel-quicki2c: Add two new features to PTL config: x86_64-randconfig-121-20250517 (https://download.01.org/0day-ci/archive/20250517/[email protected]/config) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250517/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
sparse warnings: (new ones prefixed by >>)
>> drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c:21:23: sparse: sparse: symbol 'ptl_ddata' was not declared. Should it be static?
vim +/ptl_ddata +21 drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
20
> 21 struct quicki2c_ddata ptl_ddata = {
22 .max_detect_size = MAX_RX_DETECT_SIZE_PTL,
23 };
24 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Jiri Kosina
maintainerPATCH 1/1 HID: intel-thc: make ptl_ddata static
From: Jiri Kosina <[email protected]>
ptl_ddata is local to pci-quicki2c.c, so it'd better be static.
---
This is now in hid.git#for-6.17/intel-thc
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +1 -1
@@ -21,7 +21,7 @@#include "quicki2c-hid.h" #include "quicki2c-protocol.h" -struct quicki2c_ddata ptl_ddata = { +static struct quicki2c_ddata ptl_ddata = { .max_detect_size =MAX_RX_DETECT_SIZE_PTL , };
Signature · 2 lines
Jiri Kosina SUSE Labs
Xu, Even
maintainerRE: [PATCH] HID: intel-thc: make ptl_ddata static
Hi, Jiri,
Noted, thanks for creating this patch!
I was prepared to submit a fix patch after the current patch set is merged, thank you so much for helping get it done quickly ^_^
Best Regards,
Even Xu
Quoted 41 lines
-----Original Message-----
From: Jiri Kosina <[email protected]>
Sent: Wednesday, June 11, 2025 3:27 AM
To: lkp <[email protected]>
Cc: Xu, Even <[email protected]>; [email protected]; oe-kbuild- [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; Han, Chong <[email protected]>
Subject: [PATCH] HID: intel-thc: makeptl_ddatastaticFrom: Jiri Kosina <[email protected]>
ptl_ddatais local topci-quicki2c.c, so it'd better be static.Reported-by kernel test robot <[email protected]>Signed-off-by Jiri Kosina <[email protected]>---
This is now in hid.git#for-6.17/intel-thc
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +1
-2@@ -21,7 +21,7 @@#include "quicki2c-hid.h" #include "quicki2c-protocol.h" -struct quicki2c_ddata ptl_ddata = { +static struct quicki2c_ddata ptl_ddata = { .max_detect_size =MAX_RX_DETECT_SIZE_PTL , }; --Jiri Kosina
SUSE Labs
Jiri Kosina
maintainerQuoted 9 lines · Even Xu
In order to improve THC compatibility with lagacy HIDI2C touch device, on Panther lake (PTL) platform, THC hardware introduces two new features for I2C subsystem:
- Input max input size control
- Input interrupt delayThis patch set adds APIs for above two features' setting and enabling in THC hardware layer driver, and enable them in QuickI2C driver.
Quoted 8 lines
Even Xu (7):
HID: Intel-thc-hid: Intel-thc: Addthc_dma_contentinto kernel doc
HID: Intel-thc-hid: Intel-thc: Refine code comments
HID: Intel-thc-hid: Intel-thc: Introduce max input size control
HID: Intel-thc-hid: Intel-thc: Introduce interrupt delay control
HID: Intel-thc-hid: Intel-quicki2c: Refine code comments
HID: Intel-thc-hid: Intel-quicki2c: Add driver data support
HID: Intel-thc-hid: Intel-quicki2c: Add two new features to PTL
Now queued in hid.git#for-6.17/intel-thc. Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Xu, Even
maintainerThank you very much!
Best Regards,
Even Xu
Quoted 33 lines
-----Original Message-----
From: Jiri Kosina <[email protected]>
Sent: Wednesday, June 11, 2025 3:16 AM
To: Xu, Even <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v1 0/7] Add two new features for QuickI2CQuoted 9 lines · Even Xu
In order to improve THC compatibility with lagacy HIDI2C touch device, on Panther lake (PTL) platform, THC hardware introduces two new features for I2C subsystem:
- Input max input size control
- Input interrupt delayThis patch set adds APIs for above two features' setting and enabling in THC hardware layer driver, and enable them in QuickI2C driver.
Quoted 8 lines
Even Xu (7):
HID: Intel-thc-hid: Intel-thc: Addthc_dma_contentinto kernel doc
HID: Intel-thc-hid: Intel-thc: Refine code comments
HID: Intel-thc-hid: Intel-thc: Introduce max input size control
HID: Intel-thc-hid: Intel-thc: Introduce interrupt delay control
HID: Intel-thc-hid: Intel-quicki2c: Refine code comments
HID: Intel-thc-hid: Intel-quicki2c: Add driver data support
HID: Intel-thc-hid: Intel-quicki2c: Add two new features to PTLNow queued in hid.git#for-6.17/intel-thc. Thanks,
--
Jiri Kosina
SUSE Labs