From patchwork Sat Jan 20 19:11:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 189759 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1770669dyb; Sat, 20 Jan 2024 11:21:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOYYtCDge5b0pYzW+Z7qxyD5xwEPzeSHLSBb2CxuPlZZobrmPM8IFcAJ/WgQg1Hr8Mwk2E X-Received: by 2002:a05:622a:86:b0:429:ccec:af20 with SMTP id o6-20020a05622a008600b00429ccecaf20mr2684416qtw.35.1705778500180; Sat, 20 Jan 2024 11:21:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705778500; cv=pass; d=google.com; s=arc-20160816; b=nMc8HZ76f4l3N5pgS8dzzbj7P24vvFeYC1wK41MUDlu4SjOq1MCLX/FwxZj9XOTpAd HVHDUM545t1vVWbDpJ60oyNk4hbE2LQNBUweA2NU42Vz4tqowKrPvQpvR1mqsIrCqKSz uK5lc5bgh/jhL6/NZK6aBv/CQqEB3V2SPhIs+d3jDi9fNmQ8KYv6DMlqKm+aeCZFimr8 R91oihe0JFTCi9LEpS2o5NZ38a4SF5QfwKajE1ohtkovH3aRn1PnR2q3K5dI6Hf8oyzj bxt8xjfj16+rQtzVZ0hcuck0xCpwuJ65huZwhYdyU2ON4Ejz/K+MTiQRlq/0b8fBO59I 5iBg== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4HCW9YBPmcsH6XFypSoaa73HChH/KfPfLJleih85h4c=; fh=qBviB55ulkYowo8GnpCvTPRdp0iITrK7Dolt7tp1g94=; b=UP0oExgr4wnocLr1yvydZ4CJdo9mfCEgSM80QCgE8qX+o4TuZMevfAlDQrzj+vawb1 F9UVVMlM7g5jpRYh2MjDQgyZ3V3xi8Sz/mw5a3yfQMZTe8/0ik/ZiwrFFpn7RjkoXfHN s9ApWYRFDTxIgTMAJPASwG2CN1nuPoY8ARHTd8hY7O3Es2moSdLM6WOANUnPnFJpZNpW gjQ7PbtGF1hkNjkWgi+OkpB4XINbO3kSZxW1S/daArKgM3YsNAknU5SQOsgDmQelkKXv 40n9NWMddapcCZOG7L9jx2vDmIfgSMguB40Cq6g0QakXfCwbdAo8ncSqKf6XYDzjllpO SH6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=j1xTB9rk; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31882-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31882-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l20-20020a05622a051400b0042a220f0cacsi2105851qtx.650.2024.01.20.11.21.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 11:21:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31882-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=j1xTB9rk; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31882-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31882-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz 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 007C61C2112D for ; Sat, 20 Jan 2024 19:21:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0881C14F6B; Sat, 20 Jan 2024 19:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="j1xTB9rk" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (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 2DF8F1078D; Sat, 20 Jan 2024 19:20:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778434; cv=none; b=TIcoS92eHXlmtp3MwbIdy8aR5E/TB1U/dsQ1M3mrR6cQ4wm1xsi3VmbQjzYpnVgoEYagZ+G3JQDpJnCwpwhftdcpVp/QGSN7eFQqqDGTsVe6n8pNgYuvhTjqobJ2v2wlzctQEP80YtwJ++MjQyXANxyDb9VcgMBq7dJ38yqCVaI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778434; c=relaxed/simple; bh=lbgvZZ+jq9gybgJnb0ibUvNKN58JqyZYhdnzv9MmZtg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d/MBm1A/FlCvut/LySN9MV/mQjc4t1AUmzUPObNFir8H3Bgc76kjW4hEs/CQXC1FogYKT11Ot3oGi/Z1VL/0oGHVTj7jmOsTpZ+CVVzmcWJGYq6mXqj3WAWYMYdCqLuOQci5DrFG5HJCwKHX5yRMgAnO2wahtd4uiiAu1HhrmZE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=j1xTB9rk; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 2B44B283BD2; Sat, 20 Jan 2024 20:20:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1705778429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4HCW9YBPmcsH6XFypSoaa73HChH/KfPfLJleih85h4c=; b=j1xTB9rkOy3HnnDbQ4D02+SJlqP+woDc5iyjVEtx/LKWtRSXEwurFewmdejXUzlKFh3VWX vXwDqHLRtfyPojYAtmG5RlTIBitZm7GBvKq2FneHMfGZ5cRpXDkNeM5zn4ShkEi2ZzqccK 7+2Waf8qgZND0M2GeUeg8R4qkxmpaZ4= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 0480C4577A2; Sat, 20 Jan 2024 20:20:29 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: [PATCH v4 1/5] input/touchscreen: imagis: Correct the maximum touch area value Date: Sat, 20 Jan 2024 20:11:12 +0100 Message-ID: <20240120191940.3631-2-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> References: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788638396844543757 X-GMAIL-MSGID: 1788638396844543757 From: Markuss Broks As specified in downstream IST3038B driver and proved by testing, the correct maximum reported value of touch area is 16. Signed-off-by: Markuss Broks Signed-off-by: Karel Balej --- drivers/input/touchscreen/imagis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index 07111ca24455..e67fd3011027 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -210,7 +210,7 @@ static int imagis_init_input_dev(struct imagis_ts *ts) input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X); input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y); - input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); + input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 16, 0, 0); touchscreen_parse_properties(input_dev, true, &ts->prop); if (!ts->prop.max_x || !ts->prop.max_y) { From patchwork Sat Jan 20 19:11:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 189760 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1770804dyb; Sat, 20 Jan 2024 11:22:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEg925DFHTdNjufCWVuaJauB6ODJ9LgQ8rE4s/YS6tEQyu3tRtUhIubGw1eBGGvWn7u8YaW X-Received: by 2002:a17:902:e74e:b0:1d4:42aa:fe6b with SMTP id p14-20020a170902e74e00b001d442aafe6bmr2549550plf.132.1705778521682; Sat, 20 Jan 2024 11:22:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705778521; cv=pass; d=google.com; s=arc-20160816; b=atj0PFU6h8DfXFD/kNK8uVpBA0/7W9a6ulBOFRqWL97Oo4dCgJ73AA0N/oHRQ2ouVJ OaTKkpeRcGc/qoNeLyMvHK1Kr03SZ2qiJ8tlkqyik5evRsoErM9qDHsC0NSsfyH9vN5q UyR1ooF9l7C3BDKrAh3cNLcHovrIXb4VrFeqRqlQFFLtT5jT4coe0s6krm4CJ8PRo83c AVqiwEJjMOtNs3tDcekuNorsi2/CutJKzcB8Jvn5mXrjIQVNU1UpbCaFffaSi2Z5I3+r +5a8PvwqXon2F2+HvPLV0YGNGJ0bUSm8PmOPvS/lyQ4ckG4cnYAT4PE2wIMhZI+Dn+u8 wc1g== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/dID/rk5TxJzyZNl6L5pM/cORYDEDnsW7lNaq9RdHVg=; fh=qBviB55ulkYowo8GnpCvTPRdp0iITrK7Dolt7tp1g94=; b=FEDr+Z5ABvnmF/Q7r4xZXNSUR8OZcl1oe/6nrPIsZFQ7PBFY4LXWFG0YWL83DG9htZ JA0tmFkew5EQtXJxDCY41/ok84wNsoDfQ0XYOIj2F4iKsVju8q28k6wmF58M+G8JH0pI veO3mTBgKF3gyFCuhTjTFoy8oHfI/933PCIX5s7mLhyru8ujYQu9Yok7vhQmw94JfWHR d3DJVAundU1kopeLp6s7YMcjwpxeIWAc5ZIVTdn2VkP2tbzuBmdr0UD9WnupgyPbv1fw 6Qy/k4cVeWrp6SVU1rIf7sJsClWDC0HegV6WPUwr147xVCc+32yyPXsBPORWF3vQZA3H Jl+Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=ffiZwZuL; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31884-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31884-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c15-20020a17090ad90f00b0028db66f9ae9si5479786pjv.84.2024.01.20.11.22.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 11:22:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31884-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=ffiZwZuL; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31884-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31884-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 702352810F3 for ; Sat, 20 Jan 2024 19:22:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4FBF156CF; Sat, 20 Jan 2024 19:20:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="ffiZwZuL" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (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 06C5F11CAB; Sat, 20 Jan 2024 19:20:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778436; cv=none; b=UE0ocLP4aOlrTg1As3d9C4F4yRiPz0VAVb+Uks2zDkij1nMa+9HIGZLLif8TXMPULmZ16b7AGYHdZAepukGtAXoEJr2B7Ct5ufMaKSI3rm8ttECHre+EOx+vRia3OM5PTQWB9IwbD1rkm/7b837unr4+EWzg4SBlzcIcrFGvrM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778436; c=relaxed/simple; bh=v1KSwid17+YZwnEM/2QMXL0rKb4tz5sf2ADmZFvSaR0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oqujQQdG6xLygEoHYU9TRGLK35iqZSLh8HXACmph6PF2RhQ8BQIf4ar7eQ58AvRXQqOPK1+Ed9JI/H4NFGHa2Ga7mIp3RErhMN6CfwtkNcVCQZdENC+yOKjWzFykAie+ik1UWkFa+YA/m70McZVXfbbfeIfpTsUT/GUgl/trV10= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=ffiZwZuL; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 1E87F283BD0; Sat, 20 Jan 2024 20:20:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1705778432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/dID/rk5TxJzyZNl6L5pM/cORYDEDnsW7lNaq9RdHVg=; b=ffiZwZuLCixy2om0avl2RKoU6vC2NElWb/lW0IS+6Soju9uVAPNBS4mDsag9bkf3eKmGqd ZMAXgU7372lWKijwq1KxcMA5Ys40xkx68S0THkMPM8VMmr9qrFhvL7lW3YKUXgNOdgbdjf wyUen0bxlCSUcdCZ++DcUMk9ow5r/bg= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id EDAFF4577A2; Sat, 20 Jan 2024 20:20:31 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: [PATCH v4 2/5] dt-bindings: input/touchscreen: Add compatible for IST3038B Date: Sat, 20 Jan 2024 20:11:13 +0100 Message-ID: <20240120191940.3631-3-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> References: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788638419157945516 X-GMAIL-MSGID: 1788638419157945516 From: Markuss Broks Imagis IST3038B is a variant (firmware?) of Imagis IST3038 IC differing from IST3038C in its register interface. Add the compatible for it to the IST3038C bindings. Signed-off-by: Markuss Broks Acked-by: Conor Dooley [balejk@matfyz.cz: elaborate chip differences in the commit message] Signed-off-by: Karel Balej --- Notes: v4: * Mention how the chip is different in terms of the programming model in the commit message. * Add Conor's trailer. .../devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml index 0d6b033fd5fb..b5372c4eae56 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml @@ -18,6 +18,7 @@ properties: compatible: enum: + - imagis,ist3038b - imagis,ist3038c reg: From patchwork Sat Jan 20 19:11:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 189761 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1770925dyb; Sat, 20 Jan 2024 11:22:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPg7CPH3DJYimgQSDU5WTc2NhzILBB3xfVws7rwKmM1RYibkYj1PJwWKHatGZd8VxS/8TA X-Received: by 2002:a17:907:8e07:b0:a2f:8533:af7a with SMTP id th7-20020a1709078e0700b00a2f8533af7amr1079286ejc.32.1705778545178; Sat, 20 Jan 2024 11:22:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705778545; cv=pass; d=google.com; s=arc-20160816; b=hKWf2JEBM3L74eZUnHHCzzkmOmudv9IXJiLXFh2Or6BuwZLK5BcDPga85vN5FP9rqz 7KNLrygmvYjWyobeIJ+1IZvB8VDrTBiY9xWa5Lg/pv7+nMqo+wKOU0AHFxk/8ArQ7PcZ VYh9wO6k9sM7yglmPlTn3oXFJ/MBwZBB+B5g5EdEa3YWPnsd/hChULd6zSzd/zGomSAy UF8n7yiT0/Tkn05VCNdvDHZ13AWq9TER0ZSjc4Nj2NlMqniUDt8BysB5UqDOHxdS+hY5 6rG0B8xe1ieNJf4jLxyGpMm+OBzx3aNdYtQVagBqTBxOr7E47cYyuai7CyzCbDdBrRFg HGrw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=r8Fl1BS1ZRv2Q4mLx2dPAnLNVhhtO3Udm/uijuW0OKE=; fh=qBviB55ulkYowo8GnpCvTPRdp0iITrK7Dolt7tp1g94=; b=GoBph1XILDIQiUyJsBUiN5P8diziZexxGbX6OHBZODM+809vQTw/Q21BYIVd/9PrwN i0qBazSQT0M+Eo8UEuvi2kXDlM5AawtgtvHVice99ObpcNjxEXbsHSf0mi2shnNxy8oe frZt8Nfs3RJVJnzWOV88soMKh4nfrQiwj0cnL0byKoYn3wC8iqN8HOeOW2icuTEqcH+d IkouofkXrAdBUUXJQqrhBRZjtYyCrblN0siWayKDPIvRGbqmitmjU8eBVD2tAJN8XBAe kQiZ9gVCjAwaG1QtRxW4LwtDqWYieHl66QykDrh7NUgwVchmQhEEaJ3VZ3Qt2/85CK2B 3fGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=ZLLS2lva; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31885-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31885-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ks12-20020a170906f84c00b00a2ccf7acc62si8100421ejb.194.2024.01.20.11.22.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 11:22:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31885-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=ZLLS2lva; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31885-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31885-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz 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 am.mirrors.kernel.org (Postfix) with ESMTPS id A2B071F20FE2 for ; Sat, 20 Jan 2024 19:22:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1476F15AD4; Sat, 20 Jan 2024 19:20:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="ZLLS2lva" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (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 080B814267; Sat, 20 Jan 2024 19:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778438; cv=none; b=Y+JQDk+RQve40GvH9kvigAvcyKQ24xXqyeKbgqyjyv8ITLJHZF5KuKjS5UL/Jt86ASQbFDNkylnRfJ7N3hne+Sosd/jbP5uC+7xdk+CZtJaRxAkJgu0JX7KhPSia09gwke0PWCq8oeMJ+e1uMd1AC9jHukkJev8ocISSg54dCak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778438; c=relaxed/simple; bh=yvnRCMqZFZdIsvGy7aZk2DqJQpjiCQS9e9ZHAr+AJjY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bP+4JwJASfb2oXAGVVQq79g7SwDWufRVupG7sQhPAY01BG02wZOb+qayKJXSxa4UgsmzrbAjCFdtDeFgNTY4VkdGQAfahhRXpLwAUSD1EUtZrSpg6mYGAtAVyjYCvl1xzsRKrpn/qazQZCcIuIKuyE0aX0o5+gaHEYhBkmOeod0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=ZLLS2lva; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 2D7A6283BD4; Sat, 20 Jan 2024 20:20:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1705778434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r8Fl1BS1ZRv2Q4mLx2dPAnLNVhhtO3Udm/uijuW0OKE=; b=ZLLS2lvazFlPV+lzfwcVMH+1cWj75T5jaGEIug2OsfaYs+2hCen3RbLA7MPOxAQx8Mbul6 pupIVyv1LSr+M8wKOIIH67a71vLgTjkqEZR83qGd/AtUOKAx/1e2uG1sjrvxo6d9Fs3oV1 bXiAEoFky6D8t38uLvWqqAnCjn4P1Sg= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 021144577A2; Sat, 20 Jan 2024 20:20:33 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: [PATCH v4 3/5] input/touchscreen: imagis: Add support for Imagis IST3038B Date: Sat, 20 Jan 2024 20:11:14 +0100 Message-ID: <20240120191940.3631-4-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> References: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788638443976194999 X-GMAIL-MSGID: 1788638443976194999 From: Markuss Broks Imagis IST3038B is another variant of Imagis IST3038 IC, which has a different register interface from IST3038C (possibly firmware defined). This should also work for IST3044B (though untested), however other variants using this interface/protocol(IST3026, IST3032, IST3026B, IST3032B) have a different format for coordinates, and they'd need additional effort to be supported by this driver. Signed-off-by: Markuss Broks Signed-off-by: Karel Balej --- Notes: v4: * Sort the definitions in alphanumerical order. drivers/input/touchscreen/imagis.c | 58 ++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index e67fd3011027..9af8a6332ae6 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -11,9 +11,13 @@ #include #include +#define IST3038B_REG_STATUS 0x20 +#define IST3038B_REG_CHIPID 0x30 +#define IST3038B_WHOAMI 0x30380b + #define IST3038C_HIB_ACCESS (0x800B << 16) #define IST3038C_DIRECT_ACCESS BIT(31) -#define IST3038C_REG_CHIPID 0x40001000 +#define IST3038C_REG_CHIPID (0x40001000 | IST3038C_DIRECT_ACCESS) #define IST3038C_REG_HIB_BASE 0x30000100 #define IST3038C_REG_TOUCH_STATUS (IST3038C_REG_HIB_BASE | IST3038C_HIB_ACCESS) #define IST3038C_REG_TOUCH_COORD (IST3038C_REG_HIB_BASE | IST3038C_HIB_ACCESS | 0x8) @@ -31,8 +35,17 @@ #define IST3038C_FINGER_COUNT_SHIFT 12 #define IST3038C_FINGER_STATUS_MASK GENMASK(9, 0) +struct imagis_properties { + unsigned int interrupt_msg_cmd; + unsigned int touch_coord_cmd; + unsigned int whoami_cmd; + unsigned int whoami_val; + bool protocol_b; +}; + struct imagis_ts { struct i2c_client *client; + const struct imagis_properties *tdata; struct input_dev *input_dev; struct touchscreen_properties prop; struct regulator_bulk_data supplies[2]; @@ -84,8 +97,7 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id) int i; int error; - error = imagis_i2c_read_reg(ts, IST3038C_REG_INTR_MESSAGE, - &intr_message); + error = imagis_i2c_read_reg(ts, ts->tdata->interrupt_msg_cmd, &intr_message); if (error) { dev_err(&ts->client->dev, "failed to read the interrupt message: %d\n", error); @@ -104,9 +116,13 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id) finger_pressed = intr_message & IST3038C_FINGER_STATUS_MASK; for (i = 0; i < finger_count; i++) { - error = imagis_i2c_read_reg(ts, - IST3038C_REG_TOUCH_COORD + (i * 4), - &finger_status); + if (ts->tdata->protocol_b) + error = imagis_i2c_read_reg(ts, + ts->tdata->touch_coord_cmd, &finger_status); + else + error = imagis_i2c_read_reg(ts, + ts->tdata->touch_coord_cmd + (i * 4), + &finger_status); if (error) { dev_err(&ts->client->dev, "failed to read coordinates for finger %d: %d\n", @@ -261,6 +277,12 @@ static int imagis_probe(struct i2c_client *i2c) ts->client = i2c; + ts->tdata = device_get_match_data(dev); + if (!ts->tdata) { + dev_err(dev, "missing chip data\n"); + return -EINVAL; + } + error = imagis_init_regulators(ts); if (error) { dev_err(dev, "regulator init error: %d\n", error); @@ -279,15 +301,13 @@ static int imagis_probe(struct i2c_client *i2c) return error; } - error = imagis_i2c_read_reg(ts, - IST3038C_REG_CHIPID | IST3038C_DIRECT_ACCESS, - &chip_id); + error = imagis_i2c_read_reg(ts, ts->tdata->whoami_cmd, &chip_id); if (error) { dev_err(dev, "chip ID read failure: %d\n", error); return error; } - if (chip_id != IST3038C_WHOAMI) { + if (chip_id != ts->tdata->whoami_val) { dev_err(dev, "unknown chip ID: 0x%x\n", chip_id); return -EINVAL; } @@ -343,9 +363,25 @@ static int imagis_resume(struct device *dev) static DEFINE_SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume); +static const struct imagis_properties imagis_3038b_data = { + .interrupt_msg_cmd = IST3038B_REG_STATUS, + .touch_coord_cmd = IST3038B_REG_STATUS, + .whoami_cmd = IST3038B_REG_CHIPID, + .whoami_val = IST3038B_WHOAMI, + .protocol_b = true, +}; + +static const struct imagis_properties imagis_3038c_data = { + .interrupt_msg_cmd = IST3038C_REG_INTR_MESSAGE, + .touch_coord_cmd = IST3038C_REG_TOUCH_COORD, + .whoami_cmd = IST3038C_REG_CHIPID, + .whoami_val = IST3038C_WHOAMI, +}; + #ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] = { - { .compatible = "imagis,ist3038c", }, + { .compatible = "imagis,ist3038b", .data = &imagis_3038b_data }, + { .compatible = "imagis,ist3038c", .data = &imagis_3038c_data }, { }, }; MODULE_DEVICE_TABLE(of, imagis_of_match); From patchwork Sat Jan 20 19:11:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 189762 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1770979dyb; Sat, 20 Jan 2024 11:22:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IH919wwR6vfpU6pe1mEBLF9S0bWTLhgrkTQLHY4aTc+1Vb2FuttNZhXIpRLy9LJOuFXnnLy X-Received: by 2002:a05:6214:f6c:b0:685:c584:6e8b with SMTP id iy12-20020a0562140f6c00b00685c5846e8bmr1303792qvb.0.1705778556223; Sat, 20 Jan 2024 11:22:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705778556; cv=pass; d=google.com; s=arc-20160816; b=rVuzk4hcNfNbxUxarhq5/EBz3TNZC1OwwiywJU/sEXc9udMAE5GCpY9z9964PpvUx7 054rxkHatXuDp6KB5CInewek/qWh+36C1OMqVn7z8gyd+Myjj1l/zI3C1D2TKrKrfqLv rp1y4DBg9C0m5xfiKnfkjSzn7JEl84MdWk7+2AqjMj9NwsZlIDf82R/eTdm2XBbVK0b7 xTi0cnG9j5ZQtNsnZ6PC579QtHLFDqv3CvpA5OGqOh4+3LAfyhX+M3dcWLuT0jjnyLaw vy22JNnMUgbHlYABih/R5W3vpyS4UjoQbLO2YoqiZ0qQVuP74hmRH9K7PxU55KZf7h46 DlUw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4U7NZntIgsai+sVAztcP6Q/zXpVehELNTBE/Azi2els=; fh=qBviB55ulkYowo8GnpCvTPRdp0iITrK7Dolt7tp1g94=; b=pK/vP7L5o1hDozL0G3KDoDaHA2JV9Rt9c6xfYI39jXJej5v+dLXccGHHVtcPtvdFoJ n9DD7ygGoMT9UfGAgSi6wEs9t/wY0J0UNS4yiC7z8iFKxcE1Vqvri7c/66Z73eyeUY+K TfZ09f1MPtFXzgHCUBULx2bpn4bvV0vMA0JGK6XfR6LEERQTysupPb9cAdvMtB/Xm9zn i9NUZwQ0ULZNO82wSA+s3euH4nHpxPrEuOaViUbn4aQpNzZo8tyQClfPnBY1WAVecUh8 EtCK9Odsze1GnwFmZyYS3en1V3BqdxdS5L11s/p0VfAF87RQTop2jLrcVT2NtO6KgNNF r18w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=FrNdaZvP; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31886-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31886-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u16-20020a0cb410000000b0067f7b1f8f34si2184949qve.242.2024.01.20.11.22.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 11:22:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31886-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=FrNdaZvP; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31886-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31886-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz 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 0B27E1C211A7 for ; Sat, 20 Jan 2024 19:22:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3701515E97; Sat, 20 Jan 2024 19:20:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="FrNdaZvP" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (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 DB9D2154B2; Sat, 20 Jan 2024 19:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778439; cv=none; b=Rv/KPLIyYy7FF4yVhNnA+9d+RN1FpTOw5AvTxZ9BBn8DSr7qk1jOhO2hR9pwyGUeNFLr8p7NUokvL6mweFMcUZs8flgVhn8Tlx+GKO33+DjRXJe+oLRON3pqnh7NoHE0Vq1K7Cw3H9TFP2eeEhq5EH5wbSEkml3WFYA0uegDwHw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778439; c=relaxed/simple; bh=Fw4+Qx/UzZxbIraZPU8RA8tsEt1yKuD7H1frw4FQSm4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bjQe5fvJmsY14rA5xGfgWMoWU+EhIZs4nTOQWXjbx1fIf0CjpfWkdBqaixwgdbtuVrDpOu6Qc8blYNErTV08JPN3LuF3ZCb+eWpTQXUhw9rXJm7slvGxPHdj0F8woY1rdThjCDg8/GoueL9K6UE0+q/ldsfB04URPHNIOeCgvj8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=FrNdaZvP; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 35061283BCE; Sat, 20 Jan 2024 20:20:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1705778436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4U7NZntIgsai+sVAztcP6Q/zXpVehELNTBE/Azi2els=; b=FrNdaZvPRb4vzpUgOivqOU3vkE+a7rzRFBa15ZOnCVAKks9STpUwCkKGJtA2/mYJttT3mx 7bdeHqf4JHp/UbLDHwyGtitVZlDk9Uo/RpS534nykudHEbDmNrNU2ViVaPDjrdN5HB5y2i mgoSGQGSvg7ZEClqFvJO6UPIG4TkqBU= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 116C04577A2; Sat, 20 Jan 2024 20:20:36 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: [PATCH v4 4/5] dt-bindings: input/touchscreen: imagis: add compatible for IST3032C Date: Sat, 20 Jan 2024 20:11:15 +0100 Message-ID: <20240120191940.3631-5-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> References: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788638455375665758 X-GMAIL-MSGID: 1788638455375665758 From: Karel Balej IST3032C is a touchscreen IC which seems mostly compatible with IST3038C except that it reports a different chip ID value. Signed-off-by: Karel Balej Acked-by: Rob Herring --- Notes: v4: * Reword commit description to mention how this IC differs from the already supported. .../devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml index b5372c4eae56..2af71cbcc97d 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml @@ -18,6 +18,7 @@ properties: compatible: enum: + - imagis,ist3032c - imagis,ist3038b - imagis,ist3038c From patchwork Sat Jan 20 19:11:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 189763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1771073dyb; Sat, 20 Jan 2024 11:22:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNGB2X/1Dl+xFzT2Jnr8+jYCgob/nCPeGSKF3onnq1JbfjNgfOWamwX2xWqjSJ+PTL7eD0 X-Received: by 2002:a05:6a00:21d3:b0:6db:d1b4:1b27 with SMTP id t19-20020a056a0021d300b006dbd1b41b27mr1438998pfj.4.1705778569233; Sat, 20 Jan 2024 11:22:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705778569; cv=pass; d=google.com; s=arc-20160816; b=vUPNbcfzRv9CY1dgp0dig6DDIPubqgh9kkVyJYwlwRFUF810XLVjqc62v/BiiEuSub ttrw0LuI1Y8g2yU8DDggL+4+eT8ZTKAGKMwrLVGcS23dj9UTGH41SM0FvY1CKMk/zlrP YiVVJEe0DkoXx/xQ7fuhG5M2T4H2vl5uR6opYIJxwZ/+Sm4PK61P7HeurfHfq9C+33/E 9QimgmkZvqY5fd+8eKQxrJUc+qvLH37IaVRFK7jQHuQ5VGNmGN69PxJJwTtsGWBivOZC todeiKDXLKr7fD9GU/2UdG98TAJ2jYlg5eo5k+inZ5sNcsjNy1NXU3Z7S1V4YvTdH9fi ak6g== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6nlJhh70C00O21KEiXe3q4atmWqeoTlQakU5+W4UbXg=; fh=qBviB55ulkYowo8GnpCvTPRdp0iITrK7Dolt7tp1g94=; b=wRIHYskiMRRVyh5wReqsEqLQrYuQQx7nqjnouDI42R2MyBe9Mwtkru01GKhaO2tZ3K LXt4p5uBmb+Vwwii5UK18ROSbRHcf3TLgFx94gc5NJn8m6bFYfGzxUg4lU172HjuBVmd qUdvALPtSycdrSx9zA7mVPY59Ign/W4T0rTjvvvG9huazEvDva09PxXeEe0VRKScGQro c24j1lC38iOBEkVW9+etR9BdML35h0+1nx7NTQmWy1FYn+l61c4wB0sODZ/TSKtAeb1W A7A77XCy9xT1AyHnSAqzpLomwc9Wk/8s64I8x5G1VfohW0UvGHuMV2tBiKgx7ELOtCbz +ujQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=fVQbIPe8; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31887-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31887-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 32-20020a630f60000000b005cd8b5dfe9csi5555496pgp.491.2024.01.20.11.22.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 11:22:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31887-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=fVQbIPe8; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-31887-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31887-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id EEC6A281373 for ; Sat, 20 Jan 2024 19:22:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57162171B2; Sat, 20 Jan 2024 19:20:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="fVQbIPe8" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (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 25576156F9; Sat, 20 Jan 2024 19:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778441; cv=none; b=i1IMt5xXMJ4VMFru8ujl5pD2IkeRZAx/xRgj1hOR1VnpBTkIeC+HASwlVkKn28vX/qjp4vvosyxDNmEQCJQDktQl2F1XEXqT03tXo7U+utLXlC2pqjW7025xZXmBHpnJcKwHuZA/OL+CoHBc1YgsXRoZP+kxvk45AMeIGxyEIPE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705778441; c=relaxed/simple; bh=rotx75+PNUiB1nrwnnm5GeKEE0xMiosHZsyowbNUlYQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a6hIiGbV7KIUPhUnLZtn53iCp7SnVn52NJw+E3Mfwjqny9afFcbk67ZiigGxavi/gLYg+NPuJlNEwgcwTlHHHgjDZNj2U8yQwCgtqZt0QYBcktlxRN02Xk1UoZC8c/7IcwY1M4odJKlxnPtqhHleObkwiUHPNIkK26u4SOwR6Co= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=fVQbIPe8; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 6ADAD283BD2; Sat, 20 Jan 2024 20:20:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1705778438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6nlJhh70C00O21KEiXe3q4atmWqeoTlQakU5+W4UbXg=; b=fVQbIPe8bBa3vFCKFSFM+y8Xcfnt7UrQgKqhGyFF0gokt6IBGpoy/LZDfil+n9BQdewzD2 p7cwh3g8MEwH58XYXbb3/UBGc9TZE4rTXJhc0iaFHaV2wJZo5bqTcwLwkkd2oKSOARsI92 KGk16wYfZLQ1dr/2qHXXnUi5ShsQRI4= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 43DE34577A2; Sat, 20 Jan 2024 20:20:38 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: [PATCH v4 5/5] input/touchscreen: imagis: add support for IST3032C Date: Sat, 20 Jan 2024 20:11:16 +0100 Message-ID: <20240120191940.3631-6-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> References: <20240120191940.3631-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788638406760777285 X-GMAIL-MSGID: 1788638469117024587 From: Karel Balej IST3032C is a touchscreen chip used for instance in the samsung,coreprimevelte smartphone, with which this was tested. Add the chip specific information to the driver. Reviewed-by: Markuss Broks Signed-off-by: Karel Balej --- Notes: v4: * Change the WHOAMI definition position to preserve alphanumerical order of the definitions. * Add Markuss' Reviewed-by trailer. drivers/input/touchscreen/imagis.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index 9af8a6332ae6..e1fafa561ee3 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -11,6 +11,8 @@ #include #include +#define IST3032C_WHOAMI 0x32c + #define IST3038B_REG_STATUS 0x20 #define IST3038B_REG_CHIPID 0x30 #define IST3038B_WHOAMI 0x30380b @@ -363,6 +365,13 @@ static int imagis_resume(struct device *dev) static DEFINE_SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume); +static const struct imagis_properties imagis_3032c_data = { + .interrupt_msg_cmd = IST3038C_REG_INTR_MESSAGE, + .touch_coord_cmd = IST3038C_REG_TOUCH_COORD, + .whoami_cmd = IST3038C_REG_CHIPID, + .whoami_val = IST3032C_WHOAMI, +}; + static const struct imagis_properties imagis_3038b_data = { .interrupt_msg_cmd = IST3038B_REG_STATUS, .touch_coord_cmd = IST3038B_REG_STATUS, @@ -380,6 +389,7 @@ static const struct imagis_properties imagis_3038c_data = { #ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] = { + { .compatible = "imagis,ist3032c", .data = &imagis_3032c_data }, { .compatible = "imagis,ist3038b", .data = &imagis_3038b_data }, { .compatible = "imagis,ist3038c", .data = &imagis_3038c_data }, { },