1
0
Fork 0

Revert "net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs"

This reverts commit dfa0d55ff6.

Discussion still ongoing, I shouldn't have applied this.

Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
David S. Miller 2018-11-16 23:04:37 -08:00
parent 5594923f6e
commit 160396a722
1 changed files with 5 additions and 9 deletions

View File

@ -63,7 +63,7 @@ static void mdio_dir(struct mdiobb_ctrl *ctrl, int dir)
* assume the pin serves as pull-up. If direction is
* output, the default value is high.
*/
gpiod_set_value_cansleep(bitbang->mdo, 1);
gpiod_set_value(bitbang->mdo, 1);
return;
}
@ -78,7 +78,7 @@ static int mdio_get(struct mdiobb_ctrl *ctrl)
struct mdio_gpio_info *bitbang =
container_of(ctrl, struct mdio_gpio_info, ctrl);
return gpiod_get_value_cansleep(bitbang->mdio);
return gpiod_get_value(bitbang->mdio);
}
static void mdio_set(struct mdiobb_ctrl *ctrl, int what)
@ -87,9 +87,9 @@ static void mdio_set(struct mdiobb_ctrl *ctrl, int what)
container_of(ctrl, struct mdio_gpio_info, ctrl);
if (bitbang->mdo)
gpiod_set_value_cansleep(bitbang->mdo, what);
gpiod_set_value(bitbang->mdo, what);
else
gpiod_set_value_cansleep(bitbang->mdio, what);
gpiod_set_value(bitbang->mdio, what);
}
static void mdc_set(struct mdiobb_ctrl *ctrl, int what)
@ -97,7 +97,7 @@ static void mdc_set(struct mdiobb_ctrl *ctrl, int what)
struct mdio_gpio_info *bitbang =
container_of(ctrl, struct mdio_gpio_info, ctrl);
gpiod_set_value_cansleep(bitbang->mdc, what);
gpiod_set_value(bitbang->mdc, what);
}
static const struct mdiobb_ops mdio_gpio_ops = {
@ -162,10 +162,6 @@ static int mdio_gpio_probe(struct platform_device *pdev)
if (ret)
return ret;
if (gpiod_cansleep(bitbang->mdc) || gpiod_cansleep(bitbang->mdio) ||
gpiod_cansleep(bitbang->mdo))
dev_warn(&pdev->dev, "Slow GPIO pins might wreak havoc into MDIO bus timing");
if (pdev->dev.of_node) {
bus_id = of_alias_get_id(pdev->dev.of_node, "mdio-gpio");
if (bus_id < 0) {