[PATCH 3/3] firmware: imx: pd: make driver look more generic

Dong Aisheng aisheng.dong at nxp.com
Wed Apr 21 11:14:32 BST 2021


The SCU protocal is platform independent, so make the driver
code as it is by dropping the soc prefix for structures.

Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
---
 drivers/firmware/imx/scu-pd.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c
index 446a4f9f0ec9..bdf88aed6dca 100644
--- a/drivers/firmware/imx/scu-pd.c
+++ b/drivers/firmware/imx/scu-pd.c
@@ -95,7 +95,7 @@ struct imx_sc_pd_soc {
 
 static int imx_con_rsrc;
 
-static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
+static const struct imx_sc_pd_range scu_pd_ranges[] = {
 	/* LSIO SS */
 	{ "pwm", IMX_SC_R_PWM_0, 8, true, 0 },
 	{ "gpio", IMX_SC_R_GPIO_0, 8, true, 0 },
@@ -266,9 +266,9 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
 	{ "board", IMX_SC_R_BOARD_R0, 8, true, 0},
 };
 
-static const struct imx_sc_pd_soc imx8qxp_scu_pd = {
-	.pd_ranges = imx8qxp_scu_pd_ranges,
-	.num_ranges = ARRAY_SIZE(imx8qxp_scu_pd_ranges),
+static const struct imx_sc_pd_soc scu_pd = {
+	.pd_ranges = scu_pd_ranges,
+	.num_ranges = ARRAY_SIZE(scu_pd_ranges),
 };
 
 static struct imx_sc_ipc *pm_ipc_handle;
@@ -463,8 +463,7 @@ static int imx_sc_pd_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id imx_sc_pd_match[] = {
-	{ .compatible = "fsl,imx8qxp-scu-pd", &imx8qxp_scu_pd},
-	{ .compatible = "fsl,scu-pd", &imx8qxp_scu_pd},
+	{ .compatible = "fsl,scu-pd", &scu_pd},
 	{ /* sentinel */ }
 };
 
-- 
2.25.1




More information about the linux-arm-kernel mailing list