/linux-4.19.296/drivers/iio/light/ |
D | bh1750.c | 44 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 …]
|
D | ltr501.c | 158 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/ |
D | mcp320x.c | 95 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 …]
|
D | ad7476.c | 35 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()
|
D | ad7793.c | 155 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 …]
|
D | ad7887.c | 56 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()
|
D | max1363.c | 171 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 …]
|
D | ad7766.c | 37 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/ |
D | ad5449.c | 63 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 …]
|
D | ad5360.c | 76 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 …]
|
D | ad5764.c | 55 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()
|
D | ad5446.c | 39 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()
|
D | ad5064.c | 107 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 …]
|
D | ad5380.c | 59 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()
|
D | ad5686-spi.c | 21 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()
|
D | ad5761.c | 290 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()
|
D | ad5686.c | 85 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()
|
D | ltc2632.c | 235 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()
|
D | ad5624r_spi.c | 263 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/ |
D | srf08.c | 79 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/ |
D | bmp280-core.c | 86 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/ |
D | clk-versaclock5.c | 159 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/ |
D | mma8452.c | 108 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 …]
|
D | bmc150-accel-core.c | 214 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/ |
D | adis16480.c | 120 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()
|