drivers/iio/humidity/hdc100x.c | 8 ++++++++ 1 file changed, 8 insertions(+)
x86 boards may use ACPI HID "HDC1010" to for hdc100x device.
So add an ACPI match table for that accordingly.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
drivers/iio/humidity/hdc100x.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index 9e0fce917ce4c..ad1dfac543c52 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -417,10 +417,18 @@ static const struct of_device_id hdc100x_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
+static const struct acpi_device_id hdc100x_acpi_match[] = {
+ {"HDC1010"},
+ { },
+};
+
+MODULE_DEVICE_TABLE(acpi, hdc100x_acpi_match);
+
static struct i2c_driver hdc100x_driver = {
.driver = {
.name = "hdc100x",
.of_match_table = hdc100x_dt_ids,
+ .acpi_match_table = ACPI_PTR(hdc100x_acpi_match),
},
.probe = hdc100x_probe,
.id_table = hdc100x_id,
--
2.33.1
Hi Kai-Heng,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on v5.16-rc7 next-20211224]
[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/Kai-Heng-Feng/iio-humidity-hdc100x-Add-ACPI-HID-table/20211224-230046
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: mips-randconfig-c004-20211227 (https://download.01.org/0day-ci/archive/20211227/202112271213.Z6jyi5YK-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 511726c64d3b6cca66f7c54d457d586aa3129f67)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/59648fe59d706ab2b9e719418c490d505ee5cc93
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kai-Heng-Feng/iio-humidity-hdc100x-Add-ACPI-HID-table/20211224-230046
git checkout 59648fe59d706ab2b9e719418c490d505ee5cc93
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/iio/humidity/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/iio/humidity/hdc100x.c:420:36: warning: unused variable 'hdc100x_acpi_match' [-Wunused-const-variable]
static const struct acpi_device_id hdc100x_acpi_match[] = {
^
1 warning generated.
vim +/hdc100x_acpi_match +420 drivers/iio/humidity/hdc100x.c
419
> 420 static const struct acpi_device_id hdc100x_acpi_match[] = {
421 {"HDC1010"},
422 { },
423 };
424
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
On Fri, Dec 24, 2021 at 6:59 AM Kai-Heng Feng
<kai.heng.feng@canonical.com> wrote:
>
> x86 boards may use ACPI HID "HDC1010" to for hdc100x device.
>
> So add an ACPI match table for that accordingly.
>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> drivers/iio/humidity/hdc100x.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
> index 9e0fce917ce4c..ad1dfac543c52 100644
> --- a/drivers/iio/humidity/hdc100x.c
> +++ b/drivers/iio/humidity/hdc100x.c
> @@ -417,10 +417,18 @@ static const struct of_device_id hdc100x_dt_ids[] = {
> };
> MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
>
> +static const struct acpi_device_id hdc100x_acpi_match[] = {
> + {"HDC1010"},
> + { },
> +};
> +
> +MODULE_DEVICE_TABLE(acpi, hdc100x_acpi_match);
> +
> static struct i2c_driver hdc100x_driver = {
> .driver = {
> .name = "hdc100x",
> .of_match_table = hdc100x_dt_ids,
> + .acpi_match_table = ACPI_PTR(hdc100x_acpi_match),
> },
> .probe = hdc100x_probe,
> .id_table = hdc100x_id,
> --
> 2.33.1
>
© 2016 - 2026 Red Hat, Inc.