mbox series

[net-next,0/5] dwmac-sun8i cleanup and shutdown hook

Message ID 20210103112542.35149-1-samuel@sholland.org
Headers show
Series dwmac-sun8i cleanup and shutdown hook | expand

Message

Samuel Holland Jan. 3, 2021, 11:25 a.m. UTC
These patches clean up some things I noticed while fixing suspend/resume
behavior. The first four are minor code improvements. The last one adds
a shutdown hook to minimize power consumption on boards without a PMIC.

Samuel Holland (5):
  net: stmmac: dwmac-sun8i: Return void from PHY unpower
  net: stmmac: dwmac-sun8i: Remove unnecessary PHY power check
  net: stmmac: dwmac-sun8i: Use reset_control_reset
  net: stmmac: dwmac-sun8i: Minor probe function cleanup
  net: stmmac: dwmac-sun8i: Add a shutdown callback

 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 31 ++++++++++++-------
 1 file changed, 19 insertions(+), 12 deletions(-)

Comments

Chen-Yu Tsai Jan. 6, 2021, 10 a.m. UTC | #1
On Sun, Jan 3, 2021 at 7:25 PM Samuel Holland <samuel@sholland.org> wrote:
>

> Use the appropriate function instead of reimplementing it,

> and update the error message to match the code.

>

> Signed-off-by: Samuel Holland <samuel@sholland.org>


Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Chen-Yu Tsai Jan. 6, 2021, 10:01 a.m. UTC | #2
On Sun, Jan 3, 2021 at 7:25 PM Samuel Holland <samuel@sholland.org> wrote:
>

> Adjust the spacing and use an explicit "return 0" in the success path

> to make the function easier to parse.

>

> Signed-off-by: Samuel Holland <samuel@sholland.org>


Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Chen-Yu Tsai Jan. 6, 2021, 10:07 a.m. UTC | #3
On Sun, Jan 3, 2021 at 7:25 PM Samuel Holland <samuel@sholland.org> wrote:
>

> The Ethernet MAC and PHY are usually major consumers of power on boards

> which may not be able to fully power off (that have no PMIC). Powering

> down the MAC and internal PHY saves power while these boards are "off".

>

> Signed-off-by: Samuel Holland <samuel@sholland.org>


Reviewed-by: Chen-Yu Tsai <wens@csie.org>