Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp330904imw; Thu, 14 Jul 2022 02:01:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uhDOzorFZQK5cHe2WIGpiRxiiFgo5vgTiaHWpp1aM8mUd4JVJw8IIpr4bDg+5c1ThEJcts X-Received: by 2002:a17:906:84f0:b0:72b:5cf4:465d with SMTP id zp16-20020a17090684f000b0072b5cf4465dmr7864046ejb.705.1657789267352; Thu, 14 Jul 2022 02:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657789267; cv=none; d=google.com; s=arc-20160816; b=E2PaO0TLRFTuHVOTXnMv/5kTQnPpA7RCDYEta8AkTb8jSceqweFcMqqssbwUZaYkkm 8jmAyWcaQhRD2Qsu+on22m99YvZot4b/X573GAP9VQS1+ESdjT5XquNbw1KHt7TqVs1+ HwVs0CP3YaAz3EM1eV7EAF/CJJNO1tTowFj9gu76YAFVBpWOxSF/Sd/xPHRyLJSdLn3G ukfq1Aeh8hORuiLw2poYXVey8h0Lw2YNHKtxjcaIuHUazudv4U8DrwM3in+2pgamb47l cXm5DDdAihzgXn2EomGbHt9mmOWK6FtGNdiRMbMU0zRzfdnhN3Q9OseaU2ggb0luIIrJ MoMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z6WeIw6Ug9aKSxKRIbHgd2qMMsfuzY6cGAhiG7oDCAc=; b=uektxw3aNY52TKEtJMfPWDudNtcrjAFh7Vs1itah2II5gcFE3Iz4qiTc0IeS+7Zo3I B/6jo6l+j5L8xCdE81resKPb2e0c6dg+Upi+4RWe+0ytHt6D3vsreGUabjy7RC+jn+mv 7PzVYKl9Jpq/n1H+O4t7odg2scYLob6VQf++/GG4RNgEofchIoPQzrxlVulSC1EysIO0 MUmz32trnggiQFT0np2KJ1lEx/+CV7qqfz8meQZQZzbZ9LUw/eDjIbkX0ZbTFZ3V4Umd MfBMmOealMy4t2KpWZ039cSosZejI6lSG6qQhzmR8YgrZTc6JequgCvBOPqgqxPAy7Ak hKbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=fCgG3z87; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz40-20020a1709077da800b0072af11f0ec8si639315ejc.147.2022.07.14.02.00.41; Thu, 14 Jul 2022 02:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=fCgG3z87; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236385AbiGNIpI (ORCPT + 99 others); Thu, 14 Jul 2022 04:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236882AbiGNIpE (ORCPT ); Thu, 14 Jul 2022 04:45:04 -0400 Received: from smtpdh19-2.aruba.it (smtpdh19-2.aruba.it [62.149.155.149]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 817173FA32 for ; Thu, 14 Jul 2022 01:45:03 -0700 (PDT) Received: from asem-TANK-H61.asem.intra ([151.1.184.193]) by Aruba Outgoing Smtp with ESMTPSA id BuRhoA7r5bvrcBuS2oFpka; Thu, 14 Jul 2022 10:44:03 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1657788243; bh=82V/BwzKSn3pPk/IVOhT7YMBofgVkaQwuuRmgiOZ8AI=; h=From:To:Subject:Date:MIME-Version; b=fCgG3z87lo5hPrXnZqGmrXMcSMwVvR/zGqfkug8Rb5VPpn50/wx5WvhXJEdM2GyjV HdVtKuvPtx0g5utOsWPF6vkw7KooBIvrZ2d2z5xRrYyH23wwPLTLAXQCEay2zSg2Lr aZ0onVr7fSblVMpEH6TVWKbbeMjliaB3ZuvK0sp2Umv/YPcWqipuivtvx0LdNeSrZX /AOQm+CnHxZuuASbxDVfvVckAspYMqhq1aB3jUjUDXnwLcwl5vvExV0Do30Lpy/uCW pVMHIkroPOlarPqDK7zvAJYpJ1UXzGLs4cANlHs0R5h3EQEvcM/807GUUW+ZAEqlQy uMSajsQffzXng== From: Luca Ellero To: dmitry.torokhov@gmail.com, daniel@zonque.org, m.felsch@pengutronix.de, andriy.shevchenko@linux.intel.com, u.kleine-koenig@pengutronix.de, mkl@pengutronix.de, miquel.raynal@bootlin.com, imre.deak@nokia.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Ellero Subject: [PATCH 1/3] ads7846: don't report pressure for ads7845 Date: Thu, 14 Jul 2022 10:43:17 +0200 Message-Id: <20220714084319.107334-2-luca.ellero@brickedbrain.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220714084319.107334-1-luca.ellero@brickedbrain.com> References: <20220714084319.107334-1-luca.ellero@brickedbrain.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfP/NCL/d34WAYZfIx8PIc1a46cfqL0txdrtSAjzBLOqzYJz9dGtL7B6qA/P+bWEXxldcT2EybS7VBymHJAO/hPClUUKZlgQFyOghGUtzTY5FWgvRsNIo MP9xARjbbtIHXtJug3VSCdXWc3r7M/au4SpW9ACUNoo5RR25R8XQN7aAIuk2pzxBCcmwAzgYpDMPalqtDBLTbWuXvteyHcQxw/OsBxxxYkhnnxqeekOv7F5B Puz22GTennozlkfw6NTpwGw1Pq4Rx1lmQzhgIz95HIMb6VHkekvW/Vu1e9LAGodO5m2vImirxyrH8tu5c4Fcj0rlLVySkxFalSFacoI/zc3XoyDGkI61XEt+ sEVX8phtWtEyyXYObN95pRC66VaoKs0tjcOgpfE5ChgiQWKCY9R6BL50XKtDvknhTK/aa7UqnJTKEc4gYYLyqyPOBJ5ZwhPBS+54ZcsRgrMouRedqj89o3v4 eL0Dfp5SjDXiW3g7TrLV+WHBBFRqw81JtxmlyJVRmeVjPexLo4i/FUXBDHv7CuyAGhoowcdt8V1fh8D6bBRzCyJOUlnrVOyFacl346oiU4sJA7lUFagMdfW7 Izs= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luca Ellero ADS7845 doesn't support pressure. This patch avoids the following error reported by libinput-list-devices: "ADS7845 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE" Signed-off-by: Luca Ellero --- drivers/input/touchscreen/ads7846.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index bed68a68f330..24605c40d039 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -1316,8 +1316,9 @@ static int ads7846_probe(struct spi_device *spi) pdata->y_min ? : 0, pdata->y_max ? : MAX_12BIT, 0, 0); - input_set_abs_params(input_dev, ABS_PRESSURE, - pdata->pressure_min, pdata->pressure_max, 0, 0); + if (ts->model != 7845) + input_set_abs_params(input_dev, ABS_PRESSURE, + pdata->pressure_min, pdata->pressure_max, 0, 0); /* * Parse common framework properties. Must be done here to ensure the -- 2.25.1