0563-Add-support-for-Silicon-Labs-Si7013-20-21-humidity-t.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. From 72b5fe0084ce231fc0325cdf6151da0e83f5ef4e Mon Sep 17 00:00:00 2001
  2. From: Alex Tucker <alex@floop.org.uk>
  3. Date: Tue, 3 Jan 2017 21:30:41 +0000
  4. Subject: [PATCH] Add support for Silicon Labs Si7013/20/21
  5. humidity/temperature sensor. (#1765)
  6. ---
  7. arch/arm/boot/dts/overlays/README | 3 ++
  8. arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 49 +++++++++++++----------
  9. 2 files changed, 31 insertions(+), 21 deletions(-)
  10. --- a/arch/arm/boot/dts/overlays/README
  11. +++ b/arch/arm/boot/dts/overlays/README
  12. @@ -543,6 +543,9 @@ Params: bmp085 Select t
  13. bmp280 Select the Bosch sensortronic BMP280
  14. + si7020 Select the Silicon Labs Si7013/20/21 humidity/
  15. + temperature sensor
  16. +
  17. Name: i2c0-bcm2708
  18. Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations
  19. --- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
  20. +++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
  21. @@ -1,34 +1,41 @@
  22. -// Definitions for a few digital barometric pressure and temperature sensors
  23. +// Definitions for I2C based sensors using the Industrial IO interface.
  24. /dts-v1/;
  25. /plugin/;
  26. / {
  27. - compatible = "brcm,bcm2708";
  28. + compatible = "brcm,bcm2708";
  29. - fragment@0 {
  30. - target = <&i2c_arm>;
  31. - __overlay__ {
  32. - #address-cells = <1>;
  33. - #size-cells = <0>;
  34. - status = "okay";
  35. -
  36. - bmp085: bmp085@77 {
  37. - compatible = "bosch,bmp085";
  38. - reg = <0x77>;
  39. - default-oversampling = <3>;
  40. - status = "disable";
  41. - };
  42. -
  43. - bmp280: bmp280@76 {
  44. - compatible = "bosch,bmp280";
  45. - reg = <0x76>;
  46. - status = "disable";
  47. - };
  48. - };
  49. - };
  50. + fragment@0 {
  51. + target = <&i2c_arm>;
  52. + __overlay__ {
  53. + #address-cells = <1>;
  54. + #size-cells = <0>;
  55. + status = "okay";
  56. +
  57. + bmp085: bmp085@77 {
  58. + compatible = "bosch,bmp085";
  59. + reg = <0x77>;
  60. + default-oversampling = <3>;
  61. + status = "disable";
  62. + };
  63. +
  64. + bmp280: bmp280@76 {
  65. + compatible = "bosch,bmp280";
  66. + reg = <0x76>;
  67. + status = "disable";
  68. + };
  69. +
  70. + si7020: si7020@40 {
  71. + compatible = "si7020";
  72. + reg = <0x40>;
  73. + status = "disable";
  74. + };
  75. + };
  76. + };
  77. __overrides__ {
  78. bmp085 = <&bmp085>,"status";
  79. bmp280 = <&bmp280>,"status";
  80. + si7020 = <&si7020>,"status";
  81. };
  82. };