aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-05-10 17:27:22 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-11 19:36:28 -0400
commit52638f71fcff9386fe64c83a18a129b122333fdf (patch)
tree253f15285b3a7bd4c02ed4a7681d0643bea9578c /net/dsa
parent14c7b3c3877075e6df22e071d4619cbdeac82ffd (diff)
dsa: Move gpio reset into switch driver
Resetting the switch is something the driver does, not the framework. So move the parsing of this property into the driver. There are no in kernel users of this property, so moving it does not break anything. There is however a board which will make use of this property making its way into the kernel. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/dsa.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index d61ceed912be..df169811f26d 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -659,9 +659,6 @@ static int dsa_of_probe(struct device *dev)
659 const char *port_name; 659 const char *port_name;
660 int chip_index, port_index; 660 int chip_index, port_index;
661 const unsigned int *sw_addr, *port_reg; 661 const unsigned int *sw_addr, *port_reg;
662 int gpio;
663 enum of_gpio_flags of_flags;
664 unsigned long flags;
665 u32 eeprom_len; 662 u32 eeprom_len;
666 int ret; 663 int ret;
667 664
@@ -740,19 +737,6 @@ static int dsa_of_probe(struct device *dev)
740 put_device(cd->host_dev); 737 put_device(cd->host_dev);
741 cd->host_dev = &mdio_bus_switch->dev; 738 cd->host_dev = &mdio_bus_switch->dev;
742 } 739 }
743 gpio = of_get_named_gpio_flags(child, "reset-gpios", 0,
744 &of_flags);
745 if (gpio_is_valid(gpio)) {
746 flags = (of_flags == OF_GPIO_ACTIVE_LOW ?
747 GPIOF_ACTIVE_LOW : 0);
748 ret = devm_gpio_request_one(dev, gpio, flags,
749 "switch_reset");
750 if (ret)
751 goto out_free_chip;
752
753 cd->reset = gpio_to_desc(gpio);
754 gpiod_direction_output(cd->reset, 0);
755 }
756 740
757 for_each_available_child_of_node(child, port) { 741 for_each_available_child_of_node(child, port) {
758 port_reg = of_get_property(port, "reg", NULL); 742 port_reg = of_get_property(port, "reg", NULL);