Lines Matching refs:index
71 static int lm95234_read_temp(struct i2c_client *client, int index, int *t) in lm95234_read_temp() argument
76 if (index) { in lm95234_read_temp()
78 LM95234_REG_UTEMPH(index - 1)); in lm95234_read_temp()
83 LM95234_REG_UTEMPL(index - 1)); in lm95234_read_temp()
95 LM95234_REG_TEMPH(index)); in lm95234_read_temp()
100 LM95234_REG_TEMPL(index)); in lm95234_read_temp()
209 int index = to_sensor_dev_attr(attr)->index; in temp_show() local
216 DIV_ROUND_CLOSEST(data->temp[index] * 125, 32)); in temp_show()
223 u32 mask = to_sensor_dev_attr(attr)->index; in alarm_show()
236 u8 mask = to_sensor_dev_attr(attr)->index; in type_show()
250 u8 mask = to_sensor_dev_attr(attr)->index; in type_store()
280 int index = to_sensor_dev_attr(attr)->index; in tcrit2_show() local
286 return sprintf(buf, "%u", data->tcrit2[index] * 1000); in tcrit2_show()
293 int index = to_sensor_dev_attr(attr)->index; in tcrit2_store() local
304 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, index ? 255 : 127); in tcrit2_store()
307 data->tcrit2[index] = val; in tcrit2_store()
308 i2c_smbus_write_byte_data(data->client, LM95234_REG_TCRIT2(index), val); in tcrit2_store()
318 int index = to_sensor_dev_attr(attr)->index; in tcrit2_hyst_show() local
326 ((int)data->tcrit2[index] - (int)data->thyst) * 1000); in tcrit2_hyst_show()
333 int index = to_sensor_dev_attr(attr)->index; in tcrit1_show() local
335 return sprintf(buf, "%u", data->tcrit1[index] * 1000); in tcrit1_show()
342 int index = to_sensor_dev_attr(attr)->index; in tcrit1_store() local
356 data->tcrit1[index] = val; in tcrit1_store()
357 i2c_smbus_write_byte_data(data->client, LM95234_REG_TCRIT1(index), val); in tcrit1_store()
367 int index = to_sensor_dev_attr(attr)->index; in tcrit1_hyst_show() local
375 ((int)data->tcrit1[index] - (int)data->thyst) * 1000); in tcrit1_hyst_show()
383 int index = to_sensor_dev_attr(attr)->index; in tcrit1_hyst_store() local
395 val = clamp_val((int)data->tcrit1[index] - val, 0, 31); in tcrit1_hyst_store()
409 int index = to_sensor_dev_attr(attr)->index; in offset_show() local
415 return sprintf(buf, "%d", data->toffset[index] * 500); in offset_show()
422 int index = to_sensor_dev_attr(attr)->index; in offset_store() local
437 data->toffset[index] = val; in offset_store()
438 i2c_smbus_write_byte_data(data->client, LM95234_REG_OFFSET(index), val); in offset_store()