From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FF4EC433EF for ; Fri, 8 Oct 2021 12:24:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 798B260F44 for ; Fri, 8 Oct 2021 12:24:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230187AbhJHM0W (ORCPT ); Fri, 8 Oct 2021 08:26:22 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:55920 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241199AbhJHM0W (ORCPT ); Fri, 8 Oct 2021 08:26:22 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1mYovH-0003dn-28; Fri, 08 Oct 2021 20:24:23 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1mYovD-00086s-P6; Fri, 08 Oct 2021 20:24:19 +0800 Date: Fri, 8 Oct 2021 20:24:19 +0800 From: Herbert Xu To: Markus Schneider-Pargmann Cc: Sean Wang , Matt Mackall , linux-mediatek@lists.infradead.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] hwrng: mediatek - Force runtime pm ops for sleep ops Message-ID: <20211008122419.GE31060@gondor.apana.org.au> References: <20210930191242.2542315-1-msp@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210930191242.2542315-1-msp@baylibre.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Sep 30, 2021 at 09:12:42PM +0200, Markus Schneider-Pargmann wrote: > Currently mtk_rng_runtime_suspend/resume is called for both runtime pm > and system sleep operations. > > This is wrong as these should only be runtime ops as the name already > suggests. Currently freezing the system will lead to a call to > mtk_rng_runtime_suspend even if the device currently isn't active. This > leads to a clock warning because it is disabled/unprepared although it > isn't enabled/prepared currently. > > This patch fixes this by only setting the runtime pm ops and forces to > call the runtime pm ops from the system sleep ops as well if active but > not otherwise. > > Signed-off-by: Markus Schneider-Pargmann > --- > drivers/char/hw_random/mtk-rng.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt