Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1327818rwl; Fri, 24 Mar 2023 09:06:24 -0700 (PDT) X-Google-Smtp-Source: AKy350b7keN34rfiHnE7WZVVo/CY6X499hQ9jghIkf0vI4gN51blDcED+w7Mu9fRaw0zm3fErp3H X-Received: by 2002:a05:6402:20b:b0:4fe:ddf:8d8c with SMTP id t11-20020a056402020b00b004fe0ddf8d8cmr3478709edv.13.1679673983947; Fri, 24 Mar 2023 09:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679673983; cv=none; d=google.com; s=arc-20160816; b=XaHd5fOY1sCIHd6u+LFz+9crhntKietnmP4f7koeOPZGucMrsCXHNyroshhjZGQaWg swOyKldDOOi2xoCDxHIcDsx9kpeUJGTLHMp5c2PPqZEMs7xNqUL9lkI+ci5pk9EFGHxd jcS14LUw6gPDJuFjJknMwDWEL+mP9dTZpUcTSBDEglxF0Z3kz0bCQzu52h9gPWXyLv8T ifdaUW1sTYfipLruKTonBCP/ATz18MvUqWsrjb2aGZj0tQqBi2Uifigacw99Fo7BcD9D ke5DLKINjLhTgWpH93DfQupXtghJI5hD+iooo/oyzteH6YPqqt+1D3qePBjjBnpYu3yP qiCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=XIEJ26g5C7Xsq4kJl8pzoAVXELFHCuO23+awpC+sWqg=; b=tG1aMuv14f2JVtuXnV4xTtOwy9hdUKhD39lqFCnFEBqf+0DY1Rv0E4I3uTmv6dAMWe 3lavzEZMOeU+vFXYDrARP/j/fSoOKytRYjBd/bOr90vNtf8qNUl3ji2r9H3yaTgsxSUr qPmy5wH2BpNsjYhtf+VfXokBhvp4i1XW/IaxqAmHXOs5rTvlOXGwxnzsUJsKKrcL1+8P Qr3ykLF3olcHs8eRVPcSt6I2eXKVsLZ0NqtFV34ilTrJElTnJ2oIFx64T4i6MNQ9Chw0 0THrb2GR0ZTlu9cSsPnCBVJ6RDjmTvlKLcslkqFmjANKujTZbfPjQ+PsLfYpj2P260wK SDzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d16-20020a056402517000b004fd2b0b6f16si13453467ede.355.2023.03.24.09.05.59; Fri, 24 Mar 2023 09:06:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232255AbjCXPyj (ORCPT + 99 others); Fri, 24 Mar 2023 11:54:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232063AbjCXPyh (ORCPT ); Fri, 24 Mar 2023 11:54:37 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3394F19698 for ; Fri, 24 Mar 2023 08:54:36 -0700 (PDT) Received: from moin.white.stw.pengutronix.de ([2a0a:edc0:0:b01:1d::7b] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfjkE-0003wQ-UE; Fri, 24 Mar 2023 16:54:23 +0100 Received: from pengutronix.de (unknown [IPv6:2a01:4f8:1c1c:29e9:22:41ff:fe00:1400]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 0D55919B9E7; Fri, 24 Mar 2023 15:54:19 +0000 (UTC) Date: Fri, 24 Mar 2023 16:54:18 +0100 From: Marc Kleine-Budde To: Dario Binacchi Cc: linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Amarula patchwork , Vincent Mailhol , Alexandre Torgue , michael@amarulasolutions.com, Rob Herring , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [RESEND PATCH v7 5/5] can: bxcan: add support for ST bxCAN controller Message-ID: <20230324155418.nn44wxwjjjiqqhdf@pengutronix.de> References: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> <20230315211040.2455855-6-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cpmjthz5s44cl3qg" Content-Disposition: inline In-Reply-To: <20230315211040.2455855-6-dario.binacchi@amarulasolutions.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:b01:1d::7b X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cpmjthz5s44cl3qg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 15.03.2023 22:10:40, Dario Binacchi wrote: [...] > +static int __maybe_unused bxcan_suspend(struct device *dev) > +{ > + struct net_device *ndev =3D dev_get_drvdata(dev); > + struct bxcan_priv *priv =3D 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 =3D 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 --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung N=C3=BCrnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --cpmjthz5s44cl3qg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEDs2BvajyNKlf9TJQvlAcSiqKBOgFAmQdx6cACgkQvlAcSiqK BOhIzAf/QrMxYd4klMcThRsnQ4udN8k2Eaj/CiWuJ172yNqr0dk3sAwYuvvpbwal R1HzHoAkcTECNx+HOmGYSmZKNDONrWm84brl+wsZPSPIY1BmguVe3MyDKVD8Hv5/ Mu8eMml9CzKNdvV6n1GpCiCOGl4QTAJzRxVmzJ7QH1UTlXSWj8z0jh3JEP/SBp5Q uyZM4JyS+UbFCz6Ic5Vdnod+1kGJfC9oN8hYkp91s1WEmGkYvZjWzrK1Etuycch0 Sugr0VPvKlxSQ8Mi0heuO7ms09iF3pgs1k6SVSpKHhNAEXS/wTmdT4IHQqljaPDR o9JdAlJOEEXmCRL+Bb/AwISMZSv2uA== =8O6F -----END PGP SIGNATURE----- --cpmjthz5s44cl3qg--