/drivers/iio/light/ |
D | lv0104cs.c | 48 int val2; member 161 int *val, int *val2) in lv0104cs_get_lux() argument 203 *val2 = 0; in lv0104cs_get_lux() 208 *val2 = 0; in lv0104cs_get_lux() 213 *val2 = (adc_output % 2) * 500000; in lv0104cs_get_lux() 218 *val2 = (adc_output % 8) * 125000; in lv0104cs_get_lux() 228 int *val, int *val2, long mask) in lv0104cs_read_raw() argument 240 ret = lv0104cs_get_lux(lv0104cs, val, val2); in lv0104cs_read_raw() 248 *val2 = lv0104cs_calibscales[lv0104cs->calibscale].val2; in lv0104cs_read_raw() 254 *val2 = lv0104cs_scales[lv0104cs->scale].val2; in lv0104cs_read_raw() [all …]
|
D | veml6030.c | 215 int *val, int *val2) in veml6030_get_intgrn_tm() argument 229 *val2 = 100000; in veml6030_get_intgrn_tm() 232 *val2 = 200000; in veml6030_get_intgrn_tm() 235 *val2 = 400000; in veml6030_get_intgrn_tm() 238 *val2 = 800000; in veml6030_get_intgrn_tm() 241 *val2 = 50000; in veml6030_get_intgrn_tm() 244 *val2 = 25000; in veml6030_get_intgrn_tm() 255 int val, int val2) in veml6030_set_intgrn_tm() argument 263 switch (val2) { in veml6030_set_intgrn_tm() 316 int *val, int *val2) in veml6030_read_persistence() argument [all …]
|
D | opt3001.c | 97 int val2; member 103 .val2 = 950000, 107 .val2 = 900000, 111 .val2 = 800000, 115 .val2 = 600000, 119 .val2 = 200000, 123 .val2 = 400000, 127 .val2 = 800000, 131 .val2 = 600000, 135 .val2 = 200000, [all …]
|
D | cm3232.c | 43 int val2; member 133 static int cm3232_read_als_it(struct cm3232_chip *chip, int *val, int *val2) in cm3232_read_als_it() argument 144 *val2 = cm3232_als_it_scales[i].val2; in cm3232_read_als_it() 162 static int cm3232_write_als_it(struct cm3232_chip *chip, int val, int val2) in cm3232_write_als_it() argument 171 val2 == cm3232_als_it_scales[i].val2) { in cm3232_write_als_it() 204 int val, val2; in cm3232_get_lux() local 209 ret = cm3232_read_als_it(chip, &val, &val2); in cm3232_get_lux() 212 als_it = val * 1000000 + val2; in cm3232_get_lux() 237 int *val, int *val2, long mask) in cm3232_read_raw() argument 254 return cm3232_read_als_it(chip, val, val2); in cm3232_read_raw() [all …]
|
D | noa1305.c | 65 static int noa1305_scale(struct noa1305_priv *priv, int *val, int *val2) in noa1305_scale() argument 83 *val2 = 77 * 8; in noa1305_scale() 87 *val2 = 77 * 4; in noa1305_scale() 91 *val2 = 77 * 2; in noa1305_scale() 95 *val2 = 77; in noa1305_scale() 99 *val2 = 77 * 5; in noa1305_scale() 103 *val2 = 77 * 25; in noa1305_scale() 107 *val2 = 77 * 125; in noa1305_scale() 111 *val2 = 77 * 625; in noa1305_scale() 130 int *val, int *val2, long mask) in noa1305_read_raw() argument [all …]
|
D | ltr501.c | 188 int len, int val, int val2) in ltr501_match_samp_freq() argument 192 freq = val * 1000000 + val2; in ltr501_match_samp_freq() 203 int *val, int *val2) in ltr501_als_read_samp_freq() argument 215 *val2 = ltr501_als_samp_table[i].freq_val % 1000000; in ltr501_als_read_samp_freq() 221 int *val, int *val2) in ltr501_ps_read_samp_freq() argument 233 *val2 = ltr501_ps_samp_table[i].freq_val % 1000000; in ltr501_ps_read_samp_freq() 239 int val, int val2) in ltr501_als_write_samp_freq() argument 245 val, val2); in ltr501_als_write_samp_freq() 258 int val, int val2) in ltr501_ps_write_samp_freq() argument 264 val, val2); in ltr501_ps_write_samp_freq() [all …]
|
D | zopt2201.c | 256 int *val, int *val2, long mask) in zopt2201_read_raw() argument 289 *val2 = 1000000; in zopt2201_read_raw() 290 *val2 *= (1 << (zopt2201_resolution[data->res].bits - 13)); in zopt2201_read_raw() 291 tmp = div_s64(*val * 1000000ULL, *val2); in zopt2201_read_raw() 292 *val = div_s64_rem(tmp, 1000000, val2); in zopt2201_read_raw() 297 *val2 = zopt2201_resolution[data->res].us; in zopt2201_read_raw() 320 int val, int val2) in zopt2201_write_resolution() argument 328 if (val2 == zopt2201_resolution[i].us) { in zopt2201_write_resolution() 368 int val, int val2) in zopt2201_write_scale_als() argument 374 val2 == zopt2201_scale_als[i].uscale) { in zopt2201_write_scale_als() [all …]
|
D | cm3323.c | 36 int val2; member 116 static int cm3323_set_it_bits(struct cm3323_data *data, int val, int val2) in cm3323_set_it_bits() argument 123 val2 == cm3323_int_time[i].val2) { in cm3323_set_it_bits() 157 int *val2, long mask) in cm3323_read_raw() argument 183 *val2 = cm3323_int_time[ret].val2; in cm3323_read_raw() 194 int val2, long mask) in cm3323_write_raw() argument 202 ret = cm3323_set_it_bits(data, val, val2); in cm3323_write_raw()
|
D | tsl4531.c | 76 int *val, int *val2, long mask) in tsl4531_read_raw() argument 95 *val2 = 400000; in tsl4531_read_raw() 97 *val2 = 200000; in tsl4531_read_raw() 99 *val2 = 100000; in tsl4531_read_raw() 111 int val, int val2, long mask) in tsl4531_write_raw() argument 120 if (val2 == 400000) in tsl4531_write_raw() 122 else if (val2 == 200000) in tsl4531_write_raw() 124 else if (val2 == 100000) in tsl4531_write_raw()
|
D | vl6180.c | 294 int *val, int *val2, long mask) in vl6180_read_raw() argument 309 *val2 = 1000; in vl6180_read_raw() 318 *val2 = data->als_gain_milli * data->als_it_ms; in vl6180_read_raw() 324 *val2 = 1000; in vl6180_read_raw() 333 *val2 = 1000; in vl6180_read_raw() 360 static int vl6180_set_als_gain(struct vl6180_data *data, int val, int val2) in vl6180_set_als_gain() argument 367 gain = (val * 1000000 + val2) / 1000; in vl6180_set_als_gain() 391 static int vl6180_set_it(struct vl6180_data *data, int val, int val2) in vl6180_set_it() argument 395 it_ms = DIV_ROUND_CLOSEST(val2, 1000); /* round to ms */ in vl6180_set_it() 418 int val, int val2, long mask) in vl6180_write_raw() argument [all …]
|
D | max44009.c | 121 int val, int val2) in max44009_write_int_time() argument 127 ns = val * NSEC_PER_SEC + val2; in max44009_write_int_time() 151 int val2, long mask) in max44009_write_raw() argument 158 ret = max44009_write_int_time(data, val, val2); in max44009_write_raw() 248 int *val2, long mask) in max44009_read_raw() argument 264 *val2 = MAX44009_SCALE_DENOMINATOR; in max44009_read_raw() 276 *val2 = ret; in max44009_read_raw() 343 int val, int val2) in max44009_write_event_value() argument 351 threshold = max44009_threshold_byte_from_fraction(val, val2); in max44009_write_event_value() 402 int *val, int *val2) in max44009_read_event_value() argument [all …]
|
D | hid-sensor-als.c | 85 int *val, int *val2, in als_read_raw() argument 95 *val2 = 0; in als_read_raw() 128 *val2 = als_state->scale_post_decml; in als_read_raw() 137 &als_state->common_attributes, val, val2); in als_read_raw() 141 &als_state->common_attributes, val, val2); in als_read_raw() 145 &als_state->common_attributes, val, val2); in als_read_raw() 159 int val2, in als_write_raw() argument 168 &als_state->common_attributes, val, val2); in als_write_raw() 172 &als_state->common_attributes, val, val2); in als_write_raw() 176 &als_state->common_attributes, val, val2); in als_write_raw()
|
D | cm36651.c | 356 struct iio_chan_spec const *chan, int *val2) in cm36651_read_int_time() argument 361 *val2 = 80000; in cm36651_read_int_time() 363 *val2 = 160000; in cm36651_read_int_time() 365 *val2 = 320000; in cm36651_read_int_time() 367 *val2 = 640000; in cm36651_read_int_time() 373 *val2 = 320; in cm36651_read_int_time() 375 *val2 = 420; in cm36651_read_int_time() 377 *val2 = 520; in cm36651_read_int_time() 379 *val2 = 640; in cm36651_read_int_time() 447 int *val, int *val2, long mask) in cm36651_read_raw() argument [all …]
|
/drivers/iio/common/hid-sensors/ |
D | hid-sensor-attributes.c | 93 static void split_micro_fraction(unsigned int no, int exp, int *val1, int *val2) in split_micro_fraction() argument 98 *val2 = no % divisor * int_pow(10, 6 - exp); in split_micro_fraction() 110 int *val1, int *val2) in convert_from_vtf_format() argument 121 *val2 = 0; in convert_from_vtf_format() 123 split_micro_fraction(value, -exp, val1, val2); in convert_from_vtf_format() 127 *val2 = sign * (*val2); in convert_from_vtf_format() 131 static u32 convert_to_vtf_format(int size, int exp, int val1, int val2) in convert_to_vtf_format() argument 137 if (val1 < 0 || val2 < 0) in convert_to_vtf_format() 143 value += abs(val2) / divisor; in convert_to_vtf_format() 175 int *val1, int *val2) in hid_sensor_read_samp_freq_value() argument [all …]
|
/drivers/iio/adc/ |
D | axp20x_adc.c | 280 static int axp20x_adc_scale_voltage(int channel, int *val, int *val2) in axp20x_adc_scale_voltage() argument 286 *val2 = 700000; in axp20x_adc_scale_voltage() 292 *val2 = 500000; in axp20x_adc_scale_voltage() 297 *val2 = 100000; in axp20x_adc_scale_voltage() 302 *val2 = 400000; in axp20x_adc_scale_voltage() 308 *val2 = 800000; in axp20x_adc_scale_voltage() 316 static int axp22x_adc_scale_voltage(int channel, int *val, int *val2) in axp22x_adc_scale_voltage() argument 322 *val2 = 100000; in axp22x_adc_scale_voltage() 328 *val2 = 800000; in axp22x_adc_scale_voltage() 335 static int axp813_adc_scale_voltage(int channel, int *val, int *val2) in axp813_adc_scale_voltage() argument [all …]
|
D | ad9467.c | 197 unsigned int *val, unsigned int *val2) in __ad9467_get_scale() argument 206 *val2 = tmp % 1000000; in __ad9467_get_scale() 272 static int ad9467_get_scale(struct adi_axi_adc_conv *conv, int *val, int *val2) in ad9467_get_scale() argument 294 __ad9467_get_scale(conv, i, val, val2); in ad9467_get_scale() 299 static int ad9467_set_scale(struct adi_axi_adc_conv *conv, int val, int val2) in ad9467_set_scale() argument 312 if (scale_val[0] != val || scale_val[1] != val2) in ad9467_set_scale() 329 int *val, int *val2, long m) in ad9467_read_raw() argument 335 return ad9467_get_scale(conv, val, val2); in ad9467_read_raw() 347 int val, int val2, long mask) in ad9467_write_raw() argument 355 return ad9467_set_scale(conv, val, val2); in ad9467_write_raw() [all …]
|
/drivers/iio/afe/ |
D | iio-rescale.c | 23 int *val, int *val2) in rescale_process_scale() argument 36 *val2 = rescale->denominator; in rescale_process_scale() 45 !check_mul_overflow(*val2, rescale->denominator, &_val2)) { in rescale_process_scale() 47 *val2 = _val2; in rescale_process_scale() 63 tmp = *val2; in rescale_process_scale() 65 tmp = ULL(1) << *val2; in rescale_process_scale() 70 *val2 = rem / (int)tmp; in rescale_process_scale() 72 *val2 += div_s64((s64)rem2 * 1000000000LL, tmp); in rescale_process_scale() 84 neg = *val < 0 || *val2 < 0; in rescale_process_scale() 89 tmp = (s64)rem * mult + (s64)abs(*val2) * abs(rescale->numerator); in rescale_process_scale() [all …]
|
/drivers/iio/proximity/ |
D | isl29501.c | 658 int *val, int *val2) in isl29501_get_scale() argument 667 *val2 = 6553600; in isl29501_get_scale() 673 *val2 = 95874; in isl29501_get_scale() 679 *val2 = 10000; in isl29501_get_scale() 694 *val2 = 0; in isl29501_get_scale() 699 *val2 = isl29501_current_scale_table[current_scale - 1][1]; in isl29501_get_scale() 705 *val2 = 100000; in isl29501_get_scale() 732 int *val, int *val2) in isl29501_get_inttime() argument 745 *val2 = isl29501_int_time[inttime][1]; in isl29501_get_inttime() 751 int *val, int *val2) in isl29501_get_freq() argument [all …]
|
/drivers/iio/imu/inv_icm42600/ |
D | inv_icm42600_gyro.c | 229 int *val, int *val2) in inv_icm42600_gyro_read_scale() argument 236 *val2 = inv_icm42600_gyro_scale[2 * idx + 1]; in inv_icm42600_gyro_read_scale() 241 int val, int val2) in inv_icm42600_gyro_write_scale() argument 250 val2 == inv_icm42600_gyro_scale[idx + 1]) in inv_icm42600_gyro_write_scale() 302 int *val, int *val2) in inv_icm42600_gyro_read_odr() argument 317 *val2 = inv_icm42600_gyro_odr[2 * i + 1]; in inv_icm42600_gyro_read_odr() 323 int val, int val2) in inv_icm42600_gyro_write_odr() argument 334 val2 == inv_icm42600_gyro_odr[idx + 1]) in inv_icm42600_gyro_write_odr() 376 int *val, int *val2) in inv_icm42600_gyro_read_offset() argument 445 *val2 = bias % 1000000000L; in inv_icm42600_gyro_read_offset() [all …]
|
D | inv_icm42600_accel.c | 217 int *val, int *val2) in inv_icm42600_accel_read_scale() argument 224 *val2 = inv_icm42600_accel_scale[2 * idx + 1]; in inv_icm42600_accel_read_scale() 229 int val, int val2) in inv_icm42600_accel_write_scale() argument 238 val2 == inv_icm42600_accel_scale[idx + 1]) in inv_icm42600_accel_write_scale() 290 int *val, int *val2) in inv_icm42600_accel_read_odr() argument 305 *val2 = inv_icm42600_accel_odr[2 * i + 1]; in inv_icm42600_accel_read_odr() 311 int val, int val2) in inv_icm42600_accel_write_odr() argument 322 val2 == inv_icm42600_accel_odr[idx + 1]) in inv_icm42600_accel_write_odr() 364 int *val, int *val2) in inv_icm42600_accel_read_offset() argument 433 *val2 = bias % 1000000L; in inv_icm42600_accel_read_offset() [all …]
|
/drivers/iio/dac/ |
D | dpot-dac.c | 54 int *val, int *val2, long mask) in dpot_dac_read_raw() argument 65 ret = iio_read_channel_scale(dac->dpot, val, val2); in dpot_dac_read_raw() 79 *val2 = 1; in dpot_dac_read_raw() 85 *val2 *= dac->max_ohms; in dpot_dac_read_raw() 113 int val, int val2, long mask) in dpot_dac_write_raw() argument 138 int val2; in dpot_dac_channel_max_ohms() local 147 switch (iio_read_channel_scale(dac->dpot, &val, &val2)) { in dpot_dac_channel_max_ohms() 152 do_div(tmp, val2); in dpot_dac_channel_max_ohms() 155 tmp = val * 1000000000LL * max >> val2; in dpot_dac_channel_max_ohms()
|
/drivers/iio/humidity/ |
D | hdc100x.c | 147 static int hdc100x_set_it_time(struct hdc100x_data *data, int chan, int val2) in hdc100x_set_it_time() argument 154 if (val2 && val2 == hdc100x_int_time[chan][i]) { in hdc100x_set_it_time() 159 data->adc_int_us[chan] = val2; in hdc100x_set_it_time() 201 int *val2, long mask) in hdc100x_read_raw() argument 232 *val2 = data->adc_int_us[chan->address]; in hdc100x_read_raw() 237 *val2 = 65536; in hdc100x_read_raw() 241 *val2 = 65536; in hdc100x_read_raw() 247 *val2 = 515151; in hdc100x_read_raw() 256 int val, int val2, long mask) in hdc100x_write_raw() argument 267 ret = hdc100x_set_it_time(data, chan->address, val2); in hdc100x_write_raw() [all …]
|
/drivers/gpu/drm/i915/display/ |
D | dvo_tfp410.c | 268 u8 val, val2; in tfp410_dump_regs() local 287 tfp410_readb(dvo, TFP410_DE_CNT_HI, &val2); in tfp410_dump_regs() 288 DRM_DEBUG_KMS("TFP410_DE_CNT: 0x%02X%02X\n", val2, val); in tfp410_dump_regs() 290 tfp410_readb(dvo, TFP410_DE_LIN_HI, &val2); in tfp410_dump_regs() 291 DRM_DEBUG_KMS("TFP410_DE_LIN: 0x%02X%02X\n", val2, val); in tfp410_dump_regs() 293 tfp410_readb(dvo, TFP410_H_RES_HI, &val2); in tfp410_dump_regs() 294 DRM_DEBUG_KMS("TFP410_H_RES: 0x%02X%02X\n", val2, val); in tfp410_dump_regs() 296 tfp410_readb(dvo, TFP410_V_RES_HI, &val2); in tfp410_dump_regs() 297 DRM_DEBUG_KMS("TFP410_V_RES: 0x%02X%02X\n", val2, val); in tfp410_dump_regs()
|
/drivers/iio/imu/ |
D | kmx61.c | 165 int val2; member 181 int val2; member 291 static int kmx61_convert_freq_to_bit(int val, int val2) in kmx61_convert_freq_to_bit() argument 297 val2 == kmx61_samp_freq_table[i].val2) in kmx61_convert_freq_to_bit() 302 static int kmx61_convert_wake_up_odr_to_bit(int val, int val2) in kmx61_convert_wake_up_odr_to_bit() argument 308 kmx61_wake_up_odr_table[i].val2 == val2) in kmx61_convert_wake_up_odr_to_bit() 401 static int kmx61_set_wake_up_odr(struct kmx61_data *data, int val, int val2) in kmx61_set_wake_up_odr() argument 405 odr_bits = kmx61_convert_wake_up_odr_to_bit(val, val2); in kmx61_set_wake_up_odr() 416 static int kmx61_set_odr(struct kmx61_data *data, int val, int val2, u8 device) in kmx61_set_odr() argument 426 lodr_bits = kmx61_convert_freq_to_bit(val, val2); in kmx61_set_odr() [all …]
|
D | adis16460.c | 152 static int adis16460_set_freq(struct iio_dev *indio_dev, int val, int val2) in adis16460_set_freq() argument 157 t = val * 1000 + val2 / 1000; in adis16460_set_freq() 171 static int adis16460_get_freq(struct iio_dev *indio_dev, int *val, int *val2) in adis16460_get_freq() argument 184 *val2 = (freq % 1000) * 1000; in adis16460_get_freq() 190 const struct iio_chan_spec *chan, int *val, int *val2, long info) in adis16460_read_raw() argument 201 *val2 = st->chip_info->gyro_max_val; in adis16460_read_raw() 205 *val2 = st->chip_info->accel_max_val; in adis16460_read_raw() 217 return adis16460_get_freq(indio_dev, val, val2); in adis16460_read_raw() 224 const struct iio_chan_spec *chan, int val, int val2, long info) in adis16460_write_raw() argument 228 return adis16460_set_freq(indio_dev, val, val2); in adis16460_write_raw()
|