(CR):[kane]:thermal:Add thermal io-channels config
authorxiongzuan_w <xiongzuan@huaqin.com>
Tue, 23 Oct 2018 12:13:50 +0000 (20:13 +0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:29:50 +0000 (17:29 +0800)
Add thermal io-channels config,such as batt_therm/board_therm...

Change-Id: I96e4b9576c66c035d99be4cc2a710f1100c66b0b
Signed-off-by: xiongzuan_w <xiongzuan@huaqin.com>
arch/arm64/boot/dts/exynos/exynos9609-robusta2_evb.dts
arch/arm64/boot/dts/exynos/exynos9609-wing.dts
arch/arm64/configs/robusta2_evb_defconfig
arch/arm64/configs/wing_defconfig
drivers/hwmon/ntc_thermistor.c [changed mode: 0644->0755]
include/linux/platform_data/ntc_thermistor.h [changed mode: 0644->0755]

index d131682943b0b75d662f805bae33d418435aea02..6ea8804e97041670c17b87bba7065759f3b41361 100755 (executable)
        };
 };
 
+&exynos_adc {
+       status = "okay";
+       cpu_thermistor {
+               compatible = "murata,ncp03wf104";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <100000>;
+               pulldown-ohm = <0>;
+               io-channels = <&exynos_adc 0>;
+               io-channel-names = "cpu_therm";
+       };
+       battery_thermistor {
+               compatible = "murata,ncp15xh103";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <100000>;
+               pulldown-ohm = <0>;
+               io-channels = <&exynos_adc 1>;
+               io-channel-names = "bat_therm";
+       };
+       pa_thermistor {
+               compatible = "murata,ncp15xh103";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <0>;
+               pulldown-ohm = <10000>;
+               io-channels = <&exynos_adc 4>;
+               io-channel-names = "pa_therm";
+               connected-positive;
+       };
+       board_thermistor {
+               compatible = "murata,ncp03wf104";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <100000>;
+               pulldown-ohm = <0>;
+               io-channels = <&exynos_adc 7>;
+               io-channel-names = "board_therm";
+       };
+       usb_con_thermistor {
+               compatible = "murata,ncp03wf104";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <100000>;
+               pulldown-ohm = <0>;
+               io-channels = <&exynos_adc 8>;
+               io-channel-names = "usb_con_therm";
+       };
+};
+
 &i2c_2 {
        #address-cells = <1>;
        #size-cells = <0>;
index 9ba2198a31fee30a83c41d147f9f86a9baf50084..1c451f12a9ec6223435416ccaa3958372b95240d 100755 (executable)
        };
 };
 
+&exynos_adc {
+       status = "okay";
+       cpu_thermistor {
+               compatible = "murata,ncp03wf104";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <100000>;
+               pulldown-ohm = <0>;
+               io-channels = <&exynos_adc 0>;
+               io-channel-names = "cpu_therm";
+       };
+       chg_thermistor {
+               compatible = "murata,ncp03wf104";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <100000>;
+               pulldown-ohm = <0>;
+               io-channels = <&exynos_adc 1>;
+               io-channel-names = "chg_therm";
+       };
+       pa_thermistor {
+               compatible = "murata,ncp03wf104";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <100000>;
+               pulldown-ohm = <0>;
+               io-channels = <&exynos_adc 4>;
+               io-channel-names = "pa_therm";
+       };
+       board_thermistor {
+               compatible = "murata,ncp03wf104";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <100000>;
+               pulldown-ohm = <0>;
+               io-channels = <&exynos_adc 7>;
+               io-channel-names = "board_therm";
+       };
+       battery_thermistor {
+               compatible = "murata,ncp03wf104";
+               status = "okay";
+               pullup-uv = <1800000>;
+               pullup-ohm = <100000>;
+               pulldown-ohm = <0>;
+               io-channels = <&exynos_adc 8>;
+               io-channel-names = "batt_therm";
+       };
+};
+
 &i2c_2 {
        #address-cells = <1>;
        #size-cells = <0>;
index b83e85d3c29976ba1b0fb7ae3f65abddb527d82c..3af79f68af41b3cb3c5e4a0ae17f324731daa484 100755 (executable)
@@ -555,4 +555,6 @@ CONFIG_SEC_NFC_CLK_REQ=y
 CONFIG_SENSORS_CLASS=y
 CONFIG_INPUT_EGISTEC_320=y
 CONFIG_AW8695_HAPTIC=y
-CONFIG_MOT_UTAG=y
\ No newline at end of file
+CONFIG_MOT_UTAG=y
+CONFIG_HWMON=y
+CONFIG_SENSORS_NTC_THERMISTOR=y
\ No newline at end of file
index c1dd3f17de78469dcb5b819814e4d520c8ef08c3..9828656983112990d3e82692e16a65a296794965 100755 (executable)
@@ -540,4 +540,6 @@ CONFIG_SEC_NFC_CLK_REQ=y
 CONFIG_SENSORS_CLASS=y
 CONFIG_INPUT_EGISTEC_320=y
 CONFIG_AW8695_HAPTIC=y
-CONFIG_MOT_UTAG=y
\ No newline at end of file
+CONFIG_MOT_UTAG=y
+CONFIG_HWMON=y
+CONFIG_SENSORS_NTC_THERMISTOR=y
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index b2b1d23..b19a2e6
@@ -278,6 +278,9 @@ static int ntc_adc_iio_read(struct ntc_thermistor_platform_data *pdata)
                }
        } else {
                /* Assume 12 bit ADC with vref at pullup_uv */
+                       uv = (pdata->pullup_uv * (s64)raw) >> 12;
+               }
+       } else {
                uv = (pdata->pullup_uv * (s64)raw) >> 12;
        }
 
old mode 100644 (file)
new mode 100755 (executable)
index 962d582..de9fe9a
@@ -57,6 +57,7 @@ struct ntc_thermistor_platform_data {
        struct iio_channel *chan;
        bool iio_convert_support;
 
+       bool iio_convert_support;
        int (*read_ohm)(void);
 };