]> Git Repo - u-boot.git/commit
net: dm: fec: Fix phy-reset-duration clamping and defaults
authorMartin Fuzzey <[email protected]>
Thu, 4 Oct 2018 17:59:19 +0000 (19:59 +0200)
committerJoe Hershberger <[email protected]>
Wed, 24 Oct 2018 19:45:37 +0000 (14:45 -0500)
commit331fcabe4f9b4c7ec58d070da039f875673c9c9d
tree171642fd228c498a4f29692231a71443ac6dfd41
parent9b8b91888493d25873b835d262b89f1c4efa0df7
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 <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
drivers/net/fec_mxc.c
This page took 0.032831 seconds and 4 git commands to generate.