From: Lucas Stach <l.stach@pengutronix.de>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
Richard Zhu <hongxing.zhu@nxp.com>
Cc: NXP Linux Team <linux-imx@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
marcel.ziswiler@toradex.com, marex@denx.de,
tharvey@gateworks.com, alexander.stein@ew.tq-group.com,
richard.leitner@linux.dev, lukas@mntre.com,
patchwork-lst@pengutronix.de, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/4] soc: imx: imx8mp-blk-ctrl: add instance specific probe function
Date: Thu, 15 Dec 2022 18:49:40 +0100 [thread overview]
Message-ID: <20221215174942.2835690-2-l.stach@pengutronix.de> (raw)
In-Reply-To: <20221215174942.2835690-1-l.stach@pengutronix.de>
Allow the specific blk-ctrl instance to define a function which will
be called during probe to provide device specific extensions.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Lukas F. Hartmann <lukas@mntre.com>
---
drivers/soc/imx/imx8mp-blk-ctrl.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
index 0e3b6ba22f94..b3d9f6e083ba 100644
--- a/drivers/soc/imx/imx8mp-blk-ctrl.c
+++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
@@ -60,6 +60,7 @@ struct imx8mp_blk_ctrl_domain {
struct imx8mp_blk_ctrl_data {
int max_reg;
+ int (*probe) (struct imx8mp_blk_ctrl *bc);
notifier_fn_t power_notifier_fn;
void (*power_off) (struct imx8mp_blk_ctrl *bc, struct imx8mp_blk_ctrl_domain *domain);
void (*power_on) (struct imx8mp_blk_ctrl *bc, struct imx8mp_blk_ctrl_domain *domain);
@@ -634,6 +635,12 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
goto cleanup_provider;
}
+ if (bc_data->probe) {
+ ret = bc_data->probe(bc);
+ if (ret)
+ goto cleanup_provider;
+ }
+
dev_set_drvdata(dev, bc);
return 0;
--
2.30.2
next prev parent reply other threads:[~2022-12-15 17:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 17:49 [PATCH v2 1/4] dt-bindings: soc: imx8mp-hsio-blk-ctrl: add clock cells Lucas Stach
2022-12-15 17:49 ` Lucas Stach [this message]
2022-12-15 17:49 ` [PATCH v2 3/4] soc: imx: imx8mp-blk-ctrl: expose high performance PLL clock Lucas Stach
2022-12-16 0:02 ` kernel test robot
2022-12-16 5:15 ` kernel test robot
2022-12-15 17:49 ` [PATCH v2 4/4] arm64: dts: imx8mp: add clock-cells to hsio-blk-ctrl Lucas Stach
2022-12-16 11:39 ` [PATCH v2 1/4] dt-bindings: soc: imx8mp-hsio-blk-ctrl: add clock cells Krzysztof Kozlowski
2022-12-17 8:14 ` Hongxing Zhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221215174942.2835690-2-l.stach@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=alexander.stein@ew.tq-group.com \
--cc=devicetree@vger.kernel.org \
--cc=hongxing.zhu@nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=lukas@mntre.com \
--cc=marcel.ziswiler@toradex.com \
--cc=marex@denx.de \
--cc=patchwork-lst@pengutronix.de \
--cc=richard.leitner@linux.dev \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=tharvey@gateworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).