diff options
| author | David S. Miller <davem@davemloft.net> | 2015-11-23 11:53:11 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-11-23 11:53:11 -0500 |
| commit | 3d40e44361eab3dd6c969241d12dac7466eb7174 (patch) | |
| tree | b315bb7d08318d8cf53b1a22ad5505d1840706f4 /include | |
| parent | 3f8c0f7efb4fcac11f31afa97584d06118c614bb (diff) | |
| parent | c8c1b39a86940edd35439f1e5c9ff39888daf0f0 (diff) | |
Merge branch 'dsa-gpio-reset'
Andrew Lunn says:
====================
DSA: GPIO to reset switches
These two patches add support for using a GPIO to hard reset a switch
during reset.
v2:
Thanks to a clue from Neil Armstrong, i figured out how to convert the
gpio into a gpiod, while keeping the ACTIVE_LOW flag, so simplifiying
the set/reset code.
I have not included the Tested-by: from Phil Reid, since i made a lot
of changes.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dsa.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 82a4c6011173..3f23dd9d6a69 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -16,6 +16,7 @@ #include <linux/timer.h> #include <linux/workqueue.h> #include <linux/of.h> +#include <linux/of_gpio.h> #include <linux/phy.h> #include <linux/phy_fixed.h> #include <linux/ethtool.h> @@ -64,6 +65,13 @@ struct dsa_chip_data { * NULL if there is only one switch chip. */ s8 *rtable; + + /* + * A switch may have a GPIO line tied to its reset pin. Parse + * this from the device tree, and use it before performing + * switch soft reset. + */ + struct gpio_desc *reset; }; struct dsa_platform_data { |
