/drivers/iio/common/st_sensors/ |
D | st_sensors_core.c | 52 unsigned int odr, struct st_sensor_odr_avl *odr_out) in st_sensors_match_odr() argument 57 if (sensor_settings->odr.odr_avl[i].hz == 0) in st_sensors_match_odr() 60 if (sensor_settings->odr.odr_avl[i].hz == odr) { in st_sensors_match_odr() 61 odr_out->hz = sensor_settings->odr.odr_avl[i].hz; in st_sensors_match_odr() 62 odr_out->value = sensor_settings->odr.odr_avl[i].value; in st_sensors_match_odr() 72 int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr) in st_sensors_set_odr() argument 80 if (!sdata->sensor_settings->odr.mask) in st_sensors_set_odr() 83 err = st_sensors_match_odr(sdata->sensor_settings, odr, &odr_out); in st_sensors_set_odr() 87 if ((sdata->sensor_settings->odr.addr == in st_sensors_set_odr() 89 (sdata->sensor_settings->odr.mask == in st_sensors_set_odr() [all …]
|
/drivers/iio/imu/inv_icm42600/ |
D | inv_icm42600_core.c | 57 .odr = INV_ICM42600_ODR_50HZ, 63 .odr = INV_ICM42600_ODR_50HZ, 101 uint32_t inv_icm42600_odr_to_period(enum inv_icm42600_odr odr) in inv_icm42600_odr_to_period() argument 134 return odr_periods[odr]; in inv_icm42600_odr_to_period() 215 if (conf->odr < 0) in inv_icm42600_set_accel_conf() 216 conf->odr = oldconf->odr; in inv_icm42600_set_accel_conf() 221 if (conf->fs != oldconf->fs || conf->odr != oldconf->odr) { in inv_icm42600_set_accel_conf() 223 INV_ICM42600_ACCEL_CONFIG0_ODR(conf->odr); in inv_icm42600_set_accel_conf() 228 oldconf->odr = conf->odr; in inv_icm42600_set_accel_conf() 259 if (conf->odr < 0) in inv_icm42600_set_gyro_conf() [all …]
|
D | inv_icm42600_buffer.c | 45 const void **timestamp, unsigned int *odr) in inv_icm42600_fifo_decode_packet() argument 57 *odr = 0; in inv_icm42600_fifo_decode_packet() 62 *odr = 0; in inv_icm42600_fifo_decode_packet() 64 *odr |= INV_ICM42600_SENSOR_GYRO; in inv_icm42600_fifo_decode_packet() 66 *odr |= INV_ICM42600_SENSOR_ACCEL; in inv_icm42600_fifo_decode_packet() 105 period_gyro = inv_icm42600_odr_to_period(st->conf.gyro.odr); in inv_icm42600_buffer_update_fifo_period() 110 period_accel = inv_icm42600_odr_to_period(st->conf.accel.odr); in inv_icm42600_buffer_update_fifo_period() 218 period_gyro = inv_icm42600_odr_to_period(st->conf.gyro.odr) / 1000UL; in inv_icm42600_buffer_update_watermark() 219 period_accel = inv_icm42600_odr_to_period(st->conf.accel.odr) / 1000UL; in inv_icm42600_buffer_update_watermark() 454 unsigned int odr; in inv_icm42600_buffer_fifo_read() local [all …]
|
D | inv_icm42600_accel.c | 292 unsigned int odr; in inv_icm42600_accel_read_odr() local 295 odr = st->conf.accel.odr; in inv_icm42600_accel_read_odr() 298 if (inv_icm42600_accel_odr_conv[i] == odr) in inv_icm42600_accel_read_odr() 328 conf.odr = inv_icm42600_accel_odr_conv[idx / 2]; in inv_icm42600_accel_write_odr() 333 ret = inv_icm42600_timestamp_update_odr(ts, inv_icm42600_odr_to_period(conf.odr), in inv_icm42600_accel_write_odr() 723 inv_icm42600_timestamp_init(ts, inv_icm42600_odr_to_period(st->conf.accel.odr)); in inv_icm42600_accel_init() 754 unsigned int odr; in inv_icm42600_accel_parse_fifo() local 761 &accel, &gyro, &temp, ×tamp, &odr); in inv_icm42600_accel_parse_fifo() 771 if (odr & INV_ICM42600_SENSOR_ACCEL) in inv_icm42600_accel_parse_fifo()
|
D | inv_icm42600_gyro.c | 304 unsigned int odr; in inv_icm42600_gyro_read_odr() local 307 odr = st->conf.gyro.odr; in inv_icm42600_gyro_read_odr() 310 if (inv_icm42600_gyro_odr_conv[i] == odr) in inv_icm42600_gyro_read_odr() 340 conf.odr = inv_icm42600_gyro_odr_conv[idx / 2]; in inv_icm42600_gyro_write_odr() 345 ret = inv_icm42600_timestamp_update_odr(ts, inv_icm42600_odr_to_period(conf.odr), in inv_icm42600_gyro_write_odr() 734 inv_icm42600_timestamp_init(ts, inv_icm42600_odr_to_period(st->conf.gyro.odr)); in inv_icm42600_gyro_init() 766 unsigned int odr; in inv_icm42600_gyro_parse_fifo() local 773 &accel, &gyro, &temp, ×tamp, &odr); in inv_icm42600_gyro_parse_fifo() 783 if (odr & INV_ICM42600_SENSOR_GYRO) in inv_icm42600_gyro_parse_fifo()
|
/drivers/iio/accel/ |
D | st_accel_core.c | 126 .odr = { 208 .odr = { 287 .odr = { 377 .odr = { 449 .odr = { 521 .odr = { 591 .odr = { 649 .odr = { 724 .odr = { 805 .odr = { [all …]
|
D | bma400_core.c | 252 unsigned int odr; in bma400_get_accel_output_data_rate() local 274 odr = val & BMA400_ACC_ODR_MASK; in bma400_get_accel_output_data_rate() 275 if (odr < BMA400_ACC_ODR_MIN_RAW || in bma400_get_accel_output_data_rate() 276 odr > BMA400_ACC_ODR_MAX_RAW) { in bma400_get_accel_output_data_rate() 281 bma400_output_data_rate_from_raw(odr, &data->sample_freq.hz, in bma400_get_accel_output_data_rate() 302 unsigned int odr; in bma400_set_accel_output_data_rate() local 328 odr = (~BMA400_ACC_ODR_MASK & val) | idx; in bma400_set_accel_output_data_rate() 330 ret = regmap_write(data->regmap, BMA400_ACC_CONFIG1_REG, odr); in bma400_set_accel_output_data_rate()
|
D | adxl372.c | 292 enum adxl372_odr odr; member 383 enum adxl372_odr odr) in adxl372_set_odr() argument 389 ADXL372_TIMING_ODR_MODE(odr)); in adxl372_set_odr() 393 st->odr = odr; in adxl372_set_odr() 478 if (st->odr == ADXL372_ODR_6400HZ) in adxl372_set_activity_time_ms() 508 if (st->odr == ADXL372_ODR_6400HZ) in adxl372_set_inactivity_time_ms() 783 *val = adxl372_samp_freq_tbl[st->odr]; in adxl372_read_raw() 972 for (i = 0; i <= st->odr; i++) in adxl372_show_filter_freq_avail()
|
/drivers/iio/imu/st_lsm6dsx/ |
D | st_lsm6dsx_shub.c | 159 u32 odr, timeout; in st_lsm6dsx_shub_wait_complete() local 162 odr = (hw->enable_mask & BIT(ST_LSM6DSX_ID_ACC)) ? sensor->odr : 12500; in st_lsm6dsx_shub_wait_complete() 164 timeout = max_t(u32, 2000000U / odr + 1, 10); in st_lsm6dsx_shub_wait_complete() 405 u32 odr, u16 *val) in st_lsm6dsx_shub_get_odr_val() argument 412 if (settings->odr_table.odr_avl[i].milli_hz == odr) in st_lsm6dsx_shub_get_odr_val() 424 st_lsm6dsx_shub_set_odr(struct st_lsm6dsx_sensor *sensor, u32 odr) in st_lsm6dsx_shub_set_odr() argument 430 err = st_lsm6dsx_shub_get_odr_val(sensor, odr, &val); in st_lsm6dsx_shub_set_odr() 640 int odr; in st_lsm6dsx_shub_write_raw() local 643 odr = st_lsm6dsx_check_odr(ref_sensor, val, &odr_val); in st_lsm6dsx_shub_write_raw() 644 if (odr < 0) { in st_lsm6dsx_shub_write_raw() [all …]
|
D | st_lsm6dsx_core.c | 1233 int st_lsm6dsx_check_odr(struct st_lsm6dsx_sensor *sensor, u32 odr, u8 *val) in st_lsm6dsx_check_odr() argument 1244 if (odr_table->odr_avl[i].milli_hz >= odr) in st_lsm6dsx_check_odr() 1256 st_lsm6dsx_check_odr_dependency(struct st_lsm6dsx_hw *hw, u32 odr, in st_lsm6dsx_check_odr_dependency() argument 1261 if (odr > 0) { in st_lsm6dsx_check_odr_dependency() 1263 return max_t(u32, ref->odr, odr); in st_lsm6dsx_check_odr_dependency() 1265 return odr; in st_lsm6dsx_check_odr_dependency() 1267 return (hw->enable_mask & BIT(id)) ? ref->odr : 0; in st_lsm6dsx_check_odr_dependency() 1288 u32 odr; in st_lsm6dsx_set_odr() local 1302 odr = st_lsm6dsx_check_odr_dependency(hw, req_odr, i); in st_lsm6dsx_set_odr() 1303 if (odr != req_odr) in st_lsm6dsx_set_odr() [all …]
|
D | st_lsm6dsx_buffer.c | 85 u32 decimator = max_odr / sensor->odr; in st_lsm6dsx_get_decimator_val() 116 *max_odr = max_t(u32, *max_odr, sensor->odr); in st_lsm6dsx_get_max_min_odr() 117 *min_odr = min_t(u32, *min_odr, sensor->odr); in st_lsm6dsx_get_max_min_odr() 123 u8 sip = sensor->odr / min_odr; in st_lsm6dsx_get_sip() 211 err = st_lsm6dsx_check_odr(sensor, sensor->odr, in st_lsm6dsx_set_fifo_odr()
|
/drivers/iio/gyro/ |
D | st_gyro_core.c | 77 .odr = { 155 .odr = { 229 .odr = { 303 .odr = { 396 *val = gdata->odr; in st_gyro_read_raw() 499 gdata->odr = gdata->sensor_settings->odr.odr_avl[0].hz; in st_gyro_common_probe()
|
D | fxas21002c_core.c | 447 static int fxas21002c_odr_get(struct fxas21002c_data *data, int *odr) in fxas21002c_odr_get() argument 457 *odr = fxas21002c_odr_hz_from_value(data, odr_bits); in fxas21002c_odr_get() 467 static int fxas21002c_odr_set(struct fxas21002c_data *data, int odr) in fxas21002c_odr_set() argument 471 odr_bits = fxas21002c_odr_value_from_hz(data, odr); in fxas21002c_odr_set() 501 int odr; in fxas21002c_lpf_set() local 512 ret = fxas21002c_odr_get(data, &odr); in fxas21002c_lpf_set() 516 if ((odr == 25 && bw_bits > 0x01) || (odr == 12 && bw_bits > 0)) in fxas21002c_lpf_set()
|
/drivers/iio/pressure/ |
D | st_pressure_core.c | 238 .odr = { 311 .odr = { 363 .odr = { 432 .odr = { 499 .odr = { 621 *val = press_data->odr; in st_press_read_raw() 702 press_data->odr = press_data->sensor_settings->odr.odr_avl[0].hz; in st_press_common_probe()
|
D | zpa2326.c | 84 u16 odr; member 92 { .hz = 1, .odr = 1 << ZPA2326_CTRL_REG3_ODR_SHIFT }, 93 { .hz = 5, .odr = 5 << ZPA2326_CTRL_REG3_ODR_SHIFT }, 94 { .hz = 11, .odr = 6 << ZPA2326_CTRL_REG3_ODR_SHIFT }, 95 { .hz = 23, .odr = 7 << ZPA2326_CTRL_REG3_ODR_SHIFT }, 411 err = regmap_write(regs, ZPA2326_CTRL_REG3_REG, freq->odr); in zpa2326_config_oneshot() 1330 zpa2326_highest_frequency()->odr); in zpa2326_set_trigger_state() 1369 priv->frequency->odr); in zpa2326_set_trigger_state()
|
/drivers/iio/magnetometer/ |
D | st_magn_core.c | 152 .odr = { 231 .odr = { 310 .odr = { 383 .odr = { 431 .odr = { 530 *val = mdata->odr; in st_magn_read_raw() 633 mdata->odr = mdata->sensor_settings->odr.odr_avl[0].hz; in st_magn_common_probe()
|
D | bmc150_magn.c | 174 u8 odr; member 326 int rep_z, int odr) in bmc150_magn_set_max_odr() argument 344 if (odr <= 0) { in bmc150_magn_set_max_odr() 345 ret = bmc150_magn_get_odr(data, &odr); in bmc150_magn_set_max_odr() 351 if (odr > max_odr) { in bmc150_magn_set_max_odr() 354 odr); in bmc150_magn_set_max_odr() 730 ret = bmc150_magn_set_odr(data, preset.odr); in bmc150_magn_init() 733 preset.odr); in bmc150_magn_init() 754 preset.odr); in bmc150_magn_init()
|
/drivers/iio/imu/ |
D | fxos8700_core.c | 282 int odr; member 481 int odr, int uodr) in fxos8700_set_odr() argument 505 if (fxos8700_odr[i].odr == odr && fxos8700_odr[i].uodr == uodr) in fxos8700_set_odr() 517 int *odr, int *uodr) in fxos8700_get_odr() argument 535 *odr = fxos8700_odr[i].odr; in fxos8700_get_odr()
|
/drivers/iio/adc/ |
D | ad7780.c | 66 unsigned int odr; member 130 *val = st->odr; in ad7780_read_raw() 174 st->odr = ad778x_odr_avail[val]; in ad7780_write_raw() 196 st->odr = ad778x_odr_avail[raw_sample & AD7780_FILTER]; in ad7780_postprocess_sample()
|
D | ad7124.c | 153 unsigned int odr; member 258 static void ad7124_set_channel_odr(struct ad7124_state *st, unsigned int channel, unsigned int odr) in ad7124_set_channel_odr() argument 270 odr_sel_bits = DIV_ROUND_CLOSEST(fclk, odr * 32); in ad7124_set_channel_odr() 280 st->channels[channel].cfg.odr = DIV_ROUND_CLOSEST(fclk, odr_sel_bits * 32); in ad7124_set_channel_odr() 289 fadc = st->channels[channel].cfg.odr; in ad7124_get_3db_filter_freq() 320 if (new_odr != st->channels[channel].cfg.odr) in ad7124_set_3db_filter_freq() 324 st->channels[channel].cfg.odr = new_odr; in ad7124_set_3db_filter_freq() 568 *val = st->channels[chan->address].cfg.odr; in ad7124_read_raw()
|
/drivers/iio/imu/bmi160/ |
D | bmi160_core.c | 192 int odr; member 383 int odr, int uodr) in bmi160_set_odr() argument 388 if (bmi160_odr_table[t].tbl[i].odr == odr && in bmi160_set_odr() 402 int *odr, int *uodr) in bmi160_get_odr() argument 419 *odr = bmi160_odr_table[t].tbl[i].odr; in bmi160_get_odr()
|
/drivers/iio/humidity/ |
D | hts221_core.c | 146 static int hts221_update_odr(struct hts221_hw *hw, u8 odr) in hts221_update_odr() argument 151 if (hts221_odr_table[i].hz == odr) in hts221_update_odr() 164 hw->odr = odr; in hts221_update_odr() 442 *val = hw->odr; in hts221_read_raw()
|
D | hts221.h | 41 u8 odr; member
|
/drivers/char/ipmi/ |
D | kcs_bmc_aspeed.c | 490 { .idr = LPC_IDR1, .odr = LPC_ODR1, .str = LPC_STR1 }, 491 { .idr = LPC_IDR2, .odr = LPC_ODR2, .str = LPC_STR2 }, 492 { .idr = LPC_IDR3, .odr = LPC_ODR3, .str = LPC_STR3 }, 493 { .idr = LPC_IDR4, .odr = LPC_ODR4, .str = LPC_STR4 }, 545 ioreg.odr = be32_to_cpup(reg); in aspeed_kcs_of_v2_get_channel()
|
D | kcs_bmc.h | 25 u32 odr; member
|