Loading Documentation/thermal/sysfs-api.txt +6 −0 Original line number Original line Diff line number Diff line Loading @@ -180,6 +180,7 @@ Thermal zone device sys I/F, created once it's registered: |---temp: Current temperature |---temp: Current temperature |---mode: Working mode of the thermal zone |---mode: Working mode of the thermal zone |---policy: Thermal governor used for this zone |---policy: Thermal governor used for this zone |---available_policies: Available thermal governors for this zone |---trip_point_[0-*]_temp: Trip point temperature |---trip_point_[0-*]_temp: Trip point temperature |---trip_point_[0-*]_type: Trip point type |---trip_point_[0-*]_type: Trip point type |---trip_point_[0-*]_hyst: Hysteresis value for this trip point |---trip_point_[0-*]_hyst: Hysteresis value for this trip point Loading Loading @@ -256,6 +257,10 @@ policy One of the various thermal governors used for a particular zone. One of the various thermal governors used for a particular zone. RW, Required RW, Required available_policies Available thermal governors which can be used for a particular zone. RO, Required trip_point_[0-*]_temp trip_point_[0-*]_temp The temperature above which trip point will be fired. The temperature above which trip point will be fired. Unit: millidegree Celsius Unit: millidegree Celsius Loading Loading @@ -417,6 +422,7 @@ method, the sys I/F structure will be built like this: |---temp: 37000 |---temp: 37000 |---mode: enabled |---mode: enabled |---policy: step_wise |---policy: step_wise |---available_policies: step_wise fair_share |---trip_point_0_temp: 100000 |---trip_point_0_temp: 100000 |---trip_point_0_type: critical |---trip_point_0_type: critical |---trip_point_1_temp: 80000 |---trip_point_1_temp: 80000 Loading drivers/acpi/thermal.c +6 −6 Original line number Original line Diff line number Diff line Loading @@ -529,8 +529,7 @@ static void acpi_thermal_check(void *data) /* sys I/F for generic thermal sysfs support */ /* sys I/F for generic thermal sysfs support */ static int thermal_get_temp(struct thermal_zone_device *thermal, static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp) unsigned long *temp) { { struct acpi_thermal *tz = thermal->devdata; struct acpi_thermal *tz = thermal->devdata; int result; int result; Loading Loading @@ -637,7 +636,7 @@ static int thermal_get_trip_type(struct thermal_zone_device *thermal, } } static int thermal_get_trip_temp(struct thermal_zone_device *thermal, static int thermal_get_trip_temp(struct thermal_zone_device *thermal, int trip, unsigned long *temp) int trip, int *temp) { { struct acpi_thermal *tz = thermal->devdata; struct acpi_thermal *tz = thermal->devdata; int i; int i; Loading Loading @@ -690,7 +689,8 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal, } } static int thermal_get_crit_temp(struct thermal_zone_device *thermal, static int thermal_get_crit_temp(struct thermal_zone_device *thermal, unsigned long *temperature) { int *temperature) { struct acpi_thermal *tz = thermal->devdata; struct acpi_thermal *tz = thermal->devdata; if (tz->trips.critical.flags.valid) { if (tz->trips.critical.flags.valid) { Loading @@ -713,8 +713,8 @@ static int thermal_get_trend(struct thermal_zone_device *thermal, return -EINVAL; return -EINVAL; if (type == THERMAL_TRIP_ACTIVE) { if (type == THERMAL_TRIP_ACTIVE) { unsigned long trip_temp; int trip_temp; unsigned long temp = DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET( int temp = DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET( tz->temperature, tz->kelvin_offset); tz->temperature, tz->kelvin_offset); if (thermal_get_trip_temp(thermal, trip, &trip_temp)) if (thermal_get_trip_temp(thermal, trip, &trip_temp)) return -EINVAL; return -EINVAL; Loading drivers/hwmon/lm75.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -104,7 +104,7 @@ static inline long lm75_reg_to_mc(s16 temp, u8 resolution) /* sysfs attributes for hwmon */ /* sysfs attributes for hwmon */ static int lm75_read_temp(void *dev, long *temp) static int lm75_read_temp(void *dev, int *temp) { { struct lm75_data *data = lm75_update_device(dev); struct lm75_data *data = lm75_update_device(dev); Loading drivers/hwmon/ntc_thermistor.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -477,7 +477,7 @@ static int ntc_thermistor_get_ohm(struct ntc_data *data) return -EINVAL; return -EINVAL; } } static int ntc_read_temp(void *dev, long *temp) static int ntc_read_temp(void *dev, int *temp) { { struct ntc_data *data = dev_get_drvdata(dev); struct ntc_data *data = dev_get_drvdata(dev); int ohm; int ohm; Loading drivers/hwmon/tmp102.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -98,7 +98,7 @@ static struct tmp102 *tmp102_update_device(struct device *dev) return tmp102; return tmp102; } } static int tmp102_read_temp(void *dev, long *temp) static int tmp102_read_temp(void *dev, int *temp) { { struct tmp102 *tmp102 = tmp102_update_device(dev); struct tmp102 *tmp102 = tmp102_update_device(dev); Loading Loading
Documentation/thermal/sysfs-api.txt +6 −0 Original line number Original line Diff line number Diff line Loading @@ -180,6 +180,7 @@ Thermal zone device sys I/F, created once it's registered: |---temp: Current temperature |---temp: Current temperature |---mode: Working mode of the thermal zone |---mode: Working mode of the thermal zone |---policy: Thermal governor used for this zone |---policy: Thermal governor used for this zone |---available_policies: Available thermal governors for this zone |---trip_point_[0-*]_temp: Trip point temperature |---trip_point_[0-*]_temp: Trip point temperature |---trip_point_[0-*]_type: Trip point type |---trip_point_[0-*]_type: Trip point type |---trip_point_[0-*]_hyst: Hysteresis value for this trip point |---trip_point_[0-*]_hyst: Hysteresis value for this trip point Loading Loading @@ -256,6 +257,10 @@ policy One of the various thermal governors used for a particular zone. One of the various thermal governors used for a particular zone. RW, Required RW, Required available_policies Available thermal governors which can be used for a particular zone. RO, Required trip_point_[0-*]_temp trip_point_[0-*]_temp The temperature above which trip point will be fired. The temperature above which trip point will be fired. Unit: millidegree Celsius Unit: millidegree Celsius Loading Loading @@ -417,6 +422,7 @@ method, the sys I/F structure will be built like this: |---temp: 37000 |---temp: 37000 |---mode: enabled |---mode: enabled |---policy: step_wise |---policy: step_wise |---available_policies: step_wise fair_share |---trip_point_0_temp: 100000 |---trip_point_0_temp: 100000 |---trip_point_0_type: critical |---trip_point_0_type: critical |---trip_point_1_temp: 80000 |---trip_point_1_temp: 80000 Loading
drivers/acpi/thermal.c +6 −6 Original line number Original line Diff line number Diff line Loading @@ -529,8 +529,7 @@ static void acpi_thermal_check(void *data) /* sys I/F for generic thermal sysfs support */ /* sys I/F for generic thermal sysfs support */ static int thermal_get_temp(struct thermal_zone_device *thermal, static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp) unsigned long *temp) { { struct acpi_thermal *tz = thermal->devdata; struct acpi_thermal *tz = thermal->devdata; int result; int result; Loading Loading @@ -637,7 +636,7 @@ static int thermal_get_trip_type(struct thermal_zone_device *thermal, } } static int thermal_get_trip_temp(struct thermal_zone_device *thermal, static int thermal_get_trip_temp(struct thermal_zone_device *thermal, int trip, unsigned long *temp) int trip, int *temp) { { struct acpi_thermal *tz = thermal->devdata; struct acpi_thermal *tz = thermal->devdata; int i; int i; Loading Loading @@ -690,7 +689,8 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal, } } static int thermal_get_crit_temp(struct thermal_zone_device *thermal, static int thermal_get_crit_temp(struct thermal_zone_device *thermal, unsigned long *temperature) { int *temperature) { struct acpi_thermal *tz = thermal->devdata; struct acpi_thermal *tz = thermal->devdata; if (tz->trips.critical.flags.valid) { if (tz->trips.critical.flags.valid) { Loading @@ -713,8 +713,8 @@ static int thermal_get_trend(struct thermal_zone_device *thermal, return -EINVAL; return -EINVAL; if (type == THERMAL_TRIP_ACTIVE) { if (type == THERMAL_TRIP_ACTIVE) { unsigned long trip_temp; int trip_temp; unsigned long temp = DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET( int temp = DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET( tz->temperature, tz->kelvin_offset); tz->temperature, tz->kelvin_offset); if (thermal_get_trip_temp(thermal, trip, &trip_temp)) if (thermal_get_trip_temp(thermal, trip, &trip_temp)) return -EINVAL; return -EINVAL; Loading
drivers/hwmon/lm75.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -104,7 +104,7 @@ static inline long lm75_reg_to_mc(s16 temp, u8 resolution) /* sysfs attributes for hwmon */ /* sysfs attributes for hwmon */ static int lm75_read_temp(void *dev, long *temp) static int lm75_read_temp(void *dev, int *temp) { { struct lm75_data *data = lm75_update_device(dev); struct lm75_data *data = lm75_update_device(dev); Loading
drivers/hwmon/ntc_thermistor.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -477,7 +477,7 @@ static int ntc_thermistor_get_ohm(struct ntc_data *data) return -EINVAL; return -EINVAL; } } static int ntc_read_temp(void *dev, long *temp) static int ntc_read_temp(void *dev, int *temp) { { struct ntc_data *data = dev_get_drvdata(dev); struct ntc_data *data = dev_get_drvdata(dev); int ohm; int ohm; Loading
drivers/hwmon/tmp102.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -98,7 +98,7 @@ static struct tmp102 *tmp102_update_device(struct device *dev) return tmp102; return tmp102; } } static int tmp102_read_temp(void *dev, long *temp) static int tmp102_read_temp(void *dev, int *temp) { { struct tmp102 *tmp102 = tmp102_update_device(dev); struct tmp102 *tmp102 = tmp102_update_device(dev); Loading