#include <linux/of_device.h>
#include <linux/of_mdio.h>
#include <linux/of_net.h>
+#include <linux/reset.h>
#include <linux/bitops.h>
#include <net/genetlink.h>
#include <linux/switch.h>
const struct of_device_id *match;
struct ar8xxx_priv *priv;
struct switch_dev *swdev;
+ struct reset_control *switch_reset;
struct device_node *mdio_node;
int ret;
if (!match)
return -EINVAL;
+ switch_reset = devm_reset_control_get_optional(&mdiodev->dev, "switch");
+ if (switch_reset) {
+ reset_control_assert(switch_reset);
+ msleep(50);
+ reset_control_deassert(switch_reset);
+ msleep(200);
+ }
+
priv = ar8xxx_create();
if (priv == NULL)
return -ENOMEM;