summaryrefslogtreecommitdiffstats
path: root/drivers/soc/imx
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2022-12-16 21:08:19 +0100
committerShawn Guo <shawnguo@kernel.org>2023-01-01 04:11:54 +0100
commitf4b3948e5a90f49b33e89b019d3c641ab9a6fc59 (patch)
treef048b05bc842e9a790552cdf7f1de601a1942793 /drivers/soc/imx
parentsoc: imx: add Kconfig symbols for blk-ctrl drivers (diff)
downloadlinux-f4b3948e5a90f49b33e89b019d3c641ab9a6fc59.tar.xz
linux-f4b3948e5a90f49b33e89b019d3c641ab9a6fc59.zip
soc: imx: imx8mp-blk-ctrl: add instance specific probe function
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> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'drivers/soc/imx')
-rw-r--r--drivers/soc/imx/imx8mp-blk-ctrl.c7
1 files changed, 7 insertions, 0 deletions
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;