[v5,09/54] clk: mediatek: mt2712-apmixedsys: Add .remove() callback for module build
Message ID | 20230222092543.19187-10-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp473211wrd; Wed, 22 Feb 2023 01:28:16 -0800 (PST) X-Google-Smtp-Source: AK7set/+Ar4bo/cwyUGJgEfG/Kul3TXsZ0tmyEYaq/DLseLJfJk7u56EzA11dnf5nAF1z323sl7f X-Received: by 2002:a05:6a20:3941:b0:c7:3bb5:72f5 with SMTP id r1-20020a056a20394100b000c73bb572f5mr8719055pzg.61.1677058096358; Wed, 22 Feb 2023 01:28:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677058096; cv=none; d=google.com; s=arc-20160816; b=BrYtFUq8dC1EnE+EOQC8XDabRwjezu/EvSEFLGQ4Id1y0Vu2lCSvhUyqQDBLyPS7EU JCZ2hZQ6/mnYDzz15oy/HWDaRZY/Wl7uKVATLuyZd6w43GyojC6Yr8y0Y+yoLP6ZwX0S kvgHUsk006gMdO33JFyS/s3HSVIF1Ta6WmPvIxYuTuLbsx0KaZvqCe3VayABLMWgh3oS AtkijWMQS3g88bNk1EF0zg1T5EdZ3BYk9/k5OEHS3/TD7yGfYHde5Ro5Oys+tsaXUo9a Y3OAZTYdfMPrh29nEusomQuudAS/CJJUUY2fDreWjKCvzxavDL9sH4f5ySNTH1e+el0z AuYw== 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:cc:to:from :dkim-signature; bh=8MvGISZkN55EMPWuuJdXCWFCtP9jqMvtgeY0ONo0qQ8=; b=A8d3bY6MNDk8gDPy7si1UcaMtXWFPJnd6vSvwej6kWcgesEOvY3SrNXej3962vzayZ BHd1BraUQ2H0s07L2Bg8Xva1Jv1/EsmWuLI9/RWy0Yg9zOFvw1qlEy6yZPhdCfYHDrxl s5gzEcW0c5E+TDu4bkCtyR5fn6RO4CqavbT2H+WO3DLn6sijMxL1x/5+WF7UCY8HiLgP u+E+0EvBSDTAupdvyWueX62E02JEHrs33TTIqVX4djOcrG3vlG4ts+6gFNQACKpvZxF6 oHHj6cTvi1B+AfLULOZc4OqTLx2SV5slFBBBpNaS7tCJq8ZQCt4JNian1ky0a14d+x0S xLSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=JsM35i8F; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v23-20020a631517000000b004fb7d5c5f04si5555724pgl.444.2023.02.22.01.28.03; Wed, 22 Feb 2023 01:28:16 -0800 (PST) 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; dkim=pass header.i=@collabora.com header.s=mail header.b=JsM35i8F; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231370AbjBVJ0j (ORCPT <rfc822;dengxinlin2429@gmail.com> + 99 others); Wed, 22 Feb 2023 04:26:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231400AbjBVJ0K (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Feb 2023 04:26:10 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73D7E37568; Wed, 22 Feb 2023 01:26:09 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1B2FC66021D0; Wed, 22 Feb 2023 09:26:07 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677057968; bh=c06sztOuI8DQ5DDjj8gCYxk1bqozhA9LrG1lTO5UoY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JsM35i8F2wX/hpUuWhsk2bm1yMjA2BtMDjNpd4WgR6tM5B1+gzAvcFIlprMUbatIh PUVPAOJ+r/JnOQZwMCKMoK0E3sNDlICQWV/qZjXFizIcdURCMrY6YxdvjP4fRU6sTZ oYea0zOGiZmW5RMFYSGMziX/SgGhqhsJBrIjPi5sOFud9QoQqtngIz2TORHzakVz3q GUW1Bf3ts+difpD5wfmof8P5JRiausjlB9pZxbWxoq5eRcSu0ZmWCSsgaNEdGajcmn TbOoGidA7hZ5lc8/hEbSwVF4IhaGZpc+fAWb0SQtcOD5/Y5nimgMHT6K6B7TBAuw4p Ma53Qf0VyhhXQ== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: mturquette@baylibre.com Cc: sboyd@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, johnson.wang@mediatek.com, miles.chen@mediatek.com, chun-jie.chen@mediatek.com, daniel@makrotopia.org, fparent@baylibre.com, msp@baylibre.com, nfraprado@collabora.com, rex-bc.chen@mediatek.com, zhaojh329@gmail.com, sam.shih@mediatek.com, edward-jw.yang@mediatek.com, yangyingliang@huawei.com, granquet@baylibre.com, pablo.sun@mediatek.com, sean.wang@mediatek.com, chen.zhong@mediatek.com, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v5 09/54] clk: mediatek: mt2712-apmixedsys: Add .remove() callback for module build Date: Wed, 22 Feb 2023 10:24:58 +0100 Message-Id: <20230222092543.19187-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230222092543.19187-1-angelogioacchino.delregno@collabora.com> References: <20230222092543.19187-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758522870340932110?= X-GMAIL-MSGID: =?utf-8?q?1758522870340932110?= |
Series |
MediaTek clocks: full module build and cleanups
|
|
Commit Message
AngeloGioacchino Del Regno
Feb. 22, 2023, 9:24 a.m. UTC
Add a .remove() callback to the apmixedsys driver to allow full module build; while at it, also change the usage of builtin_platform_driver() to module_platform_driver() to actually make use of the new callback. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> --- drivers/clk/mediatek/clk-mt2712-apmixedsys.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/mediatek/clk-mt2712-apmixedsys.c b/drivers/clk/mediatek/clk-mt2712-apmixedsys.c index 1e1a8272a4ac..2f4061c9a59e 100644 --- a/drivers/clk/mediatek/clk-mt2712-apmixedsys.c +++ b/drivers/clk/mediatek/clk-mt2712-apmixedsys.c @@ -138,6 +138,18 @@ static int clk_mt2712_apmixed_probe(struct platform_device *pdev) return r; } +static int clk_mt2712_apmixed_remove(struct platform_device *pdev) +{ + struct device_node *node = pdev->dev.of_node; + struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); + + of_clk_del_provider(node); + mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data); + mtk_free_clk_data(clk_data); + + return 0; +} + static const struct of_device_id of_match_clk_mt2712_apmixed[] = { { .compatible = "mediatek,mt2712-apmixedsys" }, { /* sentinel */ } @@ -145,9 +157,10 @@ static const struct of_device_id of_match_clk_mt2712_apmixed[] = { static struct platform_driver clk_mt2712_apmixed_drv = { .probe = clk_mt2712_apmixed_probe, + .remove = clk_mt2712_apmixed_remove, .driver = { .name = "clk-mt2712-apmixed", .of_match_table = of_match_clk_mt2712_apmixed, }, }; -builtin_platform_driver(clk_mt2712_apmixed_drv) +module_platform_driver(clk_mt2712_apmixed_drv)