d08fc7f85c74de062eae10c51072f187a1c4d49b
[openwrt/staging/wigyori.git] / target / linux / brcm2708 / patches-4.19 / 950-0391-overlays-Add-max17040-support-to-i2c-sensor.patch
1 From a8034b01d807e4c393356d7b46183dd5d2b40df3 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 25 Mar 2019 18:03:48 +0000
4 Subject: [PATCH 391/725] overlays: Add max17040 support to i2c-sensor
5
6 See: https://github.com/raspberrypi/linux/issues/2906
7
8 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
9 ---
10 arch/arm/boot/dts/overlays/README | 3 +++
11 .../arm/boot/dts/overlays/i2c-sensor-overlay.dts | 16 ++++++++++++++++
12 2 files changed, 19 insertions(+)
13
14 --- a/arch/arm/boot/dts/overlays/README
15 +++ b/arch/arm/boot/dts/overlays/README
16 @@ -1030,6 +1030,9 @@ Params: addr Set the
17
18 lm75addr Deprecated - use addr parameter instead
19
20 + max17040 Select the Maxim Integrated MAX17040 battery
21 + monitor
22 +
23 sht3x Select the Sensiron SHT3x temperature and
24 humidity sensor. Valid addresses 0x44-0x45,
25 default 0x44
26 --- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
27 +++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
28 @@ -201,6 +201,21 @@
29 };
30 };
31
32 + fragment@13 {
33 + target = <&i2c_arm>;
34 + __dormant__ {
35 + #address-cells = <1>;
36 + #size-cells = <0>;
37 + status = "okay";
38 +
39 + max17040: max17040@36 {
40 + compatible = "maxim,max17040";
41 + reg = <0x36>;
42 + status = "okay";
43 + };
44 + };
45 + };
46 +
47 __overrides__ {
48 addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
49 <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
50 @@ -219,5 +234,6 @@
51 veml6070 = <0>,"+10";
52 sht3x = <0>,"+11";
53 ds1621 = <0>,"+12";
54 + max17040 = <0>,"+13";
55 };
56 };