projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
097578e
)
staging: typec: fusb302: Use client->irq as irq if set
author
Hans de Goede
<
[email protected]
>
Wed, 30 Aug 2017 09:48:08 +0000
(11:48 +0200)
committer
Greg Kroah-Hartman
<
[email protected]
>
Thu, 31 Aug 2017 16:23:12 +0000
(18:23 +0200)
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.
Cc: "Yueyao (Nathan) Zhu" <
[email protected]
>
Signed-off-by: Hans de Goede <
[email protected]
>
Reviewed-by: Guenter Roeck <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/typec/fusb302/fusb302.c
patch
|
blob
|
history
diff --git
a/drivers/staging/typec/fusb302/fusb302.c
b/drivers/staging/typec/fusb302/fusb302.c
index 1c1751c994db1eda7902ea85fb522a25951cd367..675161cf4f3a21d1299190eafa4673fa7b4b750c 100644
(file)
--- 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)) {