From: Li Yang <leoyang.li@nxp.com>
To: Ran Wang <ran.wang_1@nxp.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
lkml <linux-kernel@vger.kernel.org>, Peng Ma <peng.ma@nxp.com>
Subject: Re: [PATCH v7] soc: fsl: enable acpi support in RCPM driver
Date: Thu, 8 Apr 2021 16:33:02 -0500 [thread overview]
Message-ID: <CADRPPNR4_rmPPrQ2mhVY1zqShTm4vdg_v4iAUt_gxdo7jmOg5Q@mail.gmail.com> (raw)
In-Reply-To: <20210408030353.37193-1-ran.wang_1@nxp.com>
On Wed, Apr 7, 2021 at 9:58 PM Ran Wang <ran.wang_1@nxp.com> wrote:
>
> 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>
Applied for next. Thanks.
> ---
> Change in v7:
> - Update comment for checking RCPM node which refferred to
>
> Change in v6:
> - Remove copyright udpate to rebase on latest mainline
>
> Change in v5:
> - Fix panic when dev->of_node is null
>
> Change in v4:
> - Make commit subject more accurate
> - Remove unrelated new blank line
>
> 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 | 24 ++++++++++++++++++++++--
> 1 file changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c
> index 4ace28cab314..90d3f4060b0c 100644
> --- a/drivers/soc/fsl/rcpm.c
> +++ b/drivers/soc/fsl/rcpm.c
> @@ -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
>
> @@ -78,10 +79,20 @@ static int rcpm_pm_prepare(struct device *dev)
> "fsl,rcpm-wakeup", value,
> rcpm->wakeup_cells + 1);
>
> - /* Wakeup source should refer to current rcpm device */
> - if (ret || (np->phandle != value[0]))
> + if (ret)
> continue;
>
> + /*
> + * For DT mode, would handle devices with "fsl,rcpm-wakeup"
> + * pointing to the current RCPM node.
> + *
> + * For ACPI mode, currently we assume there is only one
> + * RCPM controller existing.
> + */
> + if (is_of_node(dev->fwnode))
> + if (np->phandle != value[0])
> + continue;
> +
> /* Property "#fsl,rcpm-wakeup-cells" of rcpm node defines the
> * number of IPPDEXPCR register cells, and "fsl,rcpm-wakeup"
> * of wakeup source IP contains an integer array: <phandle to
> @@ -172,10 +183,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,
> --
> 2.25.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2021-04-08 21:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 3:03 [PATCH v7] soc: fsl: enable acpi support in RCPM driver Ran Wang
2021-04-08 21:33 ` Li Yang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADRPPNR4_rmPPrQ2mhVY1zqShTm4vdg_v4iAUt_gxdo7jmOg5Q@mail.gmail.com \
--to=leoyang.li@nxp.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=peng.ma@nxp.com \
--cc=ran.wang_1@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).