Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27bcfc79 authored by Ram Chandrasekar's avatar Ram Chandrasekar Committed by Gerrit - the friendly Code Review server
Browse files

thermal: tsens: Remove sysfs notification



Remove sysfs notification from tsens driver. Thermal core
framework will be the right place to determine the
userspace threshold trip and do a sysfs notify.

Change-Id: I14be7a01074ce4e9f6d309424115cbebd2e2b6cf
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent ba6ee8cf
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -544,7 +544,6 @@ struct tsens_tm_device_sensor {
	/* Software index. This is keep track of the HW/SW
	 * sensor_ID mapping */
	unsigned int			sensor_sw_id;
	struct work_struct		work;
	int				offset;
	int				calib_data_point1;
	int				calib_data_point2;
@@ -973,15 +972,6 @@ static struct thermal_zone_device_ops tsens_thermal_zone_ops = {
	.notify = tsens_tz_notify,
};

static void notify_uspace_tsens_fn(struct work_struct *work)
{
	struct tsens_tm_device_sensor *tm = container_of(work,
		struct tsens_tm_device_sensor, work);

	sysfs_notify(&tm->tz_dev->device.kobj,
					NULL, "type");
}

static void tsens_scheduler_fn(struct work_struct *work)
{
	struct tsens_tm_device *tm = container_of(work, struct tsens_tm_device,
@@ -1029,8 +1019,6 @@ static void tsens_scheduler_fn(struct work_struct *work)
			tsens_tz_get_temp(tm->sensor[i].tz_dev, &temp);
			thermal_sensor_trip(tm->sensor[i].tz_dev, trip, temp);

			/* Notify user space */
			queue_work(tm->tsens_wq, &tm->sensor[i].work);
			rc = tsens_get_sw_id_mapping(
					tm->sensor[i].sensor_hw_num,
					&sensor_sw_id);
@@ -1219,7 +1207,6 @@ static int tsens_calib_msm8909_sensors(void)
				tmdev->sensor[i].slope_mul_tsens_factor);
		pr_debug("offset:%d and slope:%d\n", tmdev->sensor[i].offset,
				tmdev->sensor[i].slope_mul_tsens_factor);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}

@@ -1387,7 +1374,6 @@ static int tsens_calib_8939_sensors(void)
				tmdev->sensor[i].slope_mul_tsens_factor);
		pr_debug("offset:%d and slope:%d\n", tmdev->sensor[i].offset,
				tmdev->sensor[i].slope_mul_tsens_factor);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}

@@ -1511,7 +1497,6 @@ static int tsens_calib_8916_sensors(void)
				tmdev->sensor[i].slope_mul_tsens_factor);
		pr_debug("offset:%d and slope:%d\n", tmdev->sensor[i].offset,
				tmdev->sensor[i].slope_mul_tsens_factor);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}

@@ -1594,7 +1579,6 @@ compute_intercept_slope:
				tmdev->sensor[i].slope_mul_tsens_factor);
		pr_debug("offset:%d and slope:%d\n", tmdev->sensor[i].offset,
				tmdev->sensor[i].slope_mul_tsens_factor);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}

@@ -1837,7 +1821,6 @@ calibration_less_mode:
				tmdev->sensor[i].slope_mul_tsens_factor);
		pr_debug("offset:%d and slope:%d\n", tmdev->sensor[i].offset,
				tmdev->sensor[i].slope_mul_tsens_factor);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}

@@ -1946,7 +1929,6 @@ compute_intercept_slope:
		tmdev->sensor[i].offset = (tmdev->sensor[i].calib_data_point1 *
			tmdev->tsens_factor) - (TSENS_CAL_DEGC_POINT1 *
				tmdev->sensor[i].slope_mul_tsens_factor);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}

@@ -2103,7 +2085,6 @@ compute_intercept_slope:
		tmdev->sensor[i].offset = (tmdev->sensor[i].calib_data_point1 *
			tmdev->tsens_factor) - (TSENS_CAL_DEGC_POINT1 *
				tmdev->sensor[i].slope_mul_tsens_factor);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}

@@ -2438,7 +2419,6 @@ compute_intercept_slope:
			tmdev->tsens_factor) - (TSENS_CAL_DEGC_POINT1 *
				tmdev->sensor[i].slope_mul_tsens_factor);
		pr_debug("offset:%d\n", tmdev->sensor[i].offset);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}

@@ -2711,7 +2691,6 @@ compute_intercept_slope:
			tmdev->tsens_factor) - (TSENS_CAL_DEGC_POINT1 *
				tmdev->sensor[i].slope_mul_tsens_factor);
		pr_debug("offset:%d\n", tmdev->sensor[i].offset);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}

@@ -2793,7 +2772,6 @@ static int tsens_calib_mdm9640_sensors(void)
				tmdev->sensor[i].slope_mul_tsens_factor);
		pr_debug("offset:%d and slope:%d\n", tmdev->sensor[i].offset,
				tmdev->sensor[i].slope_mul_tsens_factor);
		INIT_WORK(&tmdev->sensor[i].work, notify_uspace_tsens_fn);
		tmdev->prev_reading_avail = false;
	}