Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1704828 > unrolled thread

[PATCH 07/18] staging: typec: fusb302: Use client->irq as irq if set

Started byHans de Goede <hdegoede@redhat.com>
First post2017-08-06 14:40 +0200
Last post2017-08-06 14:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 07/18] staging: typec: fusb302: Use client->irq as irq if set Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:40 +0200

#1704828 — [PATCH 07/18] staging: typec: fusb302: Use client->irq as irq if set

FromHans de Goede <hdegoede@redhat.com>
Date2017-08-06 14:40 +0200
Subject[PATCH 07/18] staging: typec: fusb302: Use client->irq as irq if set
Message-ID<ubt0D-2al-45@gated-at.bofh.it>
The fusb302 is also used on x86 systems where the platform code sets
the irq in client->irq and there is no gpio named fcs,int_n.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/staging/typec/fusb302/fusb302.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/typec/fusb302/fusb302.c b/drivers/staging/typec/fusb302/fusb302.c
index 8ceaef8ecf17..be454b5ff6c7 100644
--- a/drivers/staging/typec/fusb302/fusb302.c
+++ b/drivers/staging/typec/fusb302/fusb302.c
@@ -1735,9 +1735,13 @@ static int fusb302_probe(struct i2c_client *client,
 		goto destroy_workqueue;
 	}
 
-	ret = init_gpio(chip);
-	if (ret < 0)
-		goto destroy_workqueue;
+	if (client->irq) {
+		chip->gpio_int_n_irq = client->irq;
+	} else {
+		ret = init_gpio(chip);
+		if (ret < 0)
+			goto destroy_workqueue;
+	}
 
 	chip->tcpm_port = tcpm_register_port(&client->dev, &chip->tcpc_dev);
 	if (IS_ERR(chip->tcpm_port)) {
-- 
2.13.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web