From patchwork Sun Jan 30 21:02:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 12730127 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CEF02C433EF for ; Sun, 30 Jan 2022 21:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UuoSLgAheh5Ky8RkbDdUbzzzfIW7FJOXvhj5RDWuKjs=; b=sXZlYKm3SctHfx 88unH+9+0yEUUCzISXjerssf+ZnJEYkqwCauXrKycL3v5lxRr6+0DxRJyCvc/MnXP2Anh+PNAoA1L 5loFesnHryWqptrkeunoNw23PUqDr22Uj2SbVRPrqVz0jTk0U33kRm5mSWUwsPqLlrYwiz8Vn8o/a o15LpwPjkLQC1LSYibD6qJG1EdR0BWOP3E/Z3zcOwo29js+tA8PsbbkbFBBWHPSRe6Exxl8+C12Ba vpoMSl8WI9wzkTWboyXOadbRB7MWb3dYVjLHvz+Hva2F8pzGNVJ5u//a4FzQZz+L21VYbLs+3DW7Z 08mj6MR3y+O/qZP7X64g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEHLE-007RQ6-BO; Sun, 30 Jan 2022 21:02:32 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEHL9-007RNu-Ks for linux-arm-kernel@lists.infradead.org; Sun, 30 Jan 2022 21:02:29 +0000 Received: by mail-wr1-x429.google.com with SMTP id a13so21612377wrh.9 for ; Sun, 30 Jan 2022 13:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MNQUuQFFfpeWugiolZqopaG6OtAWAYvBDQU1DSusnnk=; b=kHh6+rnAfh1UicGsC+iJz9NJQum0K2Cxfwo4EqwieSebI9JjCzku9c+/47G38UUuuS OMZ9UMlxqVkK1n1TuEvSgEESwt2BSbn2IfkLx4Rc8qxW9NOrdgJ/bSED5jAOrNXM3EtJ lTZLyHJEufuRQdpYbgHsGC8Ts4qncbAug9thUjRUm2n0kk/1iO4QT3pUHZVbWtTF7hIf /HnMPGBos/MHr+Zx2okCr8mjdtkGr2cy7Akp+A1jIHwsnaGDpwFnEo6zggRlT1jKt4Y1 wFfs6rICskTLjQE2VCdu021HMul+hsBRy6s8mvrCRO4+hvrbUvoTzDAcYnaM8XTEJsAq 7k/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MNQUuQFFfpeWugiolZqopaG6OtAWAYvBDQU1DSusnnk=; b=DIpyLet6AAIVELKCnV9mo03V+Df4P/TJRGSqlkF5Py6bsm/U2uSWXqV9ymtn0gFdu5 DNYQ0vrtN3G4ZcRqQwdqGX6NiQlICpkP/8rWpmbaHC/R1g/Hq70i0o1BAQ7A6d/4wS+2 1VDR9k1vVk0fry0WdutPM4l+qGWnT9RaFL8/ETvM9hEtr1q62xq42jXpCZJGquI8+ZTU 5El0Bq45VKD65eJm8tyIbwNbT5SNL1I0bzARfhkOjy5dr4diQrXQyDNhAISaCVfj73FO sKGo/8lfCSuOIteAlHv5TbLGFVzds74kR+0PCTTRs6+nFrXvQY3JUWX6+TJf6SKosc3x vpgw== X-Gm-Message-State: AOAM5321yO89uT5JS63GpSKLjLDXQtevgnYsCXVGDVCzFhdxX2pRj/Lv kLR5x9siASlU3Af8POiyQVcAKg== X-Google-Smtp-Source: ABdhPJwnWuziiq1f4PdtrcCYU1OtKdjwSfYjmTBoTDV76XQcm47JlfCtRFtPAz9INT1cD5L8qeIjoQ== X-Received: by 2002:adf:fe01:: with SMTP id n1mr15207083wrr.141.1643576545483; Sun, 30 Jan 2022 13:02:25 -0800 (PST) Received: from localhost.localdomain ([2a01:e34:ed2f:f020:d3c5:fe0:78a4:5227]) by smtp.gmail.com with ESMTPSA id i6sm9845185wrw.8.2022.01.30.13.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jan 2022 13:02:24 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rjw@rjwysocki.net Cc: heiko@sntech.de, lukasz.luba@arm.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, ulf.hansson@linaro.org, linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC support), linux-rockchip@lists.infradead.org (open list:ARM/Rockchip SoC support) Subject: [PATCH v1 7/7] dtpm/soc/rk3399: Add the ability to unload the module Date: Sun, 30 Jan 2022 22:02:09 +0100 Message-Id: <20220130210210.549877-7-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220130210210.549877-1-daniel.lezcano@linaro.org> References: <20220130210210.549877-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220130_130227_704460_78D97C67 X-CRM114-Status: GOOD ( 11.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The dtpm hierarchy can now be removed with the dtpm_destroy_hierarchy() function. Add the module_exit() callback so the module can be unloaded by removing the previously created hierarchy. Signed-off-by: Daniel Lezcano Reviewed-by: Ulf Hansson --- drivers/soc/rockchip/dtpm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/soc/rockchip/dtpm.c b/drivers/soc/rockchip/dtpm.c index ebebb748488b..5a23784b5221 100644 --- a/drivers/soc/rockchip/dtpm.c +++ b/drivers/soc/rockchip/dtpm.c @@ -52,6 +52,12 @@ static int __init rockchip_dtpm_init(void) } module_init(rockchip_dtpm_init); +static void __exit rockchip_dtpm_exit(void) +{ + return dtpm_destroy_hierarchy(); +} +module_exit(rockchip_dtpm_exit); + MODULE_SOFTDEP("pre: panfrost cpufreq-dt"); MODULE_DESCRIPTION("Rockchip DTPM driver"); MODULE_LICENSE("GPL");