Lines Matching refs:index
656 * temperature register index
1309 static int lm90_temp_get_resolution(struct lm90_data *data, int index)
1311 switch (index) {
1350 static int lm90_get_temp(struct lm90_data *data, int index, int channel)
1352 int temp = lm90_temp_from_reg(data->flags, data->temp[index],
1353 lm90_temp_get_resolution(data, index));
1381 static int lm90_set_temp(struct lm90_data *data, int index, int channel, long val)
1398 u8 regh = regs[index];
1403 if (index == REMOTE_LOW || index == REMOTE2_LOW)
1405 else if (index == REMOTE_HIGH || index == REMOTE2_HIGH)
1416 data->temp[index] = lm90_temp_to_reg(data->flags, val,
1417 lm90_temp_get_resolution(data, index));
1422 err = lm90_write16(client, regh, regl, data->temp[index]);
1430 static int lm90_get_temphyst(struct lm90_data *data, int index, int channel)
1432 int temp = lm90_get_temp(data, index, channel);
1448 static int lm90_get_temp_offset(struct lm90_data *data, int index)
1450 int res = lm90_temp_get_resolution(data, index);
1452 return lm90_temp_from_reg(0, data->temp[index], res);
1455 static int lm90_set_temp_offset(struct lm90_data *data, int index, int channel, long val)
1459 val = lm90_temp_to_reg(0, val, lm90_temp_get_resolution(data, index));
1473 data->temp[index] = val;