Lines Matching refs:fan_min
189 u8 fan_min[3]; /* Register value */ member
257 return sprintf(buf, "%u\n", FAN_FROM_REG(data->fan_min[attr->index], in fan_min_show()
282 long fan_min; in fan_min_store() local
285 err = kstrtol(buf, 10, &fan_min); in fan_min_store()
290 fan_min = FAN_TO_REG(fan_min, in fan_min_store()
294 while (fan_min > 255 in fan_min_store()
296 fan_min >>= 1; in fan_min_store()
300 data->fan_min[attr->index] = fan_min > 255 ? 255 : fan_min; in fan_min_store()
303 data->fan_min[attr->index]); in fan_min_store()
329 static struct sensor_device_attribute fan_min[] = { variable
330 SENSOR_ATTR_RW(fan1_min, fan_min, 0),
331 SENSOR_ATTR_RW(fan2_min, fan_min, 1),
332 SENSOR_ATTR_RW(fan3_min, fan_min, 2),
339 &fan_min[X].dev_attr.attr, \
1538 u8 old_min = data->fan_min[nr]; in pc87360_autodiv()
1545 data->fan_min[nr] >>= 1; in pc87360_autodiv()
1553 while (!(data->fan_min[nr] & 0x80) /* min "nails" divider */ in pc87360_autodiv()
1557 data->fan_min[nr] <<= 1; in pc87360_autodiv()
1567 if (old_min != data->fan_min[nr]) { in pc87360_autodiv()
1570 data->fan_min[nr]); in pc87360_autodiv()
1592 data->fan_min[i] = pc87360_read_value(data, in pc87360_update_device()