aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_switch.c
diff options
context:
space:
mode:
authorRussell King (Oracle) <[email protected]>2025-04-07 19:15:35 +0000
committerDavid S. Miller <[email protected]>2025-04-11 08:38:49 +0000
commit61499764e5cc5918c9f63026d3b7a34c8668d4b8 (patch)
tree3748cadc544aeb611fd246d690c9a95cd1169956 /drivers/net/ethernet/intel/ice/ice_switch.c
parentr8169: add helper rtl8125_phy_param (diff)
downloadkernel-61499764e5cc5918c9f63026d3b7a34c8668d4b8.tar.gz
kernel-61499764e5cc5918c9f63026d3b7a34c8668d4b8.zip
net: stmmac: stm32: simplify clock handling
Some stm32 implementations need the receive clock running in suspend, as indicated by dwmac->ops->clk_rx_enable_in_suspend. The existing code achieved this in a rather complex way, by passing a flag around. However, the clk API prepare/enables are counted - which means that a clock won't be stopped as long as there are more prepare and enables than disables and unprepares, just like a reference count. Therefore, we can simplify this logic by calling clk_prepare_enable() an additional time in the probe function if this flag is set, and then balancing that at remove time. With this, we can avoid passing a "are we suspending" and "are we resuming" flag to various functions in the driver. Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_switch.c')
0 files changed, 0 insertions, 0 deletions