diff mbox series

[2/2] dt-bindings: iio: chemical: Add bindings for bme680

Message ID 20190111193141.20607-2-sebastien.bourdelin@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] iio: chemical: bme680: Add device-tree support | expand

Commit Message

Sebastien Bourdelin Jan. 11, 2019, 7:31 p.m. UTC
BME680 is a pressure/temperature/humidity/voc sensor.

Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@gmail.com>
---
 .../devicetree/bindings/iio/chemical/bme680.txt       | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/chemical/bme680.txt

Comments

kernel test robot Jan. 14, 2019, 4:01 a.m. UTC | #1
Hi Sebastien,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on iio/togreg]
[also build test ERROR on v5.0-rc2 next-20190111]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Sebastien-Bourdelin/iio-chemical-bme680-Add-device-tree-support/20190114-063618
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> drivers/iio/chemical/bme680_i2c.c:77:1: error: Expected ; at end of declaration
>> drivers/iio/chemical/bme680_i2c.c:77:1: error: got extern
   In file included from include/linux/acpi.h:41:0,
                    from drivers/iio/chemical/bme680_i2c.c:14:
   include/linux/module.h:213:1: error: expected ',' or ';' before 'extern'
    extern typeof(name) __mod_##type##__##name##_device_table  \
    ^
   drivers/iio/chemical/bme680_i2c.c:77:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
    MODULE_DEVICE_TABLE(of, bme680_of_i2c_match);
    ^~~~~~~~~~~~~~~~~~~
--
>> drivers/iio/chemical/bme680_spi.c:117:1: error: Expected ; at end of declaration
>> drivers/iio/chemical/bme680_spi.c:117:1: error: got extern
>> drivers/iio/chemical/bme680_spi.c:123:43: error: undefined identifier 'of_match_ptr'
   In file included from include/linux/acpi.h:41:0,
                    from drivers/iio/chemical/bme680_spi.c:7:
   include/linux/module.h:213:1: error: expected ',' or ';' before 'extern'
    extern typeof(name) __mod_##type##__##name##_device_table  \
    ^
   drivers/iio/chemical/bme680_spi.c:117:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
    MODULE_DEVICE_TABLE(of, bme680_of_spi_match);
    ^~~~~~~~~~~~~~~~~~~
   drivers/iio/chemical/bme680_spi.c:123:22: error: implicit declaration of function 'of_match_ptr'; did you mean 'hash_ptr'? [-Werror=implicit-function-declaration]
      .of_match_table  = of_match_ptr(bme680_of_spi_match),
                         ^~~~~~~~~~~~
                         hash_ptr
   drivers/iio/chemical/bme680_spi.c:123:22: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
   drivers/iio/chemical/bme680_spi.c:123:22: note: (near initialization for 'bme680_spi_driver.driver.of_match_table')
   drivers/iio/chemical/bme680_spi.c:123:22: error: initializer element is not constant
   drivers/iio/chemical/bme680_spi.c:123:22: note: (near initialization for 'bme680_spi_driver.driver.of_match_table')
   cc1: some warnings being treated as errors

vim +77 drivers/iio/chemical/bme680_i2c.c

1b3bd859 Himanshu Jha        2018-07-26  72  
a8182f08 Sebastien Bourdelin 2019-01-11  73  static const struct of_device_id bme680_of_i2c_match[] = {
a8182f08 Sebastien Bourdelin 2019-01-11  74  	{ .compatible = "bosch,bme680", },
a8182f08 Sebastien Bourdelin 2019-01-11  75  	{},
a8182f08 Sebastien Bourdelin 2019-01-11  76  }
a8182f08 Sebastien Bourdelin 2019-01-11 @77  MODULE_DEVICE_TABLE(of, bme680_of_i2c_match);
a8182f08 Sebastien Bourdelin 2019-01-11  78  

:::::: The code at line 77 was first introduced by commit
:::::: a8182f084d7571c44c76305024da0f40a0911cf7 iio: chemical: bme680: Add device-tree support

:::::: TO: Sebastien Bourdelin <sebastien.bourdelin@gmail.com>
:::::: CC: 0day robot <lkp@intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/chemical/bme680.txt b/Documentation/devicetree/bindings/iio/chemical/bme680.txt
new file mode 100644
index 000000000000..885a1b918340
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/chemical/bme680.txt
@@ -0,0 +1,11 @@ 
+Bosch Sensortec BME680 pressure/temperature/humidity/voc sensors
+
+Required properties:
+- compatible: must be "bosch,bme680"
+
+Example:
+
+bme680@77 {
+          compatible = "bosch,bme680";
+          reg = <0x77>;
+};