Lines Matching refs:chip_spec
200 const struct vcnl4000_chip_spec *chip_spec; member
271 return data->chip_spec->set_power_state(data, true); in vcnl4000_init()
388 data->al_scale = data->chip_spec->ulux_step; in vcnl4200_init()
392 ret = data->chip_spec->set_power_state(data, true); in vcnl4200_init()
567 if (ret >= data->chip_spec->num_als_it_times) in vcnl4040_read_als_it()
570 *val = (*data->chip_spec->als_it_times)[ret][0]; in vcnl4040_read_als_it()
571 *val2 = (*data->chip_spec->als_it_times)[ret][1]; in vcnl4040_read_als_it()
582 for (i = 0; i < data->chip_spec->num_als_it_times; i++) { in vcnl4040_write_als_it()
583 if (val == (*data->chip_spec->als_it_times)[i][1]) in vcnl4040_write_als_it()
587 if (i == data->chip_spec->num_als_it_times) in vcnl4040_write_als_it()
591 data->al_scale = div_u64(mul_u32_u32(data->chip_spec->ulux_step, in vcnl4040_write_als_it()
592 (*data->chip_spec->als_it_times)[0][1]), in vcnl4040_write_als_it()
622 if (ret >= data->chip_spec->num_ps_it_times) in vcnl4040_read_ps_it()
625 *val = (*data->chip_spec->ps_it_times)[ret][0]; in vcnl4040_read_ps_it()
626 *val2 = (*data->chip_spec->ps_it_times)[ret][1]; in vcnl4040_read_ps_it()
637 for (i = 0; i < data->chip_spec->num_ps_it_times; i++) { in vcnl4040_write_ps_it()
638 if (val == (*data->chip_spec->ps_it_times)[i][1]) { in vcnl4040_write_ps_it()
679 if (it >= data->chip_spec->num_als_it_times) in vcnl4040_read_als_period()
682 val_c = mul_u32_u32((*data->chip_spec->als_it_times)[it][1], in vcnl4040_read_als_period()
701 if (it >= data->chip_spec->num_als_it_times) in vcnl4040_write_als_period()
706 (*data->chip_spec->als_it_times)[it][1])) in vcnl4040_write_als_period()
739 if (it >= data->chip_spec->num_ps_it_times) in vcnl4040_read_ps_period()
742 *val = (*data->chip_spec->ps_it_times)[it][0]; in vcnl4040_read_ps_period()
743 *val2 = (*data->chip_spec->ps_it_times)[it][1] * in vcnl4040_read_ps_period()
759 if (it >= data->chip_spec->num_ps_it_times) in vcnl4040_write_ps_period()
767 (*data->chip_spec->ps_it_times)[it][1]) in vcnl4040_write_ps_period()
898 ret = data->chip_spec->measure_light(data, val); in vcnl4000_read_raw()
903 ret = data->chip_spec->measure_proximity(data, val); in vcnl4000_read_raw()
1006 *vals = (int *)(*data->chip_spec->als_it_times); in vcnl4040_read_avail()
1007 *length = 2 * data->chip_spec->num_als_it_times; in vcnl4040_read_avail()
1010 *vals = (int *)(*data->chip_spec->ps_it_times); in vcnl4040_read_avail()
1011 *length = 2 * data->chip_spec->num_ps_it_times; in vcnl4040_read_avail()
1526 ret = i2c_smbus_read_word_data(data->client, data->chip_spec->int_reg); in vcnl4040_irq_thread()
1942 data->chip_spec = &vcnl4000_chip_spec_cfg[data->id]; in vcnl4000_probe()
1946 ret = data->chip_spec->init(data); in vcnl4000_probe()
1951 data->chip_spec->prod, data->rev); in vcnl4000_probe()
1957 indio_dev->info = data->chip_spec->info; in vcnl4000_probe()
1958 indio_dev->channels = data->chip_spec->channels; in vcnl4000_probe()
1959 indio_dev->num_channels = data->chip_spec->num_channels; in vcnl4000_probe()
1963 if (data->chip_spec->trig_buffer_func && in vcnl4000_probe()
1964 data->chip_spec->buffer_setup_ops) { in vcnl4000_probe()
1967 data->chip_spec->trig_buffer_func, in vcnl4000_probe()
1968 data->chip_spec->buffer_setup_ops); in vcnl4000_probe()
1976 if (client->irq && data->chip_spec->irq_thread) { in vcnl4000_probe()
1978 NULL, data->chip_spec->irq_thread, in vcnl4000_probe()
2007 data->chip_spec->set_power_state(data, false); in vcnl4000_probe()
2047 ret = data->chip_spec->set_power_state(data, false); in vcnl4000_remove()
2058 return data->chip_spec->set_power_state(data, false); in vcnl4000_runtime_suspend()
2066 return data->chip_spec->set_power_state(data, true); in vcnl4000_runtime_resume()