Exemplo n.º 1
0
int tsens_get_temp(struct tsens_device *device, unsigned long *temp)
{
	if (!tmdev)
		return -ENODEV;

	tsens8960_get_temp(device->sensor_num, temp);

	return 0;
}
Exemplo n.º 2
0
static int tsens_tz_get_temp(struct thermal_zone_device *thermal,
			     unsigned long *temp)
{
	struct tsens_tm_device_sensor *tm_sensor = thermal->devdata;

	if (!tm_sensor || tm_sensor->mode != THERMAL_DEVICE_ENABLED || !temp)
		return -EINVAL;

	tsens8960_get_temp(tm_sensor->sensor_num, temp);

	return 0;
}
Exemplo n.º 3
0
int tsens_get_sensor_temp(int sensor_num, unsigned long *temp)
{
	if (!tmdev)
		return -ENODEV;

	if (sensor_num < 0 || sensor_num >= TSENS_MAX_SENSORS)
		return -EINVAL;

	tsens8960_get_temp(sensor_num, temp);

	return 0;
}