net: ravb: Set config mode in ndo_open and reset mode in ndo_close
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Fri, 2 Feb 2024 08:41:34 +0000 (10:41 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 6 Feb 2024 10:14:57 +0000 (11:14 +0100)
commit76fd52c1007785fcea1d3405907cec940d44f403
tree7926ca4f0f5d7fa3e9337744c55297315975f889
parenta6a85ba36fd0d3e5595a4fcf57e0811826254ff7
net: ravb: Set config mode in ndo_open and reset mode in ndo_close

As some IP variants switch to reset mode (and thus the register contents is
lost) when setting clocks (due to module standby functionality) to be able
to implement runtime PM and save more power, set the IP's operating mode to
reset at the end of the probe. Along with it, in the ndo_open API the IP
will be switched to configuration, then operation mode. In the ndo_close
API, the IP will be switched back to reset mode. This allows implementing
runtime PM and, along with it, save more power when the IP is not used.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/renesas/ravb_main.c