diff options
author | Martin Fuzzey <martin.fuzzey@flowbird.group> | 2018-10-04 19:59:19 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2019-04-11 19:13:16 +0200 |
commit | 31e0046e004d179c726de1605cba77e1c8e9b81b (patch) | |
tree | 0b57827c4c81e02dda4c3f0a82ee2035399d0bc9 /cmd/iotrace.c | |
parent | f2cc15d069d63f65745257977c7b3c8259e86925 (diff) |
net: dm: fec: Fix phy-reset-duration clamping and defaults
The DT binding says:
- phy-reset-duration : Reset duration in milliseconds. Should present
only if property "phy-reset-gpios" is available. Missing the property
will have the duration be 1 millisecond. Numbers greater than 1000 are
invalid and 1 millisecond will be used instead.
However the current code:
- clamps values greater than 1000ms to 1000ms rather than 1.
- does not initialize the delay if the property does not exist
(else clause mismatch)
- returns an error if phy-reset-gpios is not defined
Fix all this and simplify by using dev_read_u32_default()
Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
(cherry picked from commit 331fcabe4f9b4c7ec58d070da039f875673c9c9d)
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'cmd/iotrace.c')
0 files changed, 0 insertions, 0 deletions