
22 Oct
2018
22 Oct
'18
10:54 p.m.
On Thu, Oct 4, 2018 at 1:02 PM Martin Fuzzey martin.fuzzey@flowbird.group wrote:
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