Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp126935lqq; Wed, 12 Jun 2024 19:57:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7BQcCgmBIb6H7YgLAEC7KtW4Tnc+FGmjfjS5XGw5wi4rFEzqsqZm12ZMke3O0DhmBKBI+p4ay8OAScskFbxM2snAcTUBkh15cnsimwg== X-Google-Smtp-Source: AGHT+IEtZOkpBfmODnR7cnCCe+77MRsjNWIOTWP6a3lJtsoPZyCcNnRTIV3GSpXEfH4mn7/cW0K5 X-Received: by 2002:a05:6214:4508:b0:6b0:9280:7700 with SMTP id 6a1803df08f44-6b1aed60629mr42420336d6.61.1718247445741; Wed, 12 Jun 2024 19:57:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718247445; cv=pass; d=google.com; s=arc-20160816; b=FDNSTWPCjpmVSHzKmbbZMD6se1WWwa26MFibpEW4DIEsWkt3AvXXZaR420fq7HQGMi XpVc8ZPD+dqyYREtWD1VceaGfu8VdH5vz8yLbNp2CB657jrfCrOVyLxGku01yArzsbyz SQS7YIHJy2J+Vweek8xjD6F98TUYI2MpzYAr9msYH+Bb+Hrfdef5GToFIXgkW4MsOoE2 c4sx2dC1DnYk3vF5Wl5rb6xgy9tuuzIWkQ1EyANvWMYETzuqfuW1IzYMrLPOvg+Wj6lP kSjjSjK/2lkCJUyKiRJ8OjLd7CIq0KzyhwR+y43zh2Bo99Nm7NmZUmJfcZ83RYaYAjvo XE/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=f0f6wp31zL2RwkHRjXOVz/EH4HhEHMCWvKWESd4pTcA=; fh=vbaZ37OneDKmGgFkyZcXNDAABBQjl6F5iHgrhTgZ25U=; b=o1tVMTMFBiR1KtvmsqBmhIFqEOqNAU0F7T4Inmpq2dVTC6E5NJjPomUz6qv9x33MHc XsRfjCHqZnQGwydqXVZvA31MY9tBEY8KDj1ng8jqfWsskaBUULHb64bkqtb4xY0ObbA2 7zXd/ycvzykqU02L/eTQRM7TLcawOqp9P8AkLBenndEExrKdLJF0fcpaWZfLURUrd4Hv ZHV+Fbt5gQGLqKzeBXUhGfQcje6GQgYXtLz8kcwB9Fd+5gz2rIZ0vyfoklLeNH9J3NtH H7I2KaflMSZnu4ueTusn30PIHuxlm7x7uU1eO4VGIK7cpSjLL+j3u9eKh0gWlHPAdkoS 6vqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=r+lqTVY7; arc=pass (i=1 spf=pass spfdomain=protonmail.com dkim=pass dkdomain=protonmail.com dmarc=pass fromdomain=protonmail.com); spf=pass (google.com: domain of linux-kernel+bounces-212506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212506-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5b8323esi5177286d6.535.2024.06.12.19.57.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 19:57:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=r+lqTVY7; arc=pass (i=1 spf=pass spfdomain=protonmail.com dkim=pass dkdomain=protonmail.com dmarc=pass fromdomain=protonmail.com); spf=pass (google.com: domain of linux-kernel+bounces-212506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212506-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 75C261C214D0 for ; Thu, 13 Jun 2024 02:57:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 352B112D1E9; Thu, 13 Jun 2024 02:57:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="r+lqTVY7" Received: from mail-40141.protonmail.ch (mail-40141.protonmail.ch [185.70.40.141]) (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 EEDD112CD8B; Thu, 13 Jun 2024 02:57:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247438; cv=none; b=Rc48VVEfo7aFNmsmedkljQ4CKVgt+oi/8yAy2mxFVdTgIfoctVjd0AGatYKkptqP/DWOGIWAyeRPab7qfkhhex3thSGAiyAnFZbMaRMzL1R6badscDxap8ljKciW730kNNbxM02AIJ0WYtmqDdGlsQ0xJHzbF0iQOp+HLY72NW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247438; c=relaxed/simple; bh=f0f6wp31zL2RwkHRjXOVz/EH4HhEHMCWvKWESd4pTcA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lCVw9oYmajsgdOCYkcV8wHQNIY/s5yUld7ukhJXK23Rpqq6219t07Lo6osZZNjbwNOMOqf3mzZmAVPadvAPOzPrj0Nc/xT7Dddj+/9qiQ6cisycrMAjNy7zI2R+j7nVVK62FZ471Iwo2XImBhw3DIWiyOU2D7Fj1gAuW/82fYqw= 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=r+lqTVY7; arc=none smtp.client-ip=185.70.40.141 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1718247435; x=1718506635; bh=f0f6wp31zL2RwkHRjXOVz/EH4HhEHMCWvKWESd4pTcA=; 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=r+lqTVY7WHJsHcd3KfQF7BiczX9O3mP903LHB6xgqzmvbsiDZ2CcNtWGmAIRpmze0 78ZbJaCCO0BUC1HglrvpRBBFmJMHYObdGg7pmxCq9/ihWFBdKWzef/RuJ/UXApPBC6 qf+oZ2LLg/bDCFgtmoOq5YT+qESseW8BOFp3VTfF9F0MutckXsoFBBUp4xWWvqnKgF 7O9czbvgthXt4JmtaRpwKJX4HW27i8452qiONCA/8f+ctuWd+B5sOMSZKLKal3xMQV MSWCV90AtLThim8oW+msHS8L5kn6PKDTMaq4K6gHUsRnAO4MC409A6vda5jco23EAz LPp5zDniodh0A== Date: Thu, 13 Jun 2024 02:57:11 +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 v2 3/3] input/touchscreen: imagis: Add supports for Imagis IST3038 Message-ID: <20240613025631.5425-4-raymondhackley@protonmail.com> In-Reply-To: <20240613025631.5425-1-raymondhackley@protonmail.com> References: <20240613025631.5425-1-raymondhackley@protonmail.com> Feedback-ID: 49437091:user:proton X-Pm-Message-ID: dbec9617af97a207be017b2482ca9ba7250f143f Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen= /imagis.c index 886bcfc8497a..aeabf8d057de 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -12,9 +12,17 @@ #include #include =20 +#define IST30XX_REG_STATUS=09=090x20 +#define IST30XX_REG_CHIPID=09=09(0x40000000 | IST3038C_DIRECT_ACCESS) + +#define IST30XX_WHOAMI=09=09=090x30003000 +#define IST30XXA_WHOAMI=09=09=090x300a300a +#define IST30XXB_WHOAMI=09=09=090x300b300b +#define IST3038_WHOAMI=09=09=090x30383038 + #define IST3032C_WHOAMI=09=09=090x32c +#define IST3038C_WHOAMI=09=09=090x38c =20 -#define IST3038B_REG_STATUS=09=090x20 #define IST3038B_REG_CHIPID=09=090x30 #define IST3038B_WHOAMI=09=09=090x30380b =20 @@ -25,7 +33,6 @@ #define IST3038C_REG_TOUCH_STATUS=09(IST3038C_REG_HIB_BASE | IST3038C_HIB_= ACCESS) #define IST3038C_REG_TOUCH_COORD=09(IST3038C_REG_HIB_BASE | IST3038C_HIB_A= CCESS | 0x8) #define IST3038C_REG_INTR_MESSAGE=09(IST3038C_REG_HIB_BASE | IST3038C_HIB_= ACCESS | 0x4) -#define IST3038C_WHOAMI=09=09=090x38c #define IST3038C_CHIP_ON_DELAY_MS=0960 #define IST3038C_I2C_RETRY_COUNT=093 #define IST3038C_MAX_FINGER_NUM=09=0910 @@ -397,9 +404,17 @@ static const struct imagis_properties imagis_3032c_dat= a =3D { =09.protocol_b =3D true, }; =20 +static const struct imagis_properties imagis_3038_data =3D { +=09.interrupt_msg_cmd =3D IST30XX_REG_STATUS, +=09.touch_coord_cmd =3D IST30XX_REG_STATUS, +=09.whoami_cmd =3D IST30XX_REG_CHIPID, +=09.whoami_val =3D IST3038_WHOAMI, +=09.touch_keys_supported =3D true, +}; + static const struct imagis_properties imagis_3038b_data =3D { -=09.interrupt_msg_cmd =3D IST3038B_REG_STATUS, -=09.touch_coord_cmd =3D IST3038B_REG_STATUS, +=09.interrupt_msg_cmd =3D IST30XX_REG_STATUS, +=09.touch_coord_cmd =3D IST30XX_REG_STATUS, =09.whoami_cmd =3D IST3038B_REG_CHIPID, =09.whoami_val =3D IST3038B_WHOAMI, }; @@ -415,6 +430,7 @@ static const struct imagis_properties imagis_3038c_data= =3D { #ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] =3D { =09{ .compatible =3D "imagis,ist3032c", .data =3D &imagis_3032c_data }, +=09{ .compatible =3D "imagis,ist3038", .data =3D &imagis_3038_data }, =09{ .compatible =3D "imagis,ist3038b", .data =3D &imagis_3038b_data }, =09{ .compatible =3D "imagis,ist3038c", .data =3D &imagis_3038c_data }, =09{ }, --=20 2.39.2