Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp310289lqr; Wed, 5 Jun 2024 06:54:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4cu5Y2QbTbFubQ4qB0E0tDObY5ozenQtdzTl1qNjoDvloHDxvyDoCPoYVl0Jc1FrLkQ1eboMAfHsqQMvmleetFSPrq4f2FNyzjdL2Mw== X-Google-Smtp-Source: AGHT+IHIC5p3DtZKQxyHNbv8os41MURjnjBAIFgSWdHpIcuNDiEe85ECBM/4vhTwkji09AdXvlir X-Received: by 2002:a05:6214:4498:b0:6af:700d:a84b with SMTP id 6a1803df08f44-6b030a9a856mr26716106d6.64.1717595669235; Wed, 05 Jun 2024 06:54:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717595669; cv=pass; d=google.com; s=arc-20160816; b=B3PM+KsArVCJVWugs43wSwaUKERQiYxyGeg67n3KRlGExgybcsSKqgLfYJY/OPeGTN BnjMLD8flAwyaKMu4LSjNfUMRxwd4JIfVncVjYkjFLlRkmh79n5pQKEmL5wWYDE298rX yUwo1WFSb5yjU8A1s98kH8XMuSzTbfgfQMNE4PxGzULFBISlLHKXI7KCSdOnt7t9vUs4 HOO5Qwrq+ZQZTcXnaUGwIXuIBvF0LqYPcQn8AoQfa31wJUpb2yN531N0zvn5dMvSitZL yLDCmlt9TukB7T7Tq8XQIxMZBoUzCeOLKxIWShtay5aZYirwQJ9Fs/alJDrY2Djz80jD WF7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=9oYspSAh9r3LxQwguONvXuvtQjqwAdO7gA+8g9Aaz40=; fh=w/tFSsm6xNi8Z3DBbcpEqj4e/vc6U0h+Um8HjHbDCls=; b=VNDCfmZkD07bhB6jjf6NorJ0IA0JHf5PQiAkIBXR/sydoKm3TYOqfImvch5mdGsBMe VWJm6r7knWbGR/SOWALFY39L3ah3qua67lq9id0O3SN9F7sJftDD4azUICVT/rwFliUY TOHwylHCuhUFwOyDui8RdgY3FdUAf+N/tHi7KHwg/ptxvtAehZfCnA6WRaVU3YFAEv3l mFzBEXDzPsdwnQrNBb6CdfEbNoGG5pD5rrxwroKqGl9zDXg+JHYQR+yEU4BbQr8Kik/x vC47+1jo+tykiCh1PV5LO0o7XCgchSsK7+90bn8DognABQMXLnXInZfLKgMkoe0JxOfb uSpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="bD/3uUx9"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-202732-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202732-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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-6ae4b403c10si54909406d6.279.2024.06.05.06.54.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:54:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202732-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=@bootlin.com header.s=gm1 header.b="bD/3uUx9"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-202732-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202732-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 8B7351C256F6 for ; Wed, 5 Jun 2024 13:53:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CE871B95B; Wed, 5 Jun 2024 13:48:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="bD/3uUx9" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 B664CFC08; Wed, 5 Jun 2024 13:48:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717595308; cv=none; b=rt2KI7VHocxlmFX1kDSqHD0S2SZDiG4AJ0cdXUTPDuvDmfb7lDgdZ5zkEA5mobEmVR6sd89jsdn7LAS5B+Sqz0XiGizf6XvcwxXX8KJAR3dxmQw7Pcvh9E9GZxKf0nPQOrqh+MZ2C2Y81lsq7trW8vB8qgAVxnqwHgMn3eUVX94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717595308; c=relaxed/simple; bh=KLGoXYEyiKiVioiSy1o4l3JrW+RVHuBQRMY6ey0/uJo=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=Eq74OavQcj/pqO5zDAtLSyL0gxL83wyaHkdJ8SwHQQwY+mwPZ2M4+wFNE7IBnwf4lin1WaTBUirB7seuUwZ7j/ud73LYVRToux1xOYAUtB6cXwIHl0f3i5IQjG3eOXeTdKWqSMtGd44v04WM4tQq7zbJU31db9a3STwjz5Xbcn0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=bD/3uUx9; arc=none smtp.client-ip=217.70.183.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 8E6B1E0003; Wed, 5 Jun 2024 13:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1717595301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9oYspSAh9r3LxQwguONvXuvtQjqwAdO7gA+8g9Aaz40=; b=bD/3uUx9uNS8Q2paK6zhQj2kqPrtdKE9R0wdIsPo7euw/mz67MJIP07wTvBfxgcKJycS/B L0ZdYyRLPLyPYHjduis6xmkB5WmIwCHkBAhuuy1mZiR/M5sl1j0v16xVRr/V1+6Bk5+4rA YJPIu6BrFwJ9/tlaeMs3TLf1StCSHxRroYkO6mxUqGMhURLPvlNsgVDycfQN+dvW7dNRZ8 yw7lL2CT+AZBN0eFnFgkKhXCSgqlbk5yGyObxGUhf2uMufD44kBnGGzcaLAs3wOOvz+/Il 6/uUee4evNcg72vs2/b1r7L/b4uZ6Cs6xiTw5XpnE2Oh/CJr6JwMlGO6Xz+plQ== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Wed, 05 Jun 2024 15:48:20 +0200 From: Kamel BOUHARA To: Dmitry Torokhov Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Marco Felsch , Jeff LaBundy , catalin.popescu@leica-geosystems.com, mark.satterthwaite@touchnetix.com, Thomas Petazzoni , Gregory Clement , bsp-development.geo@leica-geosystems.com Subject: Re: [PATCH v13 3/3] Input: Add TouchNetix axiom i2c touchscreen driver In-Reply-To: <20240605124746.GA57733@tpx1.home> References: <20240603153929.29218-1-kamel.bouhara@bootlin.com> <20240603153929.29218-4-kamel.bouhara@bootlin.com> <20240605124746.GA57733@tpx1.home> Message-ID: <7ca4a22f903313128de5c0f65a49b319@bootlin.com> X-Sender: kamel.bouhara@bootlin.com Organization: Bootlin Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: kamel.bouhara@bootlin.com [...] >> > + >> > + error = devm_request_threaded_irq(dev, client->irq, NULL, >> > + axiom_irq, IRQF_ONESHOT, dev_name(dev), ts); >> > + if (error) { >> > + dev_info(dev, "Request irq failed, falling back to polling mode"); >> >> I do not think you should fall back to polling mode if you fail to get >> interrupt. If it was not specified (client->irq) then I can see that >> we >> might want to fall back, but if the system configured for using >> interrupt and you can not get it you should bail out. >> > > Yes, clear, the polling mode can be decorrelated to the irq not > provided > case. Just to make sure I understood, is this what you propose ? if (client->irq) { error = devm_request_threaded_irq(...) if (error) { dev_warn(dev, "failed to request IRQ\n"); client->irq = 0; } } if(!client->irq) { // setup polling stuff ... } -- Kamel Bouhara, Bootlin Embedded Linux and kernel engineering https://bootlin.com