]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: microchip: Implement recommended reset timing
authorPaul Barker <pbarker@konsulko.com>
Wed, 9 Sep 2020 10:04:17 +0000 (11:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Sep 2020 18:26:32 +0000 (11:26 -0700)
commit1db9fe5d92140a5b9c4fc655192c372e0965b33e
tree3e5d7a73d395ee8cea1722e2489af0e3c8102439
parent0d8c8b2888c9b1d2e68841961bb2f39ea1788c72
net: dsa: microchip: Implement recommended reset timing

The datasheet for the ksz9893 and ksz9477 switches recommend waiting at
least 100us after the de-assertion of reset before trying to program the
device through any interface.

Also switch the existing msleep() call to usleep_range() as recommended
in Documentation/timers/timers-howto.rst. The 2ms range used here is
somewhat arbitrary, as long as the reset is asserted for at least 10ms
we should be ok.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_common.c