Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp912125lqs; Fri, 14 Jun 2024 09:04:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPxunjaJIEPWJtL/4LZnD41OTX9zafwTCW1rSD72ln000QwY034UnQ4gihKpPGJ8C8fE7S35BkAEs+2hzBp0YT0mpfVEELm+mJHnwKrQ== X-Google-Smtp-Source: AGHT+IG2nbzF0Kj4N7Tc7MaWQ63Lj4dhdIaGnMnKr0WJyO52Efg39CpxO8tNbesU/KRJS4hylVy+ X-Received: by 2002:a17:90a:af82:b0:2c4:c922:8281 with SMTP id 98e67ed59e1d1-2c4c9228d3fmr7692360a91.4.1718381093496; Fri, 14 Jun 2024 09:04:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718381093; cv=pass; d=google.com; s=arc-20160816; b=u3lDkRaZIw8ioMI4TGND4eGL5Wu2jTvsLPCq6Xq4EuvsTYGEXRcQUYh7EcsQ7u+yMS v8VABzYi+IMdkjoWs1m+tM+Eni0u6gywxKW/RhVIuE+4tPkxm7cOUKwbM46xtlErdO/a b4VobrkQdAEta1KCDPAhzNywL50gf4Ieht21Be64ExwMqWwj1VBrKS/iCzUW/dUbraK8 gfdVTDg/q3Ijp1dAnTow3WrrAu9Sx92q7SbyN2nsbNf17Zb/wuuMNLHpX+08hILTUo6H 4KkwxLTp6QEWjWkBDcAnTCkk33jKXzFA0D0q9AqwxaLcoUa1KtOKetDbePQSKiP97f32 LbhA== 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=dWy7tRAFgD9nXufUCRB9bCovDr6IUDCrTC7tiwkWhJM=; fh=w/tFSsm6xNi8Z3DBbcpEqj4e/vc6U0h+Um8HjHbDCls=; b=GPb6VsVWYtdZMRHzFVUty54LQmRMpRCQA6xlRQZcGUKwnRKwSAfSQScROAWSzf+tRV PPKu1YvNO7ehV7DYSxTKKXBT5C6gDLalc8FI/+CO3HI6P8TU6/txF71t5urt4U8OJhJR 9BWxDaphvEbr4CNGZwgafl5RY6IM3Tw6HNz0HZg8mjG2eU/FHaBV3p/66YwstjemWJWM V0tgieoiLB8sLmX8SXB+A3I5JMmqP4argKAJklgoS2iLAua3xTC2NfNfDkfFyMy9CTVc UGqysnxlAknMjzz9X36lVFeWtGNIskesXSxfpdS336Wi6NHZai+bM5hhGKchZ9KlSFmI pOJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=AQ8slOoI; 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-215193-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c4a76abd37si6108586a91.101.2024.06.14.09.04.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 09:04:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215193-linux.lists.archive=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=@bootlin.com header.s=gm1 header.b=AQ8slOoI; 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-215193-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215193-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B3A8F287C30 for ; Fri, 14 Jun 2024 16:02:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E908415EFAA; Fri, 14 Jun 2024 16:02:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="AQ8slOoI" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 966F11642B; Fri, 14 Jun 2024 16:02:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718380972; cv=none; b=LvSiyPrqKynHMoX+Gq4SVLWoM9UyNf1xU66Zy/HdeTRrHT+okHKoEDpZgmRnTlRufw1zRYTgcGupKazEkkY9psQwZE4JFbSXYt8p9dMYwnyjmixhMUBg/z+RMMKPTb3/dshVYSssnZt0qEqPrb4udugdiRJ+l0BB8t20x68ZIso= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718380972; c=relaxed/simple; bh=HkdMIKqNfvcTwn+IKkOt/8EtqNClu1g458NTivnDlH4=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=B2uahYJdgbkV8vPidvPEyGdVannS/iWN5Z+x+9DZf7IkMllJ5VHa3HnCvBlspVCH6m3fEyK7siNjcMIAdWm486B4HP+eXFa8N/jpBRBYBFIX98PO7GTe5kBZPXyVcqiFzhPkAXvM9NQYdxoE3Dofsv4IAMNs31er0dsVtagO0Tk= 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=AQ8slOoI; arc=none smtp.client-ip=217.70.183.200 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 3F36C20009; Fri, 14 Jun 2024 16:02:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718380967; 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=dWy7tRAFgD9nXufUCRB9bCovDr6IUDCrTC7tiwkWhJM=; b=AQ8slOoI9tBNorobg7xYlv4klLsuKAQ+5Un+ClwHxt5sl5Lg0twSXFhu1GFWv9IYSuoC6i 70vHXye2LAVqPq7LozdhpjzEU8S34cmN2uan/12y860EplybS4NpWhAmMtz2pXBbTNfUmG OGEzfm/IO9yKD6ZG5gx2acPfk+2Ic5Zn06xATKgEjnRXJW+R7cd2PMBZ2GqNoPolaZdCEx W8RXm5djvXsWdHih/827IDJ2ijNvIEbFIm8O2aXZBYo9m/U8pqCwnYKv8aT8QbMIxoVNzB XUR+ej4UHLHFZkQHCCAPxp1MOD2O9V4id7PsKhj9VvevfQT/WplbHHMYDpYiRA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Fri, 14 Jun 2024 18:02:47 +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: References: <20240603153929.29218-1-kamel.bouhara@bootlin.com> <20240603153929.29218-4-kamel.bouhara@bootlin.com> <20240605124746.GA57733@tpx1.home> <7ca4a22f903313128de5c0f65a49b319@bootlin.com> Message-ID: <410b683ee96573b57b3f8f2bf8e35c29@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 Le 2024-06-06 23:32, Dmitry Torokhov a écrit : > On Wed, Jun 05, 2024 at 03:48:20PM +0200, Kamel BOUHARA wrote: >> [...] >> >> > > > + >> > > > + 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 >> ... >> } > > No, if you fail to acquire interrupt that was described in ACPI/DT it > should be treated as an error, like this: > > if (client->irq) { > error = devm_request_threaded_irq(...) > if (error) > return dev_err_probe(...); > } else { > .. set up polling .. > } > > This also makes sure that if interrupt controller is not ready and > requests probe deferral we will not end up with device in polling mode. > OK, thanks for the clarification, this is fixed in v14. Greetings, -- Kamel Bouhara, Bootlin Embedded Linux and kernel engineering https://bootlin.com