[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114-unique-oyster-of-honor-963b97-mkl@pengutronix.de>
Date: Thu, 14 Nov 2024 10:33:01 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Sean Nyekjaer <sean@...nix.com>
Cc: Chandrasekar Ramakrishnan <rcsekar@...sung.com>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, linux-can@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] can: tcan4x5x: add deinit callback to set standby
mode
On 11.11.2024 11:51:24, Sean Nyekjaer wrote:
> At Vsup 12V, standby mode will save 7-8mA, when the interface is
> down.
>
> Signed-off-by: Sean Nyekjaer <sean@...nix.com>
> ---
> drivers/net/can/m_can/tcan4x5x-core.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/net/can/m_can/tcan4x5x-core.c b/drivers/net/can/m_can/tcan4x5x-core.c
> index 2f73bf3abad889c222f15c39a3d43de1a1cf5fbb..c8336750cdc276b539dde7555b2510fba0d0da75 100644
> --- a/drivers/net/can/m_can/tcan4x5x-core.c
> +++ b/drivers/net/can/m_can/tcan4x5x-core.c
> @@ -270,6 +270,17 @@ static int tcan4x5x_init(struct m_can_classdev *cdev)
> return ret;
> }
>
> +static int tcan4x5x_deinit(struct m_can_classdev *cdev)
> +{
> + struct tcan4x5x_priv *tcan4x5x = cdev_to_priv(cdev);
> + int ret = 0;
> +
> + ret = regmap_update_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG,
> + TCAN4X5X_MODE_SEL_MASK, TCAN4X5X_MODE_STANDBY);
return regmap_update_bits();
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-9 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists