From: Peng Ma <[email protected]>
This patch enables ACPI support in RCPM driver.
Signed-off-by: Peng Ma <[email protected]>
Signed-off-by: Ran Wang <[email protected]>
---
Change in v2:
- Update acpi_device_id to fix conflict with other driver
drivers/soc/fsl/rcpm.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c
index a093dbe..230c232 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 <[email protected]>
@@ -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,17 @@ static const struct of_device_id rcpm_of_match[] = {
};
MODULE_DEVICE_TABLE(of, rcpm_of_match);
+static const struct acpi_device_id rcpm_imx_acpi_ids[] = {
+ {"NXP0015",},
+ { }
+};
+MODULE_DEVICE_TABLE(acpi, rcpm_imx_acpi_ids);
+
static struct platform_driver rcpm_driver = {
.driver = {
.name = "rcpm",
.of_match_table = rcpm_of_match,
+ .acpi_match_table = ACPI_PTR(rcpm_imx_acpi_ids),
.pm = &rcpm_pm_ops,
},
.probe = rcpm_probe,
--
2.7.4
Hi Ran,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.9-rc1 next-20200818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ran-Wang/soc-fsl-enable-acpi-support/20200818-144909
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd
config: arm64-randconfig-r005-20200818 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 790878f291fa5dc58a1c560cb6cc76fd1bfd1c5a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
>> drivers/soc/fsl/rcpm.c:144:36: warning: unused variable 'rcpm_imx_acpi_ids' [-Wunused-const-variable]
static const struct acpi_device_id rcpm_imx_acpi_ids[] = {
^
1 warning generated.
# https://github.com/0day-ci/linux/commit/c6ed5f2017b1922f30f745a6a6330e1e53caea39
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ran-Wang/soc-fsl-enable-acpi-support/20200818-144909
git checkout c6ed5f2017b1922f30f745a6a6330e1e53caea39
vim +/rcpm_imx_acpi_ids +144 drivers/soc/fsl/rcpm.c
143
> 144 static const struct acpi_device_id rcpm_imx_acpi_ids[] = {
145 {"NXP0015",},
146 { }
147 };
148 MODULE_DEVICE_TABLE(acpi, rcpm_imx_acpi_ids);
149
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]