diff options
author | Richard Leitner <richard.leitner@skidata.com> | 2017-12-22 05:08:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-27 11:06:50 -0500 |
commit | 04f629f730fcd30c811777d186b15c38737eaa3c (patch) | |
tree | 6e6856c7f6809cd26e2662bd3cdc5f35c0aa6676 | |
parent | a8038befceccaacf4cf6e8bbd4fac4bbdbcb58f8 (diff) |
phylib: rename reset-(post-)delay-us to reset-(de)assert-us
As suggested by Rob Herring [1] rename the previously introduced
reset-{,post-}delay-us bindings to the clearer reset-{,de}assert-us
[1] https://patchwork.kernel.org/patch/10104905/
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | Documentation/devicetree/bindings/net/phy.txt | 8 | ||||
-rw-r--r-- | drivers/net/phy/mdio_device.c | 2 | ||||
-rw-r--r-- | drivers/of/of_mdio.c | 7 | ||||
-rw-r--r-- | include/linux/mdio.h | 4 |
4 files changed, 11 insertions, 10 deletions
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt index 72860ce7f610..d2169a56f5e3 100644 --- a/Documentation/devicetree/bindings/net/phy.txt +++ b/Documentation/devicetree/bindings/net/phy.txt | |||
@@ -55,10 +55,10 @@ Optional Properties: | |||
55 | 55 | ||
56 | - reset-gpios: The GPIO phandle and specifier for the PHY reset signal. | 56 | - reset-gpios: The GPIO phandle and specifier for the PHY reset signal. |
57 | 57 | ||
58 | - reset-delay-us: Delay after the reset was asserted in microseconds. | 58 | - reset-assert-us: Delay after the reset was asserted in microseconds. |
59 | If this property is missing the delay will be skipped. | 59 | If this property is missing the delay will be skipped. |
60 | 60 | ||
61 | - reset-post-delay-us: Delay after the reset was deasserted in microseconds. | 61 | - reset-deassert-us: Delay after the reset was deasserted in microseconds. |
62 | If this property is missing the delay will be skipped. | 62 | If this property is missing the delay will be skipped. |
63 | 63 | ||
64 | Example: | 64 | Example: |
@@ -70,6 +70,6 @@ ethernet-phy@0 { | |||
70 | reg = <0>; | 70 | reg = <0>; |
71 | 71 | ||
72 | reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; | 72 | reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; |
73 | reset-delay-us = <1000>; | 73 | reset-assert-us = <1000>; |
74 | reset-post-delay-us = <2000>; | 74 | reset-deassert-us = <2000>; |
75 | }; | 75 | }; |
diff --git a/drivers/net/phy/mdio_device.c b/drivers/net/phy/mdio_device.c index 843c1dde93e4..c924700cf37b 100644 --- a/drivers/net/phy/mdio_device.c +++ b/drivers/net/phy/mdio_device.c | |||
@@ -126,7 +126,7 @@ void mdio_device_reset(struct mdio_device *mdiodev, int value) | |||
126 | 126 | ||
127 | gpiod_set_value(mdiodev->reset, value); | 127 | gpiod_set_value(mdiodev->reset, value); |
128 | 128 | ||
129 | d = value ? mdiodev->reset_delay : mdiodev->reset_post_delay; | 129 | d = value ? mdiodev->reset_assert_delay : mdiodev->reset_deassert_delay; |
130 | if (d) | 130 | if (d) |
131 | usleep_range(d, d + max_t(unsigned int, d / 10, 100)); | 131 | usleep_range(d, d + max_t(unsigned int, d / 10, 100)); |
132 | } | 132 | } |
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index f4c73292b304..1b9ef35cf0d9 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c | |||
@@ -77,9 +77,10 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, | |||
77 | if (of_property_read_bool(child, "broken-turn-around")) | 77 | if (of_property_read_bool(child, "broken-turn-around")) |
78 | mdio->phy_ignore_ta_mask |= 1 << addr; | 78 | mdio->phy_ignore_ta_mask |= 1 << addr; |
79 | 79 | ||
80 | of_property_read_u32(child, "reset-delay-us", &phy->mdio.reset_delay); | 80 | of_property_read_u32(child, "reset-assert-us", |
81 | of_property_read_u32(child, "reset-post-delay-us", | 81 | &phy->mdio.reset_assert_delay); |
82 | &phy->mdio.reset_post_delay); | 82 | of_property_read_u32(child, "reset-deassert-us", |
83 | &phy->mdio.reset_deassert_delay); | ||
83 | 84 | ||
84 | /* Associate the OF node with the device structure so it | 85 | /* Associate the OF node with the device structure so it |
85 | * can be looked up later */ | 86 | * can be looked up later */ |
diff --git a/include/linux/mdio.h b/include/linux/mdio.h index e37c21d8eb19..268aad47ecd3 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h | |||
@@ -41,8 +41,8 @@ struct mdio_device { | |||
41 | int addr; | 41 | int addr; |
42 | int flags; | 42 | int flags; |
43 | struct gpio_desc *reset; | 43 | struct gpio_desc *reset; |
44 | unsigned int reset_delay; | 44 | unsigned int reset_assert_delay; |
45 | unsigned int reset_post_delay; | 45 | unsigned int reset_deassert_delay; |
46 | }; | 46 | }; |
47 | #define to_mdio_device(d) container_of(d, struct mdio_device, dev) | 47 | #define to_mdio_device(d) container_of(d, struct mdio_device, dev) |
48 | 48 | ||