Home
last modified time | relevance | path

Searched refs:chip_info (Results 1 – 25 of 39) sorted by relevance

12

/linux-4.19.296/drivers/iio/light/
Dbh1750.c44 const struct bh1750_chip_info *chip_info; member
78 const struct bh1750_chip_info *chip_info = data->chip_info; in bh1750_change_int_time() local
80 if ((usec % chip_info->mtreg_to_usec) != 0) in bh1750_change_int_time()
83 val = usec / chip_info->mtreg_to_usec; in bh1750_change_int_time()
84 if (val < chip_info->mtreg_min || val > chip_info->mtreg_max) in bh1750_change_int_time()
91 regval = (val & chip_info->int_time_high_mask) >> 5; in bh1750_change_int_time()
97 regval = val & chip_info->int_time_low_mask; in bh1750_change_int_time()
112 const struct bh1750_chip_info *chip_info = data->chip_info; in bh1750_read() local
113 unsigned long delay = chip_info->mtreg_to_usec * data->mtreg; in bh1750_read()
140 const struct bh1750_chip_info *chip_info = data->chip_info; in bh1750_read_raw() local
[all …]
Dltr501.c158 struct ltr501_chip_info *chip_info; member
692 i = (data->als_contr & data->chip_info->als_gain_mask) in ltr501_read_raw()
693 >> data->chip_info->als_gain_shift; in ltr501_read_raw()
694 *val = data->chip_info->als_gain[i].scale; in ltr501_read_raw()
695 *val2 = data->chip_info->als_gain[i].uscale; in ltr501_read_raw()
700 *val = data->chip_info->ps_gain[i].scale; in ltr501_read_raw()
701 *val2 = data->chip_info->ps_gain[i].uscale; in ltr501_read_raw()
744 struct ltr501_chip_info *info = data->chip_info; in ltr501_write_raw()
1091 struct ltr501_chip_info *info = data->chip_info; in ltr501_show_proximity_scale_avail()
1113 struct ltr501_chip_info *info = data->chip_info; in ltr501_show_intensity_scale_avail()
[all …]
/linux-4.19.296/drivers/iio/adc/
Dmcp320x.c95 const struct mcp320x_chip_info *chip_info; member
127 if (adc->chip_info->conv_time) { in mcp320x_adc_conversion()
132 usleep_range(adc->chip_info->conv_time, in mcp320x_adc_conversion()
133 adc->chip_info->conv_time + 100); in mcp320x_adc_conversion()
137 if (adc->chip_info->num_channels > 1) in mcp320x_adc_conversion()
225 *val2 = adc->chip_info->resolution; in mcp320x_read_raw()
380 const struct mcp320x_chip_info *chip_info; in mcp320x_probe() local
398 chip_info = &mcp320x_chip_infos[device_index]; in mcp320x_probe()
399 indio_dev->channels = chip_info->channels; in mcp320x_probe()
400 indio_dev->num_channels = chip_info->num_channels; in mcp320x_probe()
[all …]
Dad7476.c35 const struct ad7476_chip_info *chip_info; member
120 *val = (ret >> st->chip_info->channel[0].scan_type.shift) & in ad7476_read_raw()
121 GENMASK(st->chip_info->channel[0].scan_type.realbits - 1, 0); in ad7476_read_raw()
124 if (!st->chip_info->int_vref_uv) { in ad7476_read_raw()
129 scale_uv = st->chip_info->int_vref_uv; in ad7476_read_raw()
229 st->chip_info = in ad7476_probe()
249 indio_dev->channels = st->chip_info->channel; in ad7476_probe()
255 st->xfer.len = st->chip_info->channel[0].scan_type.storagebits / 8; in ad7476_probe()
265 if (st->chip_info->reset) in ad7476_probe()
266 st->chip_info->reset(st); in ad7476_probe()
Dad7793.c155 const struct ad7793_chip_info *chip_info; member
236 if (!(st->chip_info->flags & AD7793_FLAG_HAS_CLKSEL) && in ad7793_check_platform_data()
240 if (!(st->chip_info->flags & AD7793_FLAG_HAS_REFSEL) && in ad7793_check_platform_data()
244 if (!(st->chip_info->flags & AD7793_FLAG_HAS_VBIAS) && in ad7793_check_platform_data()
248 if (!(st->chip_info->flags & AD7793_HAS_EXITATION_CURRENT) && in ad7793_check_platform_data()
281 if (id != st->chip_info->id) { in ad7793_setup()
290 if (st->chip_info->flags & AD7793_FLAG_HAS_CLKSEL) in ad7793_setup()
292 if (st->chip_info->flags & AD7793_FLAG_HAS_REFSEL) in ad7793_setup()
294 if (st->chip_info->flags & AD7793_FLAG_HAS_VBIAS) in ad7793_setup()
296 if (pdata->buffered || !(st->chip_info->flags & AD7793_FLAG_HAS_BUFFER)) in ad7793_setup()
[all …]
Dad7887.c56 const struct ad7887_chip_info *chip_info; member
177 *val = st->chip_info->int_vref_mv; in ad7887_read_raw()
258 st->chip_info = in ad7887_probe()
310 indio_dev->channels = st->chip_info->channel; in ad7887_probe()
313 indio_dev->channels = &st->chip_info->channel[1]; in ad7887_probe()
Dmax1363.c171 const struct max1363_chip_info *chip_info; member
391 if (st->chip_info->bits != 8) { in max1363_read_single_chan()
399 ((1 << st->chip_info->bits) - 1); in max1363_read_single_chan()
433 *val2 = st->chip_info->bits; in max1363_read_raw()
745 switch (st->chip_info->bits) { in max1363_write_thresh()
1023 st->current_mode = max1363_match_mode(scan_mask, st->chip_info); in max1363_update_scan_mode()
1443 st->current_mode = &max1363_mode_table[st->chip_info->default_mode]; in max1363_initial_setup()
1458 st->chip_info->num_modes + 1), in max1363_alloc_scan_masks()
1463 for (i = 0; i < st->chip_info->num_modes; i++) in max1363_alloc_scan_masks()
1465 max1363_mode_table[st->chip_info->mode_list[i]] in max1363_alloc_scan_masks()
[all …]
Dad7766.c37 const struct ad7766_chip_info *chip_info; member
146 ad7766->chip_info->decimation_factor; in ad7766_read_raw()
226 ad7766->chip_info = &ad7766_chip_info[id->driver_data]; in ad7766_probe()
/linux-4.19.296/drivers/iio/dac/
Dad5449.c63 const struct ad5449_chip_info *chip_info; member
259 if (st->chip_info->num_channels == 1) in ad5449_vref_name()
284 st->chip_info = &ad5449_chip_info[id->driver_data]; in ad5449_spi_probe()
287 for (i = 0; i < st->chip_info->num_channels; ++i) in ad5449_spi_probe()
290 ret = devm_regulator_bulk_get(&spi->dev, st->chip_info->num_channels, in ad5449_spi_probe()
295 ret = regulator_bulk_enable(st->chip_info->num_channels, st->vref_reg); in ad5449_spi_probe()
303 indio_dev->channels = st->chip_info->channels; in ad5449_spi_probe()
304 indio_dev->num_channels = st->chip_info->num_channels; in ad5449_spi_probe()
306 if (st->chip_info->has_ctrl) { in ad5449_spi_probe()
326 regulator_bulk_disable(st->chip_info->num_channels, st->vref_reg); in ad5449_spi_probe()
[all …]
Dad5360.c76 const struct ad5360_chip_info *chip_info; member
176 i = channel / st->chip_info->channels_per_group; in ad5360_get_channel_vref_index()
177 if (i >= st->chip_info->num_vrefs) in ad5360_get_channel_vref_index()
178 i = st->chip_info->num_vrefs - 1; in ad5360_get_channel_vref_index()
440 channels = kcalloc(st->chip_info->num_channels, in ad5360_alloc_channels()
446 for (i = 0; i < st->chip_info->num_channels; ++i) { in ad5360_alloc_channels()
447 channels[i] = st->chip_info->channel_template; in ad5360_alloc_channels()
474 st->chip_info = &ad5360_chip_info_tbl[type]; in ad5360_probe()
481 indio_dev->num_channels = st->chip_info->num_channels; in ad5360_probe()
489 for (i = 0; i < st->chip_info->num_vrefs; ++i) in ad5360_probe()
[all …]
Dad5764.c55 const struct ad5764_chip_info *chip_info; member
215 if (st->chip_info->int_vref) in ad5764_get_channel_vref()
216 return st->chip_info->int_vref; in ad5764_get_channel_vref()
290 st->chip_info = &ad5764_chip_infos[type]; in ad5764_probe()
297 indio_dev->channels = st->chip_info->channels; in ad5764_probe()
299 if (st->chip_info->int_vref == 0) { in ad5764_probe()
329 if (st->chip_info->int_vref == 0) in ad5764_probe()
341 if (st->chip_info->int_vref == 0) in ad5764_remove()
Dad5446.c39 const struct ad5446_chip_info *chip_info; member
124 ret = st->chip_info->write(st, val); in ad5446_write_dac_powerdown()
202 ret = st->chip_info->write(st, val); in ad5446_write_raw()
218 const struct ad5446_chip_info *chip_info) in ad5446_probe() argument
244 st->chip_info = chip_info; in ad5446_probe()
255 indio_dev->channels = &st->chip_info->channel; in ad5446_probe()
260 if (st->chip_info->int_vref_mv) in ad5446_probe()
261 st->vref_mv = st->chip_info->int_vref_mv; in ad5446_probe()
Dad5064.c107 const struct ad5064_chip_info *chip_info; member
206 if (st->chip_info->regmap_type == AD5064_REGMAP_LTC) { in ad5064_sync_powerdown_mode()
210 if (st->chip_info->regmap_type == AD5064_REGMAP_ADI2) in ad5064_sync_powerdown_mode()
308 return st->chip_info->internal_vref; in ad5064_get_vref()
310 i = st->chip_info->shared_vref ? 0 : chan->channel; in ad5064_get_vref()
779 return st->chip_info->shared_vref ? 1 : st->chip_info->num_channels; in ad5064_num_vref()
792 return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref]; in ad5064_vref_name()
799 switch (st->chip_info->regmap_type) { in ad5064_set_config()
819 if (!st->chip_info->internal_vref) in ad5064_request_vref()
861 st->chip_info = &ad5064_chip_info_tbl[type]; in ad5064_probe()
[all …]
Dad5380.c59 const struct ad5380_chip_info *chip_info; member
351 channels = kcalloc(st->chip_info->num_channels, in ad5380_alloc_channels()
357 for (i = 0; i < st->chip_info->num_channels; ++i) { in ad5380_alloc_channels()
358 channels[i] = st->chip_info->channel_template; in ad5380_alloc_channels()
385 st->chip_info = &ad5380_chip_info_tbl[type]; in ad5380_probe()
392 indio_dev->num_channels = st->chip_info->num_channels; in ad5380_probe()
400 if (st->chip_info->int_vref == 2500) in ad5380_probe()
418 st->vref = st->chip_info->int_vref; in ad5380_probe()
Dad5686-spi.c21 switch (st->chip_info->regmap_type) { in ad5686_spi_write()
59 if (st->chip_info->regmap_type == AD5686_REGMAP) in ad5686_spi_read()
61 else if (st->chip_info->regmap_type == AD5683_REGMAP) in ad5686_spi_read()
Dad5761.c290 const struct ad5761_chip_info *chip_info) in ad5761_get_vref() argument
297 if (!chip_info->int_vref) { in ad5761_get_vref()
304 st->vref = chip_info->int_vref; in ad5761_get_vref()
351 const struct ad5761_chip_info *chip_info = in ad5761_probe() local
365 ret = ad5761_get_vref(st, chip_info); in ad5761_probe()
379 iio_dev->channels = &chip_info->channel; in ad5761_probe()
Dad5686.c85 switch (st->chip_info->regmap_type) { in ad5686_write_dac_powerdown()
404 st->chip_info = &ad5686_chip_info_tbl[chip_type]; in ad5686_probe()
409 st->vref_mv = st->chip_info->int_vref_mv; in ad5686_probe()
412 for (i = 0; i < st->chip_info->num_channels; i++) in ad5686_probe()
419 indio_dev->channels = st->chip_info->channels; in ad5686_probe()
420 indio_dev->num_channels = st->chip_info->num_channels; in ad5686_probe()
422 switch (st->chip_info->regmap_type) { in ad5686_probe()
Dltc2632.c235 struct ltc2632_chip_info *chip_info; in ltc2632_probe() local
247 chip_info = (struct ltc2632_chip_info *) in ltc2632_probe()
254 st->vref_mv = chip_info->vref_mv; in ltc2632_probe()
294 indio_dev->channels = chip_info->channels; in ltc2632_probe()
Dad5624r_spi.c263 st->chip_info = in ad5624r_probe()
269 st->vref_mv = st->chip_info->int_vref_mv; in ad5624r_probe()
277 indio_dev->channels = st->chip_info->channels; in ad5624r_probe()
/linux-4.19.296/drivers/iio/proximity/
Dsrf08.c79 const struct srf08_chip_info *chip_info; member
324 for (i = 0; i < data->chip_info->num_sensitivity_avail; i++) in srf08_show_sensitivity_available()
325 if (data->chip_info->sensitivity_avail[i]) in srf08_show_sensitivity_available()
327 data->chip_info->sensitivity_avail[i]); in srf08_show_sensitivity_available()
359 for (i = 0; i < data->chip_info->num_sensitivity_avail; i++) in srf08_write_sensitivity()
360 if (val && (val == data->chip_info->sensitivity_avail[i])) { in srf08_write_sensitivity()
365 if (i >= data->chip_info->num_sensitivity_avail) in srf08_write_sensitivity()
473 data->chip_info = &srf02_chip_info; in srf08_probe()
477 data->chip_info = &srf08_chip_info; in srf08_probe()
481 data->chip_info = &srf10_chip_info; in srf08_probe()
[all …]
/linux-4.19.296/drivers/iio/pressure/
Dbmp280-core.c86 const struct bmp280_chip_info *chip_info; member
439 ret = data->chip_info->read_humid(data, val, val2); in bmp280_read_raw()
442 ret = data->chip_info->read_press(data, val, val2); in bmp280_read_raw()
445 ret = data->chip_info->read_temp(data, val); in bmp280_read_raw()
487 const int *avail = data->chip_info->oversampling_humid_avail; in bmp280_write_oversampling_ratio_humid()
488 const int n = data->chip_info->num_oversampling_humid_avail; in bmp280_write_oversampling_ratio_humid()
494 return data->chip_info->chip_config(data); in bmp280_write_oversampling_ratio_humid()
504 const int *avail = data->chip_info->oversampling_temp_avail; in bmp280_write_oversampling_ratio_temp()
505 const int n = data->chip_info->num_oversampling_temp_avail; in bmp280_write_oversampling_ratio_temp()
511 return data->chip_info->chip_config(data); in bmp280_write_oversampling_ratio_temp()
[all …]
/linux-4.19.296/drivers/clk/
Dclk-versaclock5.c159 const struct vc5_chip_info *chip_info; member
679 if (idx >= vc5->chip_info->clk_out_cnt) in vc5_of_clk_get()
717 vc5->chip_info = of_device_get_match_data(&client->dev); in vc5_probe()
739 } else if (vc5->chip_info->flags & VC5_HAS_INTERNAL_XTAL) { in vc5_probe()
771 if (vc5->chip_info->flags & VC5_HAS_PFD_FREQ_DBL) { in vc5_probe()
793 if (vc5->chip_info->flags & VC5_HAS_PFD_FREQ_DBL) in vc5_probe()
822 for (n = 0; n < vc5->chip_info->clk_fod_cnt; n++) { in vc5_probe()
823 idx = vc5_map_index_to_output(vc5->chip_info->model, n); in vc5_probe()
859 for (n = 1; n < vc5->chip_info->clk_out_cnt; n++) { in vc5_probe()
860 idx = vc5_map_index_to_output(vc5->chip_info->model, n - 1); in vc5_probe()
[all …]
/linux-4.19.296/drivers/iio/accel/
Dmma8452.c108 const struct mma_chip_info *chip_info; member
384 return mma8452_show_int_plus_micros(buf, data->chip_info->mma_scales, in mma8452_show_scale_avail()
385 ARRAY_SIZE(data->chip_info->mma_scales)); in mma8452_show_scale_avail()
447 return mma8452_get_int_plus_micros_index(data->chip_info->mma_scales, in mma8452_get_scale_index()
448 ARRAY_SIZE(data->chip_info->mma_scales), val, val2); in mma8452_get_scale_index()
513 *val = data->chip_info->mma_scales[i][0]; in mma8452_read_raw()
514 *val2 = data->chip_info->mma_scales[i][1]; in mma8452_read_raw()
799 if ((data->chip_info->all_events in mma8452_get_event_regs()
801 (data->chip_info->enabled_events in mma8452_get_event_regs()
1062 if (!(src & (data->chip_info->enabled_events | MMA8452_INT_DRDY))) in mma8452_interrupt()
[all …]
Dbmc150-accel-core.c214 const struct bmc150_accel_chip_info *chip_info; member
514 for (i = 0; i < ARRAY_SIZE(data->chip_info->scale_table); ++i) { in bmc150_accel_set_scale()
515 if (data->chip_info->scale_table[i].scale == val) { in bmc150_accel_set_scale()
518 data->chip_info->scale_table[i].reg_range); in bmc150_accel_set_scale()
524 data->range = data->chip_info->scale_table[i].reg_range; in bmc150_accel_set_scale()
624 int st_size = ARRAY_SIZE(data->chip_info->scale_table); in bmc150_accel_read_raw()
627 si = &data->chip_info->scale_table[i]; in bmc150_accel_read_raw()
1502 data->chip_info = &bmc150_accel_chip_info_tbl[i]; in bmc150_accel_chip_init()
1507 if (!data->chip_info) { in bmc150_accel_chip_init()
1574 indio_dev->channels = data->chip_info->channels; in bmc150_accel_core_probe()
[all …]
/linux-4.19.296/drivers/iio/imu/
Dadis16480.c120 const struct adis16480_chip_info *chip_info; member
521 *val = st->chip_info->gyro_max_scale; in adis16480_read_raw()
522 *val2 = st->chip_info->gyro_max_val; in adis16480_read_raw()
525 *val = st->chip_info->accel_max_scale; in adis16480_read_raw()
526 *val2 = st->chip_info->accel_max_val; in adis16480_read_raw()
850 st->chip_info = &adis16480_chip_info[id->driver_data]; in adis16480_probe()
853 indio_dev->channels = st->chip_info->channels; in adis16480_probe()
854 indio_dev->num_channels = st->chip_info->num_channels; in adis16480_probe()

12