Lines Matching refs:chip_info
103 const struct mlx_chip_info *chip_info; /* Chip hardware details */ member
154 const struct mlx_chip_info *chip_info = data->chip_info; in mlx90614_iir_search() local
158 for (i = chip_info->iir_valid_offset; in mlx90614_iir_search()
159 i < ARRAY_SIZE(chip_info->iir_values); in mlx90614_iir_search()
161 if (value == chip_info->iir_values[i]) in mlx90614_iir_search()
165 if (i == ARRAY_SIZE(chip_info->iir_values)) in mlx90614_iir_search()
173 ret = i2c_smbus_read_word_data(client, chip_info->op_eeprom_config1); in mlx90614_iir_search()
178 if (chip_info->fir_config_mask) { in mlx90614_iir_search()
179 ret &= ~chip_info->fir_config_mask; in mlx90614_iir_search()
180 ret |= field_prep(chip_info->fir_config_mask, MLX90614_CONST_FIR); in mlx90614_iir_search()
183 ret &= ~chip_info->iir_config_mask; in mlx90614_iir_search()
184 ret |= field_prep(chip_info->iir_config_mask, i); in mlx90614_iir_search()
187 ret = mlx90614_write_word(client, chip_info->op_eeprom_config1, ret); in mlx90614_iir_search()
247 const struct mlx_chip_info *chip_info = data->chip_info; in mlx90614_read_raw() local
255 cmd = chip_info->op_ram_ta; in mlx90614_read_raw()
258 if (chip_info->dual_channel && channel->channel) in mlx90614_read_raw()
263 cmd = chip_info->op_ram_tobj1; in mlx90614_read_raw()
266 cmd = chip_info->op_ram_tobj2; in mlx90614_read_raw()
305 chip_info->op_eeprom_emissivity); in mlx90614_read_raw()
312 if (ret == chip_info->emissivity_max) { in mlx90614_read_raw()
317 *val2 = ret * NSEC_PER_SEC / chip_info->emissivity_max; in mlx90614_read_raw()
328 chip_info->op_eeprom_config1); in mlx90614_read_raw()
335 idx = field_get(chip_info->iir_config_mask, ret) - in mlx90614_read_raw()
336 chip_info->iir_valid_offset; in mlx90614_read_raw()
338 *val = chip_info->iir_values[idx] / 100; in mlx90614_read_raw()
339 *val2 = (chip_info->iir_values[idx] % 100) * 10000; in mlx90614_read_raw()
351 const struct mlx_chip_info *chip_info = data->chip_info; in mlx90614_write_raw() local
358 val = val * chip_info->emissivity_max + in mlx90614_write_raw()
359 val2 * chip_info->emissivity_max / NSEC_PER_SEC; in mlx90614_write_raw()
367 chip_info->op_eeprom_emissivity, val); in mlx90614_write_raw()
412 const struct mlx_chip_info *chip_info = data->chip_info; in mlx90614_read_avail() local
416 *vals = (int *)chip_info->iir_freqs; in mlx90614_read_avail()
418 *length = 2 * (ARRAY_SIZE(chip_info->iir_freqs) - in mlx90614_read_avail()
419 chip_info->iir_valid_offset); in mlx90614_read_avail()
473 const struct mlx_chip_info *chip_info = data->chip_info; in mlx90614_sleep() local
486 I2C_SMBUS_WRITE, chip_info->op_sleep, in mlx90614_sleep()
495 const struct mlx_chip_info *chip_info = data->chip_info; in mlx90614_wakeup() local
506 msleep(chip_info->wakeup_delay_ms); in mlx90614_wakeup()
519 i2c_smbus_read_word_data(data->client, chip_info->op_eeprom_config1); in mlx90614_wakeup()
570 const struct mlx_chip_info *chip_info = data->chip_info; in mlx90614_probe_num_ir_sensors() local
573 if (chip_info->dual_channel) in mlx90614_probe_num_ir_sensors()
576 ret = i2c_smbus_read_word_data(client, chip_info->op_eeprom_config1); in mlx90614_probe_num_ir_sensors()
603 data->chip_info = device_get_match_data(&client->dev); in mlx90614_probe()