aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mdio-gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/mdio-gpio.c')
-rw-r--r--drivers/net/phy/mdio-gpio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 33265747bf39..0fbcedcdf6e2 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -63,7 +63,7 @@ static void mdio_dir(struct mdiobb_ctrl *ctrl, int dir)
63 * assume the pin serves as pull-up. If direction is 63 * assume the pin serves as pull-up. If direction is
64 * output, the default value is high. 64 * output, the default value is high.
65 */ 65 */
66 gpiod_set_value(bitbang->mdo, 1); 66 gpiod_set_value_cansleep(bitbang->mdo, 1);
67 return; 67 return;
68 } 68 }
69 69
@@ -78,7 +78,7 @@ static int mdio_get(struct mdiobb_ctrl *ctrl)
78 struct mdio_gpio_info *bitbang = 78 struct mdio_gpio_info *bitbang =
79 container_of(ctrl, struct mdio_gpio_info, ctrl); 79 container_of(ctrl, struct mdio_gpio_info, ctrl);
80 80
81 return gpiod_get_value(bitbang->mdio); 81 return gpiod_get_value_cansleep(bitbang->mdio);
82} 82}
83 83
84static void mdio_set(struct mdiobb_ctrl *ctrl, int what) 84static void mdio_set(struct mdiobb_ctrl *ctrl, int what)
@@ -87,9 +87,9 @@ static void mdio_set(struct mdiobb_ctrl *ctrl, int what)
87 container_of(ctrl, struct mdio_gpio_info, ctrl); 87 container_of(ctrl, struct mdio_gpio_info, ctrl);
88 88
89 if (bitbang->mdo) 89 if (bitbang->mdo)
90 gpiod_set_value(bitbang->mdo, what); 90 gpiod_set_value_cansleep(bitbang->mdo, what);
91 else 91 else
92 gpiod_set_value(bitbang->mdio, what); 92 gpiod_set_value_cansleep(bitbang->mdio, what);
93} 93}
94 94
95static void mdc_set(struct mdiobb_ctrl *ctrl, int what) 95static void mdc_set(struct mdiobb_ctrl *ctrl, int what)
@@ -97,7 +97,7 @@ static void mdc_set(struct mdiobb_ctrl *ctrl, int what)
97 struct mdio_gpio_info *bitbang = 97 struct mdio_gpio_info *bitbang =
98 container_of(ctrl, struct mdio_gpio_info, ctrl); 98 container_of(ctrl, struct mdio_gpio_info, ctrl);
99 99
100 gpiod_set_value(bitbang->mdc, what); 100 gpiod_set_value_cansleep(bitbang->mdc, what);
101} 101}
102 102
103static const struct mdiobb_ops mdio_gpio_ops = { 103static const struct mdiobb_ops mdio_gpio_ops = {