Commit f4b3948e authored by Lucas Stach's avatar Lucas Stach Committed by Shawn Guo
Browse files

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: default avatarLucas Stach <l.stach@pengutronix.de>
Tested-by: default avatarMarcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: default avatarLukas F. Hartmann <lukas@mntre.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 9d3975f2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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;