aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-08-01 20:46:56 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-08-01 20:46:56 +0000
commit8966b860678b5cc6586e4adfabc651a8923b46f3 (patch)
tree78adeb547489272283d1b6fb435f0690ae355be8 /target/linux
parent2b55968f5de12d3c3a9403554601d696bb7bb812 (diff)
downloadupstream-8966b860678b5cc6586e4adfabc651a8923b46f3.tar.gz
upstream-8966b860678b5cc6586e4adfabc651a8923b46f3.tar.bz2
upstream-8966b860678b5cc6586e4adfabc651a8923b46f3.zip
kernel: b53: use devm_gpio_request_one() to request gpio
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37648
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
index 97968dbf0b..467f9b2847 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
@@ -459,8 +459,9 @@ void b53_switch_reset_gpio(struct b53_device *dev)
if (gpio < 0)
return;
- gpio_set_value(gpio, 0);
- gpio_direction_output(gpio, 1);
+ /*
+ * Reset sequence: RESET low(50ms)->high(20ms)
+ */
gpio_set_value(gpio, 0);
mdelay(50);
@@ -1216,7 +1217,7 @@ int b53_switch_init(struct b53_device *dev)
dev->reset_gpio = b53_switch_get_reset_gpio(dev);
if (dev->reset_gpio >= 0) {
- ret = devm_gpio_request(dev->dev, dev->reset_gpio, "robo_reset");
+ ret = devm_gpio_request_one(dev->dev, dev->reset_gpio, GPIOF_OUT_INIT_HIGH, "robo_reset");
if (ret)
return ret;
}