Add thermal io-channels config,such as batt_therm/board_therm...
Change-Id: I96e4b9576c66c035d99be4cc2a710f1100c66b0b
Signed-off-by: xiongzuan_w <xiongzuan@huaqin.com>
};
};
+&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>;
};
};
+&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>;
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
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
}
} 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;
}
struct iio_channel *chan;
bool iio_convert_support;
+ bool iio_convert_support;
int (*read_ohm)(void);
};