From patchwork Tue Dec 12 03:25:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JiaJie Ho X-Patchwork-Id: 177072 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp7487779vqy; Mon, 11 Dec 2023 19:26:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEi8ZyGP1xG3gvvLxrDTFaqODSBoF6bB2WVvGYMsNBYJ3UReaJZUgFPfGA42cKMZUD1Rlpc X-Received: by 2002:a05:6808:2125:b0:3b8:9d44:8c3d with SMTP id r37-20020a056808212500b003b89d448c3dmr6200902oiw.31.1702351571840; Mon, 11 Dec 2023 19:26:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702351571; cv=none; d=google.com; s=arc-20160816; b=X6lxra6gfFi0gHCoq6VY1rSXgFjFZNb2npxH4Cj5MlfAATtFZ9t46R3JRQXspR2nD5 G60uMdo2xJ0tCdKtE9YiamU+EfXTDMmm4dipXwu5KqtcjVXxTjNLu3ODFo92wjgxGLEV ZpDnU8IJ7f9z1nV2KlOKulQwYL8TnbttH0VzjGtxTMf7q/t3zAd1TGSdNlsIyE9/x/8l pWQuYxHFZUuhr74jrgBZPCU+r0WR9mwglBjwHHeriX4fO1R5ujRnQEAYvVTMgUmG5Rd8 Gxlkf9LKQXu2GCGPbuTTN+308lanbLn8szkTIMToBTc7GojAALpzqMTT3vU2aegiZ0/u SkLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=27ztm8ice2pyfvdtFITC7YG/L+/6kzvBELm3c7iu8Yw=; fh=UgaLgXimiH774VNrJn8BUBFGfqqCiPxvq9A+qX5vBXk=; b=xJvV7keyptkQ2tW30vY9RF7rA6y2V/xKXb0qIgjm9L7tj4k3JzVrCgCitUOBp99JSN 5SX1DmhZ/ZNEXI4Wjf+X7P3UuO7cof6hyI8m+OciezMq7E9BkQtBa8EGNm1C0To0Jk7N UqyG+7YxaYSDF3JA8Y6PZhXnMosB83ipizp9kUNuNHAqhI15A7P4Vz/+y7XIs4S3WyMr DEDSipH6UN5FlQLoCgbggWeicm1oIOneACx0S1HH+Tnv0ajU/Liwdd7Zzmnx/ZYzDwp0 yyng3EzexSxY/JFMck0jAhxlfyIrKrSG8/r/vSf+XnFfGBl7DZ3G2IC2jaB8cPSmBt/T CecA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f9-20020a056a00228900b006cde5241c15si7223001pfe.306.2023.12.11.19.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 19:26:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BB222808BCB7; Mon, 11 Dec 2023 19:25:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345868AbjLLDZf convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 Dec 2023 22:25:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345807AbjLLDZd (ORCPT ); Mon, 11 Dec 2023 22:25:33 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7315ECD; Mon, 11 Dec 2023 19:25:40 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 46DEC24E2B3; Tue, 12 Dec 2023 11:25:39 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 12 Dec 2023 11:25:39 +0800 Received: from ubuntu.localdomain (202.188.176.82) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 12 Dec 2023 11:25:35 +0800 From: Jia Jie Ho To: Olivia Mackall , Herbert Xu , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , , , Subject: [PATCH v2 2/2] hwrng: starfive - Add runtime pm ops Date: Tue, 12 Dec 2023 11:25:27 +0800 Message-ID: <20231212032527.1250617-3-jiajie.ho@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231212032527.1250617-1-jiajie.ho@starfivetech.com> References: <20231212032527.1250617-1-jiajie.ho@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [202.188.176.82] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 11 Dec 2023 19:25:54 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785045001597460119 X-GMAIL-MSGID: 1785045001597460119 Define SET_RUNTIME_PM_OPS for StarFive TRNG driver. Signed-off-by: Jia Jie Ho --- drivers/char/hw_random/jh7110-trng.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/char/hw_random/jh7110-trng.c b/drivers/char/hw_random/jh7110-trng.c index 38474d48a25e..5053e6add877 100644 --- a/drivers/char/hw_random/jh7110-trng.c +++ b/drivers/char/hw_random/jh7110-trng.c @@ -369,8 +369,12 @@ static int __maybe_unused starfive_trng_resume(struct device *dev) return 0; } -static DEFINE_SIMPLE_DEV_PM_OPS(starfive_trng_pm_ops, starfive_trng_suspend, - starfive_trng_resume); +static const struct dev_pm_ops starfive_trng_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(starfive_trng_suspend, + starfive_trng_resume) + SET_RUNTIME_PM_OPS(starfive_trng_suspend, + starfive_trng_resume, NULL) +}; static const struct of_device_id trng_dt_ids[] __maybe_unused = { { .compatible = "starfive,jh7110-trng" },