Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp657054lqt; Thu, 6 Jun 2024 14:33:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURS4sOf6DWZ0f6ad/6EcmUNa7AqInMib9UsBO3wr3vtfhLUwndZDdkd7eaEt8RlfE9JCLUOKi2oMl5pZ6BPq2q12X8ZjB6DsZTnJqkxQ== X-Google-Smtp-Source: AGHT+IEnCTBjBEhM90vnt2yf3yztzNxG7dmxHqtU/t6XFufJ7kWR6mLm3/Bq1qKpYtEtWU+wc2jg X-Received: by 2002:a05:6512:46c:b0:52b:459c:96b2 with SMTP id 2adb3069b0e04-52bb9f78634mr575453e87.20.1717709597818; Thu, 06 Jun 2024 14:33:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717709597; cv=pass; d=google.com; s=arc-20160816; b=wvmuUk8g0tdzC2E2DZhQrapIwrUENCnV80ei0kQylCv6kvJdQmXxLJCIWGPOGFt2C3 wbYWfmxzos24h2lse/sT5aa+c07noX2+hOyxdpzLZaO4FkRHDkW2lNDVgS05MFgZTHmI HhBWzxR/RpYJZADp8rt2ti2mNu5BLLWgw//6OyhqOyVcOi0PRJJNo7p5MzVkun8BD2AU hrAB5DJeHEIMU0zOMDhx3kNy6vkJ4CuAbT/GBeapJ0OxS6kqM+TTfRRQYc+2E6zPf/s8 Tq8QBXjB9fE3F8k8w3bq91C0mMgnV7x+Jl8Zg7XX5OJyo8idUrX/+nHvw0qF81VJ2stY I62w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oCJ+6h3oOdiBUp+f2OAuium5zQQWuoIn8eHud9GJWzg=; fh=8LQjFii06pFyIzq4ANC6plyyrOyeJGicC2ToelONJw8=; b=K1G8bcYIEb/T5vcb6CnypcPibnjJ9L/6d7I48XtWBPcHeeMZQpYkFW11ZUM3yd9Kqc sWBXIhjIz7uc8hnL1do5QCBkEjr33FbVlG0kfUUahIauNgQAFcXQn7XAkN58HkWjKvQj NyuYzdk6r8XOWWdZ40sXCQyB6XEv07a3nCDPLUFT2tNvGhdMg4Gwxr8p39QJmswb71T6 uhbi+6IGdAe/Kr6qhI0wCwCjmXEDIT67oZGHRkPilBrRlxXJksCmsnbJeqTldsAW99Xa c1gPz6yN2PUtpbnbDb8Uz0FlcGgFe5YI+NVV0mLlip8TdDJunnK8KOmFiAQcMXQF4+my CfpA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="hAld5+a/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-205087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c807084fbsi107086666b.608.2024.06.06.14.33.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 14:33:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="hAld5+a/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-205087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id C7C9A1F23442 for ; Thu, 6 Jun 2024 21:32:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E677113DB92; Thu, 6 Jun 2024 21:32:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hAld5+a/" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5E94FC02; Thu, 6 Jun 2024 21:32:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717709564; cv=none; b=TpOuc14r3gIyC6DLyvEv267FopsdyuWD9UAi4Moo4CIvWpAwk5+zULjAGRoOYYYo7feB1laQ3nqsCELwLpzVc4dhPzmeKsLfis8XFfRARST8O1uESFWi45z83ihkdUyUrYtXwPq7UBl4LZNsy+cXIgLPxuPDtsKCRKyPElVdDW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717709564; c=relaxed/simple; bh=VyqqIvxELS07SY/UCZXKvm0fiKpJWcw9PEObBiG/th0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZWzAz+K35Tpr26nm4PkLN3U3lYYOgxX/6ZaH9SPF/ADFBK9+KQrSwqNujhFqfnJ9eRiVZ7zlF6i1VykbTMdXLtaMFj90R+D90WFqkAKHlojlhExqkByytWc0lZN/8NnB4D8CwlCAkKFJwO1lins+L6mti7pi649gqWC8IvxtaIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hAld5+a/; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1f4a0050b9aso12731665ad.2; Thu, 06 Jun 2024 14:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717709562; x=1718314362; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=oCJ+6h3oOdiBUp+f2OAuium5zQQWuoIn8eHud9GJWzg=; b=hAld5+a/XBTvnk8LRMJYLDf+8PDkcsJqRsZ8lC23r5QjDONVnQX4zRV43gA33rKsiy I+Dsn5jh/bOAZEF9B2QU3qY49NtgYoSrnw/z8gRzs7GQ2EkK43caqc915Jmh7wXAbSIL iGkXLT+DCVhK9Pk4uM4tjhW3HuTcxnvmlQFyh0CAYfzBQQOAoT0LoFJM1p3wbpW5IhsW q8KkOvJ0qA+ufbbqgpVZTsWmSpPxc35y2OBLb0UEIhba4CNonE9Atto6zwoYcXsGJcVv fQzq/lL97g0WDL0QGdjnRd7b9R7bLXx2ROAWXHCw8aBMR6xpGTpRQSd6UIwzQOGdqDtf 6hZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717709562; x=1718314362; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oCJ+6h3oOdiBUp+f2OAuium5zQQWuoIn8eHud9GJWzg=; b=fUIunPDi2n0ebQBLTGiii9issdZmgFtuMbIaYpc16Ufj8lVml61ZaTXh0Q/THMAYtu GW2xnIKMPKIjDvUItAA9xqrpD8apwPw7SsRJJtj+VuGRSCyDGtbHjR44yGlb/AdaZtJ4 N62lBSx5mrlPp2jvoEhOwcfEvHoUAJ4iTQVFxuXWdcQ1jrSwz9Cj2LPdfseMbDOxlri0 nWMDldFZk/v3ufyMpVAA4tccT3at2RBc01lPSS3CaI0N261tDsutbGx6SwrdzzDbSo0G HPHFwtA4KXPjwJiA2RwBgnT64uJnPuAnfMPEHWF0pTFicF3WZ736xz3MkwDFAEZeDSeJ Ft+g== X-Forwarded-Encrypted: i=1; AJvYcCU6O73CzJYxS4xzr2uElso3n5viOxkT8QpViZUipMOl6U70y34VP99kKuLeYDhVQXUTm/cOqWBjFJ94mxN9rvbVUC5BBkEObTi3V7Prlv0shTRoycu2adHZuGVEyKQvLIfjf+E8RSLTatwelgphWCZ+pHP6UaD66OWQBG8mkpgYUstv/wyW X-Gm-Message-State: AOJu0YxsgsMVj8CBRWPqymLrOUv/xJD3uZ/7wZ/65RIZHbg7vzGRofaB Abkz62thNsDDVokF8Au164WMieLITu3jo3LZBoL07BIw4sVzA0wbNi0ROQ== X-Received: by 2002:a17:902:ec90:b0:1f3:b55:e247 with SMTP id d9443c01a7336-1f6d03c1052mr6536285ad.55.1717709562007; Thu, 06 Jun 2024 14:32:42 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:cdcb:6470:dec1:846c]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6bd7e066dsm20024115ad.206.2024.06.06.14.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 14:32:41 -0700 (PDT) Date: Thu, 6 Jun 2024 14:32:38 -0700 From: Dmitry Torokhov To: Kamel BOUHARA 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 Message-ID: References: <20240603153929.29218-1-kamel.bouhara@bootlin.com> <20240603153929.29218-4-kamel.bouhara@bootlin.com> <20240605124746.GA57733@tpx1.home> <7ca4a22f903313128de5c0f65a49b319@bootlin.com> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7ca4a22f903313128de5c0f65a49b319@bootlin.com> 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. Thanks. -- Dmitry