lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 05 Jun 2024 15:48:20 +0200
From: Kamel BOUHARA <kamel.bouhara@...tlin.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Rob Herring <robh+dt@...nel.org>, Krzysztof Kozlowski
 <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
 Henrik Rydberg <rydberg@...math.org>, linux-input@...r.kernel.org,
 linux-kernel@...r.kernel.org, devicetree@...r.kernel.org, Marco Felsch
 <m.felsch@...gutronix.de>, Jeff LaBundy <jeff@...undy.com>,
 catalin.popescu@...ca-geosystems.com, mark.satterthwaite@...chnetix.com,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>, Gregory Clement
 <gregory.clement@...tlin.com>, bsp-development.geo@...ca-geosystems.com
Subject: Re: [PATCH v13 3/3] Input: Add TouchNetix axiom i2c touchscreen
 driver

[...]

>> > +
>> > +	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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ