linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name
  2023-03-01  3:00 ` [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
@ 2023-03-01  2:58   ` Peng Fan
  2023-03-01  9:31   ` Marco Felsch
  1 sibling, 0 replies; 17+ messages in thread
From: Peng Fan @ 2023-03-01  2:58 UTC (permalink / raw)
  To: J.D. Yue, shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, dl-linux-imx, linux-kernel, gregkh

> Subject: [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use
> dev_pm_domain_attach_by_name
> 
> The genpd_dev_pm_attach_by_name() is not exported, it should not be
> used by consumer driver.
> Use dev_pm_domain_attach_by_name() instead.
> 
> Signed-off-by: Jindong Yue <jindong.yue@nxp.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/soc/imx/imx8mp-blk-ctrl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-
> blk-ctrl.c
> index a0592db8fa86..1892c2c78831 100644
> --- a/drivers/soc/imx/imx8mp-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
> @@ -642,7 +642,7 @@ static int imx8mp_blk_ctrl_probe(struct
> platform_device *pdev)
>  	if (!bc->onecell_data.domains)
>  		return -ENOMEM;
> 
> -	bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
> +	bc->bus_power_dev = dev_pm_domain_attach_by_name(dev,
> "bus");
>  	if (IS_ERR(bc->bus_power_dev))
>  		return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
>  				     "failed to attach bus power domain\n");
> --
> 2.36.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH v2 2/7] soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match
  2023-03-01  3:00 ` [PATCH v2 2/7] soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match Jindong Yue
@ 2023-03-01  2:59   ` Peng Fan
  0 siblings, 0 replies; 17+ messages in thread
From: Peng Fan @ 2023-03-01  2:59 UTC (permalink / raw)
  To: J.D. Yue, shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, dl-linux-imx, linux-kernel, gregkh

> Subject: [PATCH v2 2/7] soc: imx: imx8mp-blk-ctrl: Fix typo of
> imx8m_blk_ctrl_of_match
> 
> Once set CONFIG_SOC_IMX8M as m, following error occurs:
> 
> drivers/soc/imx/imx8mp-blk-ctrl.c:747:25: error: ‘imx8m_blk_ctrl_of_match’
> undeclared here (not in a function); did you mean
> ‘imx8mp_blk_ctrl_of_match’?
>   747 | MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match);
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~
> 
> Fix the typo.
> 
> Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl")
> Signed-off-by: Jindong Yue <jindong.yue@nxp.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/soc/imx/imx8mp-blk-ctrl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-
> blk-ctrl.c
> index 1892c2c78831..f109c7bd6658 100644
> --- a/drivers/soc/imx/imx8mp-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
> @@ -852,7 +852,7 @@ static const struct of_device_id
> imx8mp_blk_ctrl_of_match[] = {
>  		/* Sentinel */
>  	}
>  };
> -MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match);
> +MODULE_DEVICE_TABLE(of, imx8mp_blk_ctrl_of_match);
> 
>  static struct platform_driver imx8mp_blk_ctrl_driver = {
>  	.probe = imx8mp_blk_ctrl_probe,
> --
> 2.36.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH v2 3/7] soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE
  2023-03-01  3:00 ` [PATCH v2 3/7] soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE Jindong Yue
@ 2023-03-01  2:59   ` Peng Fan
  0 siblings, 0 replies; 17+ messages in thread
From: Peng Fan @ 2023-03-01  2:59 UTC (permalink / raw)
  To: J.D. Yue, shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, dl-linux-imx, linux-kernel, gregkh

> Subject: [PATCH v2 3/7] soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE
> 
> Add MODULE_LICENSE to support building as a module.
> 
> Signed-off-by: Jindong Yue <jindong.yue@nxp.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/soc/imx/imx8mp-blk-ctrl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-
> blk-ctrl.c
> index f109c7bd6658..870aecc0202a 100644
> --- a/drivers/soc/imx/imx8mp-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
> @@ -864,3 +864,4 @@ static struct platform_driver imx8mp_blk_ctrl_driver
> = {
>  	},
>  };
>  module_platform_driver(imx8mp_blk_ctrl_driver);
> +MODULE_LICENSE("GPL");
> --
> 2.36.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH v2 4/7] soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name
  2023-03-01  3:00 ` [PATCH v2 4/7] soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
@ 2023-03-01  3:00   ` Peng Fan
  0 siblings, 0 replies; 17+ messages in thread
From: Peng Fan @ 2023-03-01  3:00 UTC (permalink / raw)
  To: J.D. Yue, shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, dl-linux-imx, linux-kernel, gregkh

> Subject: [PATCH v2 4/7] soc: imx: imx8m-blk-ctrl: Use
> dev_pm_domain_attach_by_name
> 
> The genpd_dev_pm_attach_by_name() is not exported, it should not be
> used by consumer driver.
> Use dev_pm_domain_attach_by_name() instead.
> 
> Signed-off-by: Jindong Yue <jindong.yue@nxp.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/soc/imx/imx8m-blk-ctrl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-
> ctrl.c
> index 399cb85105a1..af67f2c3f7a1 100644
> --- a/drivers/soc/imx/imx8m-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8m-blk-ctrl.c
> @@ -210,7 +210,7 @@ static int imx8m_blk_ctrl_probe(struct
> platform_device *pdev)
>  	if (!bc->onecell_data.domains)
>  		return -ENOMEM;
> 
> -	bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
> +	bc->bus_power_dev = dev_pm_domain_attach_by_name(dev,
> "bus");
>  	if (IS_ERR(bc->bus_power_dev)) {
>  		if (PTR_ERR(bc->bus_power_dev) == -ENODEV)
>  			return dev_err_probe(dev, -EPROBE_DEFER,
> --
> 2.36.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH v2 5/7] soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE
  2023-03-01  3:00 ` [PATCH v2 5/7] soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE Jindong Yue
@ 2023-03-01  3:00   ` Peng Fan
  0 siblings, 0 replies; 17+ messages in thread
From: Peng Fan @ 2023-03-01  3:00 UTC (permalink / raw)
  To: J.D. Yue, shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, dl-linux-imx, linux-kernel, gregkh

> Subject: [PATCH v2 5/7] soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE
> 
> Add MODULE_LICENSE to support building as a module.
> 
> Signed-off-by: Jindong Yue <jindong.yue@nxp.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/soc/imx/imx8m-blk-ctrl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-
> ctrl.c
> index af67f2c3f7a1..a955513d6d68 100644
> --- a/drivers/soc/imx/imx8m-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8m-blk-ctrl.c
> @@ -891,3 +891,4 @@ static struct platform_driver imx8m_blk_ctrl_driver
> = {
>  	},
>  };
>  module_platform_driver(imx8m_blk_ctrl_driver);
> +MODULE_LICENSE("GPL");
> --
> 2.36.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 0/7] soc: imx8m: Support building imx8m soc driver as module
@ 2023-03-01  3:00 Jindong Yue
  2023-03-01  3:00 ` [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Jindong Yue @ 2023-03-01  3:00 UTC (permalink / raw)
  To: shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, peng.fan, linux-imx, linux-kernel,
	gregkh, jindong.yue

This series adds support for building imx8m soc driver as module.

----
v2: Use dev_pm_domain_attach_by_name() for imx8m*-blk-ctrl.
----

Jindong Yue (7):
  soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name
  soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match
  soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE
  soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name
  soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE
  soc: imx8m: Add MODULE_LICENSE
  soc: imx8m: Support building imx8m soc driver as module

 drivers/soc/imx/Kconfig           | 2 +-
 drivers/soc/imx/imx8m-blk-ctrl.c  | 3 ++-
 drivers/soc/imx/imx8mp-blk-ctrl.c | 5 +++--
 drivers/soc/imx/soc-imx8m.c       | 1 +
 4 files changed, 7 insertions(+), 4 deletions(-)

-- 
2.36.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name
  2023-03-01  3:00 [PATCH v2 0/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
@ 2023-03-01  3:00 ` Jindong Yue
  2023-03-01  2:58   ` Peng Fan
  2023-03-01  9:31   ` Marco Felsch
  2023-03-01  3:00 ` [PATCH v2 2/7] soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match Jindong Yue
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 17+ messages in thread
From: Jindong Yue @ 2023-03-01  3:00 UTC (permalink / raw)
  To: shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, peng.fan, linux-imx, linux-kernel,
	gregkh, jindong.yue

The genpd_dev_pm_attach_by_name() is not exported, it should not be used
by consumer driver.
Use dev_pm_domain_attach_by_name() instead.

Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
---
 drivers/soc/imx/imx8mp-blk-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
index a0592db8fa86..1892c2c78831 100644
--- a/drivers/soc/imx/imx8mp-blk-ctrl.c
+++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
@@ -642,7 +642,7 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
 	if (!bc->onecell_data.domains)
 		return -ENOMEM;
 
-	bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
+	bc->bus_power_dev = dev_pm_domain_attach_by_name(dev, "bus");
 	if (IS_ERR(bc->bus_power_dev))
 		return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
 				     "failed to attach bus power domain\n");
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 2/7] soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match
  2023-03-01  3:00 [PATCH v2 0/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
  2023-03-01  3:00 ` [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
@ 2023-03-01  3:00 ` Jindong Yue
  2023-03-01  2:59   ` Peng Fan
  2023-03-01  3:00 ` [PATCH v2 3/7] soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE Jindong Yue
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Jindong Yue @ 2023-03-01  3:00 UTC (permalink / raw)
  To: shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, peng.fan, linux-imx, linux-kernel,
	gregkh, jindong.yue

Once set CONFIG_SOC_IMX8M as m, following error occurs:

drivers/soc/imx/imx8mp-blk-ctrl.c:747:25: error: ‘imx8m_blk_ctrl_of_match’
undeclared here (not in a function); did you mean ‘imx8mp_blk_ctrl_of_match’?
  747 | MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~

Fix the typo.

Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl")
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
---
 drivers/soc/imx/imx8mp-blk-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
index 1892c2c78831..f109c7bd6658 100644
--- a/drivers/soc/imx/imx8mp-blk-ctrl.c
+++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
@@ -852,7 +852,7 @@ static const struct of_device_id imx8mp_blk_ctrl_of_match[] = {
 		/* Sentinel */
 	}
 };
-MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match);
+MODULE_DEVICE_TABLE(of, imx8mp_blk_ctrl_of_match);
 
 static struct platform_driver imx8mp_blk_ctrl_driver = {
 	.probe = imx8mp_blk_ctrl_probe,
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 3/7] soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE
  2023-03-01  3:00 [PATCH v2 0/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
  2023-03-01  3:00 ` [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
  2023-03-01  3:00 ` [PATCH v2 2/7] soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match Jindong Yue
@ 2023-03-01  3:00 ` Jindong Yue
  2023-03-01  2:59   ` Peng Fan
  2023-03-01  3:00 ` [PATCH v2 4/7] soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Jindong Yue @ 2023-03-01  3:00 UTC (permalink / raw)
  To: shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, peng.fan, linux-imx, linux-kernel,
	gregkh, jindong.yue

Add MODULE_LICENSE to support building as a module.

Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
---
 drivers/soc/imx/imx8mp-blk-ctrl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
index f109c7bd6658..870aecc0202a 100644
--- a/drivers/soc/imx/imx8mp-blk-ctrl.c
+++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
@@ -864,3 +864,4 @@ static struct platform_driver imx8mp_blk_ctrl_driver = {
 	},
 };
 module_platform_driver(imx8mp_blk_ctrl_driver);
+MODULE_LICENSE("GPL");
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 4/7] soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name
  2023-03-01  3:00 [PATCH v2 0/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
                   ` (2 preceding siblings ...)
  2023-03-01  3:00 ` [PATCH v2 3/7] soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE Jindong Yue
@ 2023-03-01  3:00 ` Jindong Yue
  2023-03-01  3:00   ` Peng Fan
  2023-03-01  3:00 ` [PATCH v2 5/7] soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE Jindong Yue
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Jindong Yue @ 2023-03-01  3:00 UTC (permalink / raw)
  To: shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, peng.fan, linux-imx, linux-kernel,
	gregkh, jindong.yue

The genpd_dev_pm_attach_by_name() is not exported, it should not be used
by consumer driver.
Use dev_pm_domain_attach_by_name() instead.

Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
---
 drivers/soc/imx/imx8m-blk-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index 399cb85105a1..af67f2c3f7a1 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -210,7 +210,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
 	if (!bc->onecell_data.domains)
 		return -ENOMEM;
 
-	bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
+	bc->bus_power_dev = dev_pm_domain_attach_by_name(dev, "bus");
 	if (IS_ERR(bc->bus_power_dev)) {
 		if (PTR_ERR(bc->bus_power_dev) == -ENODEV)
 			return dev_err_probe(dev, -EPROBE_DEFER,
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 5/7] soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE
  2023-03-01  3:00 [PATCH v2 0/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
                   ` (3 preceding siblings ...)
  2023-03-01  3:00 ` [PATCH v2 4/7] soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
@ 2023-03-01  3:00 ` Jindong Yue
  2023-03-01  3:00   ` Peng Fan
  2023-03-01  3:00 ` [PATCH v2 6/7] soc: imx8m: " Jindong Yue
  2023-03-01  3:00 ` [PATCH v2 7/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
  6 siblings, 1 reply; 17+ messages in thread
From: Jindong Yue @ 2023-03-01  3:00 UTC (permalink / raw)
  To: shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, peng.fan, linux-imx, linux-kernel,
	gregkh, jindong.yue

Add MODULE_LICENSE to support building as a module.

Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
---
 drivers/soc/imx/imx8m-blk-ctrl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index af67f2c3f7a1..a955513d6d68 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -891,3 +891,4 @@ static struct platform_driver imx8m_blk_ctrl_driver = {
 	},
 };
 module_platform_driver(imx8m_blk_ctrl_driver);
+MODULE_LICENSE("GPL");
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 6/7] soc: imx8m: Add MODULE_LICENSE
  2023-03-01  3:00 [PATCH v2 0/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
                   ` (4 preceding siblings ...)
  2023-03-01  3:00 ` [PATCH v2 5/7] soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE Jindong Yue
@ 2023-03-01  3:00 ` Jindong Yue
  2023-03-01  3:00   ` Peng Fan
  2023-03-01  3:00 ` [PATCH v2 7/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
  6 siblings, 1 reply; 17+ messages in thread
From: Jindong Yue @ 2023-03-01  3:00 UTC (permalink / raw)
  To: shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, peng.fan, linux-imx, linux-kernel,
	gregkh, jindong.yue

Add MODULE_LICENSE to support building as module.

Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
---
 drivers/soc/imx/soc-imx8m.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c
index 32ed9dc88e45..1dcd243df567 100644
--- a/drivers/soc/imx/soc-imx8m.c
+++ b/drivers/soc/imx/soc-imx8m.c
@@ -242,3 +242,4 @@ static int __init imx8_soc_init(void)
 	return ret;
 }
 device_initcall(imx8_soc_init);
+MODULE_LICENSE("GPL");
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 7/7] soc: imx8m: Support building imx8m soc driver as module
  2023-03-01  3:00 [PATCH v2 0/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
                   ` (5 preceding siblings ...)
  2023-03-01  3:00 ` [PATCH v2 6/7] soc: imx8m: " Jindong Yue
@ 2023-03-01  3:00 ` Jindong Yue
  2023-03-01  3:01   ` Peng Fan
  6 siblings, 1 reply; 17+ messages in thread
From: Jindong Yue @ 2023-03-01  3:00 UTC (permalink / raw)
  To: shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, peng.fan, linux-imx, linux-kernel,
	gregkh, jindong.yue

Make the imx8m soc driver as tristate so that it can be built as loadable
module, module names are:
soc-imx8m.ko, imx8m-blk-ctrl.ko and imx8mp-blk-ctrl.ko

Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
---
 drivers/soc/imx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig
index a8742fc58f01..76a4593baf0a 100644
--- a/drivers/soc/imx/Kconfig
+++ b/drivers/soc/imx/Kconfig
@@ -10,7 +10,7 @@ config IMX_GPCV2_PM_DOMAINS
 	default y if SOC_IMX7D
 
 config SOC_IMX8M
-	bool "i.MX8M SoC family support"
+	tristate "i.MX8M SoC family support"
 	depends on ARCH_MXC || COMPILE_TEST
 	default ARCH_MXC && ARM64
 	select SOC_BUS
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* RE: [PATCH v2 6/7] soc: imx8m: Add MODULE_LICENSE
  2023-03-01  3:00 ` [PATCH v2 6/7] soc: imx8m: " Jindong Yue
@ 2023-03-01  3:00   ` Peng Fan
  0 siblings, 0 replies; 17+ messages in thread
From: Peng Fan @ 2023-03-01  3:00 UTC (permalink / raw)
  To: J.D. Yue, shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, dl-linux-imx, linux-kernel, gregkh

> Subject: [PATCH v2 6/7] soc: imx8m: Add MODULE_LICENSE
> 
> Add MODULE_LICENSE to support building as module.
> 
> Signed-off-by: Jindong Yue <jindong.yue@nxp.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/soc/imx/soc-imx8m.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c
> index 32ed9dc88e45..1dcd243df567 100644
> --- a/drivers/soc/imx/soc-imx8m.c
> +++ b/drivers/soc/imx/soc-imx8m.c
> @@ -242,3 +242,4 @@ static int __init imx8_soc_init(void)
>  	return ret;
>  }
>  device_initcall(imx8_soc_init);
> +MODULE_LICENSE("GPL");
> --
> 2.36.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH v2 7/7] soc: imx8m: Support building imx8m soc driver as module
  2023-03-01  3:00 ` [PATCH v2 7/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
@ 2023-03-01  3:01   ` Peng Fan
  0 siblings, 0 replies; 17+ messages in thread
From: Peng Fan @ 2023-03-01  3:01 UTC (permalink / raw)
  To: J.D. Yue, shawnguo, s.hauer
  Cc: kernel, festevam, l.stach, dl-linux-imx, linux-kernel, gregkh

> Subject: [PATCH v2 7/7] soc: imx8m: Support building imx8m soc driver as
> module
> 
> Make the imx8m soc driver as tristate so that it can be built as loadable
> module, module names are:
> soc-imx8m.ko, imx8m-blk-ctrl.ko and imx8mp-blk-ctrl.ko
> 
> Signed-off-by: Jindong Yue <jindong.yue@nxp.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/soc/imx/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig index
> a8742fc58f01..76a4593baf0a 100644
> --- a/drivers/soc/imx/Kconfig
> +++ b/drivers/soc/imx/Kconfig
> @@ -10,7 +10,7 @@ config IMX_GPCV2_PM_DOMAINS
>  	default y if SOC_IMX7D
> 
>  config SOC_IMX8M
> -	bool "i.MX8M SoC family support"
> +	tristate "i.MX8M SoC family support"
>  	depends on ARCH_MXC || COMPILE_TEST
>  	default ARCH_MXC && ARM64
>  	select SOC_BUS
> --
> 2.36.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name
  2023-03-01  3:00 ` [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
  2023-03-01  2:58   ` Peng Fan
@ 2023-03-01  9:31   ` Marco Felsch
  2023-03-01 12:31     ` J.D. Yue
  1 sibling, 1 reply; 17+ messages in thread
From: Marco Felsch @ 2023-03-01  9:31 UTC (permalink / raw)
  To: Jindong Yue
  Cc: shawnguo, s.hauer, peng.fan, gregkh, linux-kernel, linux-imx,
	kernel, festevam, l.stach

Hi,

thanks for the patch.

On 23-03-01, Jindong Yue wrote:
> The genpd_dev_pm_attach_by_name() is not exported, it should not be used
> by consumer driver.
> Use dev_pm_domain_attach_by_name() instead.

I'm not sure if this is the correct reason. If it wouldn't be allowed to
be used by consumers it would/should be private. Instead you should
mention here that you need the symbol for possible module builds. Same
applies to the other patches.

Regards,
  Marco

> 
> Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
> ---
>  drivers/soc/imx/imx8mp-blk-ctrl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
> index a0592db8fa86..1892c2c78831 100644
> --- a/drivers/soc/imx/imx8mp-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
> @@ -642,7 +642,7 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
>  	if (!bc->onecell_data.domains)
>  		return -ENOMEM;
>  
> -	bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
> +	bc->bus_power_dev = dev_pm_domain_attach_by_name(dev, "bus");
>  	if (IS_ERR(bc->bus_power_dev))
>  		return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
>  				     "failed to attach bus power domain\n");
> -- 
> 2.36.0
> 
> 
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Re: [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name
  2023-03-01  9:31   ` Marco Felsch
@ 2023-03-01 12:31     ` J.D. Yue
  0 siblings, 0 replies; 17+ messages in thread
From: J.D. Yue @ 2023-03-01 12:31 UTC (permalink / raw)
  To: Marco Felsch
  Cc: shawnguo, s.hauer, Peng Fan, gregkh, linux-kernel, dl-linux-imx,
	kernel, festevam, l.stach


> -----Original Message-----
> From: Marco Felsch <m.felsch@pengutronix.de>
> Sent: Wednesday, March 1, 2023 5:31 PM
> To: J.D. Yue <jindong.yue@nxp.com>
> Cc: shawnguo@kernel.org; s.hauer@pengutronix.de; Peng Fan
> <peng.fan@nxp.com>; gregkh@linuxfoundation.org;
> linux-kernel@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>;
> kernel@pengutronix.de; festevam@gmail.com; l.stach@pengutronix.de
> Subject: [EXT] Re: [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use
> dev_pm_domain_attach_by_name
> 
> 
> Hi,
> 
> thanks for the patch.
> 
> On 23-03-01, Jindong Yue wrote:
> > The genpd_dev_pm_attach_by_name() is not exported, it should not be
> > used by consumer driver.
> > Use dev_pm_domain_attach_by_name() instead.
> 
> I'm not sure if this is the correct reason. If it wouldn't be allowed to be used by
> consumers it would/should be private. Instead you should mention here that
> you need the symbol for possible module builds. Same applies to the other
> patches.
> 

You are correct, I ran into symbol undefined errors when building this driver as a module.
I will update the commit message in v3 as you suggested. Thank you very much.

> Regards,
>   Marco
> 
> >
> > Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
> > ---
> >  drivers/soc/imx/imx8mp-blk-ctrl.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c
> > b/drivers/soc/imx/imx8mp-blk-ctrl.c
> > index a0592db8fa86..1892c2c78831 100644
> > --- a/drivers/soc/imx/imx8mp-blk-ctrl.c
> > +++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
> > @@ -642,7 +642,7 @@ static int imx8mp_blk_ctrl_probe(struct
> platform_device *pdev)
> >       if (!bc->onecell_data.domains)
> >               return -ENOMEM;
> >
> > -     bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
> > +     bc->bus_power_dev = dev_pm_domain_attach_by_name(dev, "bus");
> >       if (IS_ERR(bc->bus_power_dev))
> >               return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
> >                                    "failed to attach bus power
> > domain\n");
> > --
> > 2.36.0
> >
> >
> >

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-03-01 12:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01  3:00 [PATCH v2 0/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
2023-03-01  3:00 ` [PATCH v2 1/7] soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
2023-03-01  2:58   ` Peng Fan
2023-03-01  9:31   ` Marco Felsch
2023-03-01 12:31     ` J.D. Yue
2023-03-01  3:00 ` [PATCH v2 2/7] soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match Jindong Yue
2023-03-01  2:59   ` Peng Fan
2023-03-01  3:00 ` [PATCH v2 3/7] soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE Jindong Yue
2023-03-01  2:59   ` Peng Fan
2023-03-01  3:00 ` [PATCH v2 4/7] soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name Jindong Yue
2023-03-01  3:00   ` Peng Fan
2023-03-01  3:00 ` [PATCH v2 5/7] soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE Jindong Yue
2023-03-01  3:00   ` Peng Fan
2023-03-01  3:00 ` [PATCH v2 6/7] soc: imx8m: " Jindong Yue
2023-03-01  3:00   ` Peng Fan
2023-03-01  3:00 ` [PATCH v2 7/7] soc: imx8m: Support building imx8m soc driver as module Jindong Yue
2023-03-01  3:01   ` Peng Fan

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).