aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-5.4/0109-staging-mt7621-pci-don-t-return-if-get-gpio-fails.patch
diff options
context:
space:
mode:
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>2020-03-11 21:05:41 +0800
committerChuanhong Guo <gch981213@gmail.com>2020-04-04 14:14:43 +0800
commitd21d6ea4547412632e01de505b7a2c8a83817a02 (patch)
treeaa14fe99c40732d9af6ad331e3e003caa59cd6a9 /target/linux/ramips/patches-5.4/0109-staging-mt7621-pci-don-t-return-if-get-gpio-fails.patch
parent66984646c2d6f2e868657d3a83fa5038d5b94487 (diff)
downloadupstream-d21d6ea4547412632e01de505b7a2c8a83817a02.tar.gz
upstream-d21d6ea4547412632e01de505b7a2c8a83817a02.tar.bz2
upstream-d21d6ea4547412632e01de505b7a2c8a83817a02.zip
ramips: mt7621: backport PCIe driver fixes from staging-test
Backport mt7621-pci/mt7621-pci-phy fixes from staging-test Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Diffstat (limited to 'target/linux/ramips/patches-5.4/0109-staging-mt7621-pci-don-t-return-if-get-gpio-fails.patch')
-rw-r--r--target/linux/ramips/patches-5.4/0109-staging-mt7621-pci-don-t-return-if-get-gpio-fails.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-5.4/0109-staging-mt7621-pci-don-t-return-if-get-gpio-fails.patch b/target/linux/ramips/patches-5.4/0109-staging-mt7621-pci-don-t-return-if-get-gpio-fails.patch
new file mode 100644
index 0000000000..55abb8999f
--- /dev/null
+++ b/target/linux/ramips/patches-5.4/0109-staging-mt7621-pci-don-t-return-if-get-gpio-fails.patch
@@ -0,0 +1,34 @@
+From 23a788c23ed10e0d79092fcb693dcf0e357e1f7e Mon Sep 17 00:00:00 2001
+From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
+Date: Thu, 19 Mar 2020 17:14:16 +0100
+Subject: [PATCH] staging: mt7621-pci: don't return if get gpio fails
+
+In some platforms gpio's are not used for reset but
+for other purposes. Because of that when we try to
+get them are valid gpio's but are already assigned
+to do other function. To avoid those kind of problems
+in those platforms just notice the fail in the kernel
+but continue doing normal boot.
+
+Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
+Link: https://lore.kernel.org/r/20200319161416.19033-1-sergio.paracuellos@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/mt7621-pci/pci-mt7621.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/staging/mt7621-pci/pci-mt7621.c
++++ b/drivers/staging/mt7621-pci/pci-mt7621.c
+@@ -363,10 +363,8 @@ static int mt7621_pcie_parse_port(struct
+
+ port->gpio_rst = devm_gpiod_get_index_optional(dev, "reset", slot,
+ GPIOD_OUT_LOW);
+- if (IS_ERR(port->gpio_rst)) {
+- dev_err(dev, "Failed to get GPIO for PCIe%d\n", slot);
+- return PTR_ERR(port->gpio_rst);
+- }
++ if (IS_ERR(port->gpio_rst))
++ dev_notice(dev, "Failed to get GPIO for PCIe%d\n", slot);
+
+ port->slot = slot;
+ port->pcie = pcie;