net/enc28j60: low power mode
authorDavid Brownell <david-b@pacbell.net>
Fri, 13 Jun 2008 04:38:06 +0000 (21:38 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 18 Jun 2008 03:07:29 +0000 (23:07 -0400)
commit7dac6f8df607929e51f4fd598d80bd009c45a9f8
tree8b388f6fcbf9fbf6429f1f5ea2ac419abc30bedf
parent6fd65882f5e99972ba96f7cc92086ebac041cdf8
net/enc28j60: low power mode

Keep enc28j60 chips in low-power mode when they're not in use.
At typically 120 mA, these chips run hot even when idle; this
low power mode cuts that power usage by a factor of around 100.

This version provides a generic routine to poll a register until
its masked value equals some value ... e.g. bit set or cleared.
It's basically what the previous wait_phy_ready() did, but this
version is generalized to support the handshaking needed to
enter and exit low power mode.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Claudio Lanconelli <lanconelli.claudio@eptar.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/enc28j60.c