* [PATCH] soc: imx: imx8m-blk-ctrl: Use genpd_xlate_onecell
@ 2022-09-06 3:39 Peng Fan (OSS)
2022-09-12 9:59 ` Shawn Guo
0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan (OSS) @ 2022-09-06 3:39 UTC (permalink / raw)
To: shawnguo, s.hauer
Cc: kernel, festevam, linux-imx, l.stach, aford173, laurent.pinchart,
m.felsch, marex, paul.elder, linux-arm-kernel, linux-kernel,
Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Simplify driver by using genpd_xlate_onecell instead of
driver specific xlate function.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/soc/imx/imx8m-blk-ctrl.c | 14 --------------
drivers/soc/imx/imx8mp-blk-ctrl.c | 14 --------------
2 files changed, 28 deletions(-)
diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index 8c23d4cbbf05..d004b5aabf15 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -162,19 +162,6 @@ static int imx8m_blk_ctrl_power_off(struct generic_pm_domain *genpd)
return 0;
}
-static struct generic_pm_domain *
-imx8m_blk_ctrl_xlate(struct of_phandle_args *args, void *data)
-{
- struct genpd_onecell_data *onecell_data = data;
- unsigned int index = args->args[0];
-
- if (args->args_count != 1 ||
- index >= onecell_data->num_domains)
- return ERR_PTR(-EINVAL);
-
- return onecell_data->domains[index];
-}
-
static struct lock_class_key blk_ctrl_genpd_lock_class;
static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
@@ -216,7 +203,6 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
return -ENOMEM;
bc->onecell_data.num_domains = bc_data->num_domains;
- bc->onecell_data.xlate = imx8m_blk_ctrl_xlate;
bc->onecell_data.domains =
devm_kcalloc(dev, bc_data->num_domains,
sizeof(struct generic_pm_domain *), GFP_KERNEL);
diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
index 6f983adcb47c..343591cdefab 100644
--- a/drivers/soc/imx/imx8mp-blk-ctrl.c
+++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
@@ -450,19 +450,6 @@ static int imx8mp_blk_ctrl_power_off(struct generic_pm_domain *genpd)
return 0;
}
-static struct generic_pm_domain *
-imx8m_blk_ctrl_xlate(struct of_phandle_args *args, void *data)
-{
- struct genpd_onecell_data *onecell_data = data;
- unsigned int index = args->args[0];
-
- if (args->args_count != 1 ||
- index >= onecell_data->num_domains)
- return ERR_PTR(-EINVAL);
-
- return onecell_data->domains[index];
-}
-
static struct lock_class_key blk_ctrl_genpd_lock_class;
static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
@@ -505,7 +492,6 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
return -ENOMEM;
bc->onecell_data.num_domains = num_domains;
- bc->onecell_data.xlate = imx8m_blk_ctrl_xlate;
bc->onecell_data.domains =
devm_kcalloc(dev, num_domains,
sizeof(struct generic_pm_domain *), GFP_KERNEL);
--
2.37.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] soc: imx: imx8m-blk-ctrl: Use genpd_xlate_onecell
2022-09-06 3:39 [PATCH] soc: imx: imx8m-blk-ctrl: Use genpd_xlate_onecell Peng Fan (OSS)
@ 2022-09-12 9:59 ` Shawn Guo
0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2022-09-12 9:59 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: s.hauer, kernel, festevam, linux-imx, l.stach, aford173,
laurent.pinchart, m.felsch, marex, paul.elder, linux-arm-kernel,
linux-kernel, Peng Fan
On Tue, Sep 06, 2022 at 11:39:43AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Simplify driver by using genpd_xlate_onecell instead of
> driver specific xlate function.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-12 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 3:39 [PATCH] soc: imx: imx8m-blk-ctrl: Use genpd_xlate_onecell Peng Fan (OSS)
2022-09-12 9:59 ` Shawn Guo
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).