[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230324155418.nn44wxwjjjiqqhdf@pengutronix.de>
Date: Fri, 24 Mar 2023 16:54:18 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Dario Binacchi <dario.binacchi@...rulasolutions.com>
Cc: linux-kernel@...r.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Amarula patchwork <linux-amarula@...rulasolutions.com>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
michael@...rulasolutions.com, Rob Herring <robh@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Wolfgang Grandegger <wg@...ndegger.com>,
linux-can@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [RESEND PATCH v7 5/5] can: bxcan: add support for ST bxCAN
controller
On 15.03.2023 22:10:40, Dario Binacchi wrote:
[...]
> +static int __maybe_unused bxcan_suspend(struct device *dev)
> +{
> + struct net_device *ndev = dev_get_drvdata(dev);
> + struct bxcan_priv *priv = netdev_priv(ndev);
> +
> + if (!netif_running(ndev))
> + return 0;
> +
> + netif_stop_queue(ndev);
> + netif_device_detach(ndev);
> +
> + bxcan_enter_sleep_mode(priv);
> + priv->can.state = CAN_STATE_SLEEPING;
> + clk_disable_unprepare(priv->clk);
The driver enabled the clock in probe, right? So in case the interface
is down you don't disable the clock and keep it running during
suspend. Is this a problem?
You can disable the clock in probe and enable it in open/disable in
close.
> + return 0;
> +}
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists