Exemplo n.º 1
0
static ssize_t show_temp(struct device *dev, struct device_attribute
			 *devattr, char *buf)
{
	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
	struct smsc47b397_data *data = smsc47b397_update_device(dev);
	return sprintf(buf, "%d\n", temp_from_reg(data->temp[attr->index]));
}
Exemplo n.º 2
0
static ssize_t show_temp_input(struct device *dev, struct device_attribute
			       *devattr, char *buf)
{
	struct pc87427_data *data = pc87427_update_device(dev);
	int nr = to_sensor_dev_attr(devattr)->index;

	return sprintf(buf, "%ld\n", temp_from_reg(data->temp[nr]));
}
Exemplo n.º 3
0
static ssize_t show_temp_hyst(struct device *dev, struct device_attribute
                              *devattr, char *buf)
{
    struct f71805f_data *data = f71805f_update_device(dev);
    struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
    int nr = attr->index;

    return sprintf(buf, "%ld\n", temp_from_reg(data->temp_hyst[nr]));
}
Exemplo n.º 4
0
static ssize_t show_pwm_auto_point_temp(struct device *dev,
					struct device_attribute *devattr,
					char* buf)
{
	struct f71805f_data *data = dev_get_drvdata(dev);
	struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr);
	int pwmnr = attr->nr;
	int apnr = attr->index;

	return sprintf(buf, "%ld\n",
		       temp_from_reg(data->auto_points[pwmnr].temp[apnr]));
}
Exemplo n.º 5
0
/* 0 <= nr <= 3 */
static ssize_t show_temp(struct device *dev, char *buf, int nr)
{
	struct smsc47b397_data *data = smsc47b397_update_device(dev);
	return sprintf(buf, "%d\n", temp_from_reg(data->temp[nr]));
}