From nobody Thu Feb 12 14:09:19 2026 Received: from mail-40135.protonmail.ch (mail-40135.protonmail.ch [185.70.40.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC551210FF for ; Wed, 12 Jun 2024 03:21:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.135 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718162480; cv=none; b=pVMwcQ2+bTfou2Zn0Je8dSvhVR64fOg03Q6BuhmPrV3SmrQU7VkrpyHegPPt2HpdiC3mPSKTT02jI7QYIqLa3wbHfYuZiD6fzf3RIjd/FDxTgUayDzIw8cEVhbQjQWMLkE9Ud6YC8fxOenvPfnczXDxPW+MAl1w6dqKZGJZ1bvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718162480; c=relaxed/simple; bh=4caMDJk1fymacmDutxXRaq4p+OusCKGUepMMnXhyzuE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=a3p6IZff3j6f3MdYfIB/fXCgRimQfOikpyOQ4TOWq325Mca6OtvQ56MuFp/cocuw+0RuGaLX4iqT/vgwOUdYJmElxSymF2rDa1jwojxsJaEcaBDiighuUDye+mdj21HuWB1x0kNp9HrNDMDDbO/0PxWKCQ6VhggVBl7/k2NspgM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=U1JcTFuB; arc=none smtp.client-ip=185.70.40.135 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="U1JcTFuB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1718162470; x=1718421670; bh=v9+fU/3I0sW3EO1/uEtuQOuAAW/aw8IWkdBocAl5mAU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=U1JcTFuBUNjJx1tlixm8r0piCpAroBpoKrhEfwDWDo2pa06uw24iozBmrWEqI8weg j2kkSr3299DV3Gq6znNf4PUDER6P6hDby6KdqbOm29tfvsfCs1fqXrwVYHi5WiOVcG +Mm5TvRQbYyl8XXjVKEh8nMi8rPt5m/9CvmFd8QE3RRquXsqODO89ESwYf4O2szwl0 kFGlfwFYU5Feb6Bb0/dR2lBikK7RiSSYajg2O6cnUHPagyRJCjAqrH4xDxhX+IOTed +MkHp0g/uLKGe3cb3/I17fSXGlPY3QujRR8/zbitvmvlKXpTgiSuRvJxszecPm9Id6 AWnpJLqz2OLaw== Date: Wed, 12 Jun 2024 03:21:04 +0000 To: linux-kernel@vger.kernel.org From: Raymond Hackley Cc: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-input@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 1/3] input/touchscreen: imagis: Clarify the usage of protocol_b Message-ID: <20240612032036.33103-2-raymondhackley@protonmail.com> In-Reply-To: <20240612032036.33103-1-raymondhackley@protonmail.com> References: <20240612032036.33103-1-raymondhackley@protonmail.com> Feedback-ID: 49437091:user:proton X-Pm-Message-ID: 651ef5fd3f41cfde3c3b7171adfecf433ee63de8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" protocol_b is a property, which tells Imagis panel to use a different format for coordinates. IST30XXC series is known for using protocol B, while the other series aren't. Note this could be confusing, unlike the model name implies. Adjust the usage of protocol_b to avoid confusion. Signed-off-by: Raymond Hackley --- drivers/input/touchscreen/imagis.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen= /imagis.c index 074dd6c342ec..886bcfc8497a 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -120,12 +120,12 @@ static irqreturn_t imagis_interrupt(int irq, void *de= v_id) =20 for (i =3D 0; i < finger_count; i++) { if (ts->tdata->protocol_b) - error =3D imagis_i2c_read_reg(ts, - ts->tdata->touch_coord_cmd, &finger_status); - else error =3D imagis_i2c_read_reg(ts, ts->tdata->touch_coord_cmd + (i * 4), &finger_status); + else + error =3D imagis_i2c_read_reg(ts, + ts->tdata->touch_coord_cmd, &finger_status); if (error) { dev_err(&ts->client->dev, "failed to read coordinates for finger %d: %d\n", @@ -394,6 +394,7 @@ static const struct imagis_properties imagis_3032c_data= =3D { .whoami_cmd =3D IST3038C_REG_CHIPID, .whoami_val =3D IST3032C_WHOAMI, .touch_keys_supported =3D true, + .protocol_b =3D true, }; =20 static const struct imagis_properties imagis_3038b_data =3D { @@ -401,7 +402,6 @@ static const struct imagis_properties imagis_3038b_data= =3D { .touch_coord_cmd =3D IST3038B_REG_STATUS, .whoami_cmd =3D IST3038B_REG_CHIPID, .whoami_val =3D IST3038B_WHOAMI, - .protocol_b =3D true, }; =20 static const struct imagis_properties imagis_3038c_data =3D { @@ -409,6 +409,7 @@ static const struct imagis_properties imagis_3038c_data= =3D { .touch_coord_cmd =3D IST3038C_REG_TOUCH_COORD, .whoami_cmd =3D IST3038C_REG_CHIPID, .whoami_val =3D IST3038C_WHOAMI, + .protocol_b =3D true, }; =20 #ifdef CONFIG_OF --=20 2.39.2 From nobody Thu Feb 12 14:09:19 2026 Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 260EC182AF for ; Wed, 12 Jun 2024 03:21:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=188.165.51.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718162488; cv=none; b=WeUKWo9LW7sACvapJbhT7TSbjLNESjiOJHqkIYCbI4XDdFG5Q24hYK1IV23P6Up2xMfwqYBsR3YU6irAQXuG84XhII+0WvCmRgMEM5CFkmZCZGNMON5aTIMEnLhdrodiekJs2+0EO5bdixTSTICq0aM5cpml3QtGGv0pwYvnyk8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718162488; c=relaxed/simple; bh=AL1kabKZ9aiMqgGz1LRsyrTMRHsm/iVj6Z4f0MCoRMM=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cF+b8bRvU/4BMx6pxI7sqRtxkQpZjTha6eiMJiZTMvRUab0VEeHzzulQoC7KLcgk5nCRHSpkXpktdlKsNLVbL+3xMO4Gu+i6kG4mO8Sd/nm4HvaVZoBGaTgwi3k0WQW+AT8X6YaV1sx3QMS6pCBGW7HoGmLsBycZPEPJGcred0A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=t9ES+U2C; arc=none smtp.client-ip=188.165.51.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="t9ES+U2C" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1718162477; x=1718421677; bh=AL1kabKZ9aiMqgGz1LRsyrTMRHsm/iVj6Z4f0MCoRMM=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=t9ES+U2CFM2N7R68Kk+DbbPfL20hFS7hPGgN1I0qit3FUOOgxtbrgRFRspefpNRZl bk7xhcp+OHFsnx/XSi5N9VwT6jX8ug0uOZa6Ec0+IPkfoUljmk0akE8bFvMdVIOF52 Q5n8F4JUux/jj4jncJYLzFRaE4AJ5B8ckEoBo5E8lVxq/VJhf3z/fNRDuMCsjSvx7B 6Yr3dXPbabVCfAvBqC3rnnTCAtx12eBEidWzDifythG/hHGcIMSaJMY6xNMKviS4yq lrOgiP1I3JcuxX5UVz+C8ubq2Nr+jY3WYSRdvhjp4Iy5hj0YVEitSA5Nsowu02gJUV SKODAQztrwUJg== Date: Wed, 12 Jun 2024 03:21:14 +0000 To: linux-kernel@vger.kernel.org From: Raymond Hackley Cc: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-input@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 2/3] input/touchscreen: imagis: Add supports for Imagis IST3038 Message-ID: <20240612032036.33103-3-raymondhackley@protonmail.com> In-Reply-To: <20240612032036.33103-1-raymondhackley@protonmail.com> References: <20240612032036.33103-1-raymondhackley@protonmail.com> Feedback-ID: 49437091:user:proton X-Pm-Message-ID: bf48fd04ac644e695a965ccf5ee76145560c19f7 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Imagis IST3038 is another variant of Imagis IST3038 IC, which has a different register interface from IST3038C (possibly firmware defined). Unlike IST3038C/IST3032C, IST3038 has different registers for commands, which means IST3038 doesn't use protocol B. Similar to IST3032C and maybe the other variants, IST3038 has touch keys support, which provides KEY_APPSELECT and KEY_BACK. Add support for IST3038 with touch keys. Signed-off-by: Raymond Hackley --- drivers/input/touchscreen/imagis.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen= /imagis.c index 886bcfc8497a..b2f4bc60721d 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -12,9 +12,16 @@ #include #include =20 +#define IST30XX_REG_STATUS 0x20 +#define IST30XX_REG_CHIPID (0x40000000 | IST3038C_DIRECT_ACCESS) +#define IST30XX_WHOAMI 0x30003000 +#define IST30XXA_WHOAMI 0x300a300a +#define IST30XXB_WHOAMI 0x300b300b +#define IST3038_WHOAMI 0x30383038 + #define IST3032C_WHOAMI 0x32c +#define IST3038C_WHOAMI 0x38c =20 -#define IST3038B_REG_STATUS 0x20 #define IST3038B_REG_CHIPID 0x30 #define IST3038B_WHOAMI 0x30380b =20 @@ -25,7 +32,6 @@ #define IST3038C_REG_TOUCH_STATUS (IST3038C_REG_HIB_BASE | IST3038C_HIB_AC= CESS) #define IST3038C_REG_TOUCH_COORD (IST3038C_REG_HIB_BASE | IST3038C_HIB_ACC= ESS | 0x8) #define IST3038C_REG_INTR_MESSAGE (IST3038C_REG_HIB_BASE | IST3038C_HIB_AC= CESS | 0x4) -#define IST3038C_WHOAMI 0x38c #define IST3038C_CHIP_ON_DELAY_MS 60 #define IST3038C_I2C_RETRY_COUNT 3 #define IST3038C_MAX_FINGER_NUM 10 @@ -397,9 +403,17 @@ static const struct imagis_properties imagis_3032c_dat= a =3D { .protocol_b =3D true, }; =20 +static const struct imagis_properties imagis_3038_data =3D { + .interrupt_msg_cmd =3D IST30XX_REG_STATUS, + .touch_coord_cmd =3D IST30XX_REG_STATUS, + .whoami_cmd =3D IST30XX_REG_CHIPID, + .whoami_val =3D IST3038_WHOAMI, + .touch_keys_supported =3D true, +}; + static const struct imagis_properties imagis_3038b_data =3D { - .interrupt_msg_cmd =3D IST3038B_REG_STATUS, - .touch_coord_cmd =3D IST3038B_REG_STATUS, + .interrupt_msg_cmd =3D IST30XX_REG_STATUS, + .touch_coord_cmd =3D IST30XX_REG_STATUS, .whoami_cmd =3D IST3038B_REG_CHIPID, .whoami_val =3D IST3038B_WHOAMI, }; @@ -415,6 +429,7 @@ static const struct imagis_properties imagis_3038c_data= =3D { #ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] =3D { { .compatible =3D "imagis,ist3032c", .data =3D &imagis_3032c_data }, + { .compatible =3D "imagis,ist3038", .data =3D &imagis_3038_data }, { .compatible =3D "imagis,ist3038b", .data =3D &imagis_3038b_data }, { .compatible =3D "imagis,ist3038c", .data =3D &imagis_3038c_data }, { }, --=20 2.39.2 From nobody Thu Feb 12 14:09:19 2026 Received: from mail-43166.protonmail.ch (mail-43166.protonmail.ch [185.70.43.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAE8E2C1BA; Wed, 12 Jun 2024 03:21:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.166 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718162491; cv=none; b=SDpFSkZ6iJY7NSJFPjG80IhWOubH2NvuT6DXfS292381g/nknJCwVqt9RzUbDS0mN38s51BgI0ECNZjYvxNoCi8b/kpN/HQWngxL4vVKyk8b3SWpIal42MpIOCnH4JHwIv5ECl10e/kgnfA5zxvO1XGTQRVJ0Lgm9UNeGtmluiw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718162491; c=relaxed/simple; bh=DWxPsEhJZsPyLSnh9ioNt5dXQHtNNFp1hy4BIqKzpF8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=C/oWmzlx4CmJFFXsgm/KZNlxDhT12ATFWRcnR+s5FndzDR/ECtCX+fKHBlY6rmWkdZZnNFGFD3uUDn/aIr8jJthLCTAJKJyFjrZhC5GHJGsyHgKys1wmOrqT5FF5d3YhXL0+P+XX8q2uSUqFQtb5KhFkFpFC0mW+dBy9K5/Ir3A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=Vhy73vMD; arc=none smtp.client-ip=185.70.43.166 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="Vhy73vMD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1718162487; x=1718421687; bh=H1GLr5Hux1N4JOpyjG066oNxDyD7VpK2fBNM2y98AvA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Vhy73vMDoLTJXkODvRsg1B6lSLY8TxMun2DqUxf9Ie8mkOfXc0euOywBNDt7aJGWK AiFoO+/sDWSQPwJZehH1DUXJrP2KPwDjn+jC/YATFFGtoKRBVHpPXLgTRmbq2r8v6I BHrLTkm4h4AUkJfR7958Ab5JvWPWDA63RKFAGoTr1IqDwKUeeuxTZ71MN3LcmEEk3d Nv5eY76vIR1Z3dOsCtxLT+4Tiua4gR88hERiCI7Jhkl0gB6PG91EFapVZ2zghdKWlp mRGGk8eqo5pN7f2gsiXMF2f8yrnxYWT6EmKGfJybAX+d69DUgkN1SYOtbr9G713Sfl xQ40mwwsoS0Ug== Date: Wed, 12 Jun 2024 03:21:24 +0000 To: linux-kernel@vger.kernel.org From: Raymond Hackley Cc: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-input@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 3/3] dt-bindings: input/touchscreen: imagis: Document ist3038 Message-ID: <20240612032036.33103-4-raymondhackley@protonmail.com> In-Reply-To: <20240612032036.33103-1-raymondhackley@protonmail.com> References: <20240612032036.33103-1-raymondhackley@protonmail.com> Feedback-ID: 49437091:user:proton X-Pm-Message-ID: 62ef74be6eb55fe10e27fc423f06e173d02acdd0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Imagis IST3038 is a variant of Imagis touchscreen IC. Document it in imagis,ist3038c bindings. Signed-off-by: Raymond Hackley --- .../devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist= 3038c.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist= 3038c.yaml index 77ba280b3bdc..2aea21bfe6ac 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.y= aml +++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.y= aml @@ -15,6 +15,7 @@ properties: =20 compatible: enum: + - imagis,ist3038 - imagis,ist3032c - imagis,ist3038b - imagis,ist3038c --=20 2.39.2