Skip to contentSkip to conversation

nfc: s3fwrn5: let core configure the interrupt trigger

PATCH Applied Krzysztof Kozlowski 2 participants 2 messages Dec 10, 2020 – Dec 12, 2020

Subsystems (4)
lore
Share & tools
lore

Krzysztof Kozlowski

author maintainer
#0 lore raw

PATCH 1/1 nfc: s3fwrn5: let core configure the interrupt trigger

If interrupt trigger is not set when requesting the interrupt, the core will take care of reading trigger type from Devicetree. There is no point to do it in the driver.

---
 drivers/nfc/s3fwrn5/i2c.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/nfc/s3fwrn5/i2c.c +1 -6
index 42f1f610ac2c..897394167522 100644
@@ -179,8 +179,6 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
 				  const struct i2c_device_id *id)
 {
 	struct s3fwrn5_i2c_phy *phy;
-	struct irq_data *irq_data;
-	unsigned long irqflags;
 	int ret;
 
 	phy = devm_kzalloc(&client->dev, sizeof(*phy), GFP_KERNEL);
@@ -214,11 +212,8 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
 	if (ret < 0)
 		return ret;
 
-	irq_data = irq_get_irq_data(client->irq);
-	irqflags = irqd_get_trigger_type(irq_data) | IRQF_ONESHOT;
-
 	ret = devm_request_threaded_irq(&client->dev, phy->i2c_dev->irq, NULL,
-		s3fwrn5_i2c_irq_thread_fn, irqflags,
+		s3fwrn5_i2c_irq_thread_fn, IRQF_ONESHOT,
 		S3FWRN5_I2C_DRIVER_NAME, phy);
 	if (ret)
 		s3fwrn5_remove(phy->common.ndev);
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 5 lines · On Thu, 10 Dec 2020 22:18:24 +0100 Krzysztof Kozlowski wrote:

If interrupt trigger is not set when requesting the interrupt, the core will take care of reading trigger type from Devicetree. There is no point to do it in the driver.

Applied, thank you!