diff mbox series

[v3] soc: fsl: enable acpi support

Message ID 20200819040031.40204-1-ran.wang_1@nxp.com
State New
Headers show
Series [v3] soc: fsl: enable acpi support | expand

Checks

Context Check Description
snowpatch_ozlabs/needsstable success Patch has no Fixes tags
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 41 lines checked
snowpatch_ozlabs/build-pmac32 warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-ppc64e warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-ppc64be warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-ppc64le warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (d4ecce4dcc8f8820286cf4e0859850c555e89854)

Commit Message

Ran Wang Aug. 19, 2020, 4 a.m. UTC
From: Peng Ma <peng.ma@nxp.com>

This patch enables ACPI support in RCPM driver.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
---
Change in v3:
 - Add #ifdef CONFIG_ACPI for acpi_device_id
 - Rename rcpm_acpi_imx_ids to rcpm_acpi_ids

Change in v2:
 - Update acpi_device_id to fix conflict with other driver

 drivers/soc/fsl/rcpm.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Christophe Leroy Aug. 19, 2020, 6:48 a.m. UTC | #1
Le 19/08/2020 à 06:00, Ran Wang a écrit :
> From: Peng Ma <peng.ma@nxp.com>
> 
> This patch enables ACPI support in RCPM driver.

Can you change the subject to "soc: fsl: enable acpi support in RCPM 
driver" ?

> 
> Signed-off-by: Peng Ma <peng.ma@nxp.com>
> Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
> ---
> Change in v3:
>   - Add #ifdef CONFIG_ACPI for acpi_device_id
>   - Rename rcpm_acpi_imx_ids to rcpm_acpi_ids
> 
> Change in v2:
>   - Update acpi_device_id to fix conflict with other driver
> 
>   drivers/soc/fsl/rcpm.c | 13 ++++++++++++-
>   1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c
> index a093dbe..55d1d73 100644
> --- a/drivers/soc/fsl/rcpm.c
> +++ b/drivers/soc/fsl/rcpm.c
> @@ -2,7 +2,7 @@
>   //
>   // rcpm.c - Freescale QorIQ RCPM driver
>   //
> -// Copyright 2019 NXP
> +// Copyright 2019-2020 NXP
>   //
>   // Author: Ran Wang <ran.wang_1@nxp.com>
>   
> @@ -13,6 +13,7 @@
>   #include <linux/slab.h>
>   #include <linux/suspend.h>
>   #include <linux/kernel.h>
> +#include <linux/acpi.h>
>   
>   #define RCPM_WAKEUP_CELL_MAX_SIZE	7
>   
> @@ -125,6 +126,7 @@ static int rcpm_probe(struct platform_device *pdev)
>   
>   	ret = device_property_read_u32(&pdev->dev,
>   			"#fsl,rcpm-wakeup-cells", &rcpm->wakeup_cells);
> +

This blank line addition is unrelated to the patch and shouldn't be there.

Christophe

>   	if (ret)
>   		return ret;
>   
> @@ -139,10 +141,19 @@ static const struct of_device_id rcpm_of_match[] = {
>   };
>   MODULE_DEVICE_TABLE(of, rcpm_of_match);
>   
> +#ifdef CONFIG_ACPI
> +static const struct acpi_device_id rcpm_acpi_ids[] = {
> +	{"NXP0015",},
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(acpi, rcpm_acpi_ids);
> +#endif
> +
>   static struct platform_driver rcpm_driver = {
>   	.driver = {
>   		.name = "rcpm",
>   		.of_match_table = rcpm_of_match,
> +		.acpi_match_table = ACPI_PTR(rcpm_acpi_ids),
>   		.pm	= &rcpm_pm_ops,
>   	},
>   	.probe = rcpm_probe,
>
Ran Wang Aug. 19, 2020, 6:52 a.m. UTC | #2
Hi Christophe

On Wednesday, August 19, 2020 2:48 PM, Christophe Leroy wrote:
> 
> 
> 
> Le 19/08/2020 à 06:00, Ran Wang a écrit :
> > From: Peng Ma <peng.ma@nxp.com>
> >
> > This patch enables ACPI support in RCPM driver.
> 
> Can you change the subject to "soc: fsl: enable acpi support in RCPM driver" ?

Sure.

> >
> > Signed-off-by: Peng Ma <peng.ma@nxp.com>
> > Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
> > ---
> > Change in v3:
> >   - Add #ifdef CONFIG_ACPI for acpi_device_id
> >   - Rename rcpm_acpi_imx_ids to rcpm_acpi_ids
> >
> > Change in v2:
> >   - Update acpi_device_id to fix conflict with other driver
> >
> >   drivers/soc/fsl/rcpm.c | 13 ++++++++++++-
> >   1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c index
> > a093dbe..55d1d73 100644
> > --- a/drivers/soc/fsl/rcpm.c
> > +++ b/drivers/soc/fsl/rcpm.c
> > @@ -2,7 +2,7 @@
> >   //
> >   // rcpm.c - Freescale QorIQ RCPM driver
> >   //
> > -// Copyright 2019 NXP
> > +// Copyright 2019-2020 NXP
> >   //
> >   // Author: Ran Wang <ran.wang_1@nxp.com>
> >
> > @@ -13,6 +13,7 @@
> >   #include <linux/slab.h>
> >   #include <linux/suspend.h>
> >   #include <linux/kernel.h>
> > +#include <linux/acpi.h>
> >
> >   #define RCPM_WAKEUP_CELL_MAX_SIZE	7
> >
> > @@ -125,6 +126,7 @@ static int rcpm_probe(struct platform_device
> > *pdev)
> >
> >   	ret = device_property_read_u32(&pdev->dev,
> >   			"#fsl,rcpm-wakeup-cells", &rcpm->wakeup_cells);
> > +
> 
> This blank line addition is unrelated to the patch and shouldn't be there.

Got it, will remove this in v4, thanks.

Regards,
Ran

> Christophe
> 
> >   	if (ret)
> >   		return ret;
> >
> > @@ -139,10 +141,19 @@ static const struct of_device_id rcpm_of_match[]
> = {
> >   };
> >   MODULE_DEVICE_TABLE(of, rcpm_of_match);
> >
> > +#ifdef CONFIG_ACPI
> > +static const struct acpi_device_id rcpm_acpi_ids[] = {
> > +	{"NXP0015",},
> > +	{ }
> > +};
> > +MODULE_DEVICE_TABLE(acpi, rcpm_acpi_ids); #endif
> > +
> >   static struct platform_driver rcpm_driver = {
> >   	.driver = {
> >   		.name = "rcpm",
> >   		.of_match_table = rcpm_of_match,
> > +		.acpi_match_table = ACPI_PTR(rcpm_acpi_ids),
> >   		.pm	= &rcpm_pm_ops,
> >   	},
> >   	.probe = rcpm_probe,
> >
diff mbox series

Patch

diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c
index a093dbe..55d1d73 100644
--- a/drivers/soc/fsl/rcpm.c
+++ b/drivers/soc/fsl/rcpm.c
@@ -2,7 +2,7 @@ 
 //
 // rcpm.c - Freescale QorIQ RCPM driver
 //
-// Copyright 2019 NXP
+// Copyright 2019-2020 NXP
 //
 // Author: Ran Wang <ran.wang_1@nxp.com>
 
@@ -13,6 +13,7 @@ 
 #include <linux/slab.h>
 #include <linux/suspend.h>
 #include <linux/kernel.h>
+#include <linux/acpi.h>
 
 #define RCPM_WAKEUP_CELL_MAX_SIZE	7
 
@@ -125,6 +126,7 @@  static int rcpm_probe(struct platform_device *pdev)
 
 	ret = device_property_read_u32(&pdev->dev,
 			"#fsl,rcpm-wakeup-cells", &rcpm->wakeup_cells);
+
 	if (ret)
 		return ret;
 
@@ -139,10 +141,19 @@  static const struct of_device_id rcpm_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, rcpm_of_match);
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id rcpm_acpi_ids[] = {
+	{"NXP0015",},
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, rcpm_acpi_ids);
+#endif
+
 static struct platform_driver rcpm_driver = {
 	.driver = {
 		.name = "rcpm",
 		.of_match_table = rcpm_of_match,
+		.acpi_match_table = ACPI_PTR(rcpm_acpi_ids),
 		.pm	= &rcpm_pm_ops,
 	},
 	.probe = rcpm_probe,