Home
last modified time | relevance | path

Searched refs:odr (Results 1 – 25 of 31) sorted by relevance

12

/drivers/iio/common/st_sensors/
Dst_sensors_core.c51 unsigned int odr, struct st_sensor_odr_avl *odr_out) in st_sensors_match_odr() argument
56 if (sensor_settings->odr.odr_avl[i].hz == 0) in st_sensors_match_odr()
59 if (sensor_settings->odr.odr_avl[i].hz == odr) { in st_sensors_match_odr()
60 odr_out->hz = sensor_settings->odr.odr_avl[i].hz; in st_sensors_match_odr()
61 odr_out->value = sensor_settings->odr.odr_avl[i].value; in st_sensors_match_odr()
71 int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr) in st_sensors_set_odr() argument
79 if (!sdata->sensor_settings->odr.mask) in st_sensors_set_odr()
82 err = st_sensors_match_odr(sdata->sensor_settings, odr, &odr_out); in st_sensors_set_odr()
86 if ((sdata->sensor_settings->odr.addr == in st_sensors_set_odr()
88 (sdata->sensor_settings->odr.mask == in st_sensors_set_odr()
[all …]
/drivers/iio/imu/inv_icm42600/
Dinv_icm42600_core.c57 .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 …]
Dinv_icm42600_buffer.c45 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 …]
Dinv_icm42600_accel.c292 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()
728 inv_icm42600_timestamp_init(ts, inv_icm42600_odr_to_period(st->conf.accel.odr)); in inv_icm42600_accel_init()
756 unsigned int odr; in inv_icm42600_accel_parse_fifo() local
763 &accel, &gyro, &temp, &timestamp, &odr); in inv_icm42600_accel_parse_fifo()
773 if (odr & INV_ICM42600_SENSOR_ACCEL) in inv_icm42600_accel_parse_fifo()
Dinv_icm42600_gyro.c304 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()
739 inv_icm42600_timestamp_init(ts, inv_icm42600_odr_to_period(st->conf.gyro.odr)); in inv_icm42600_gyro_init()
767 unsigned int odr; in inv_icm42600_gyro_parse_fifo() local
774 &accel, &gyro, &temp, &timestamp, &odr); in inv_icm42600_gyro_parse_fifo()
784 if (odr & INV_ICM42600_SENSOR_GYRO) in inv_icm42600_gyro_parse_fifo()
/drivers/iio/imu/st_lsm6dsx/
Dst_lsm6dsx_shub.c159 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 …]
Dst_lsm6dsx_core.c1419 int st_lsm6dsx_check_odr(struct st_lsm6dsx_sensor *sensor, u32 odr, u8 *val) in st_lsm6dsx_check_odr() argument
1430 if (odr_table->odr_avl[i].milli_hz >= odr) in st_lsm6dsx_check_odr()
1442 st_lsm6dsx_check_odr_dependency(struct st_lsm6dsx_hw *hw, u32 odr, in st_lsm6dsx_check_odr_dependency() argument
1447 if (odr > 0) { in st_lsm6dsx_check_odr_dependency()
1449 return max_t(u32, ref->odr, odr); in st_lsm6dsx_check_odr_dependency()
1451 return odr; in st_lsm6dsx_check_odr_dependency()
1453 return (hw->enable_mask & BIT(id)) ? ref->odr : 0; in st_lsm6dsx_check_odr_dependency()
1474 u32 odr; in st_lsm6dsx_set_odr() local
1488 odr = st_lsm6dsx_check_odr_dependency(hw, req_odr, i); in st_lsm6dsx_set_odr()
1489 if (odr != req_odr) in st_lsm6dsx_set_odr()
[all …]
Dst_lsm6dsx_buffer.c85 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/accel/
Dst_accel_core.c107 .odr = {
189 .odr = {
268 .odr = {
358 .odr = {
430 .odr = {
502 .odr = {
572 .odr = {
630 .odr = {
705 .odr = {
786 .odr = {
[all …]
Dbma400_core.c252 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()
Dadxl372.c292 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/gyro/
Dst_gyro_core.c65 .odr = {
143 .odr = {
217 .odr = {
291 .odr = {
379 *val = gdata->odr; in st_gyro_read_raw()
478 gdata->odr = gdata->sensor_settings->odr.odr_avl[0].hz; in st_gyro_common_probe()
Dfxas21002c_core.c447 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/
Dst_pressure_core.c244 .odr = {
317 .odr = {
369 .odr = {
438 .odr = {
505 .odr = {
627 *val = press_data->odr; in st_press_read_raw()
708 press_data->odr = press_data->sensor_settings->odr.odr_avl[0].hz; in st_press_common_probe()
Dzpa2326.c84 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/
Dst_magn_core.c112 .odr = {
191 .odr = {
270 .odr = {
342 .odr = {
408 *val = mdata->odr; in st_magn_read_raw()
506 mdata->odr = mdata->sensor_settings->odr.odr_avl[0].hz; in st_magn_common_probe()
Dbmc150_magn.c172 u8 odr; member
324 int rep_z, int odr) in bmc150_magn_set_max_odr() argument
342 if (odr <= 0) { in bmc150_magn_set_max_odr()
343 ret = bmc150_magn_get_odr(data, &odr); in bmc150_magn_set_max_odr()
349 if (odr > max_odr) { in bmc150_magn_set_max_odr()
352 odr); in bmc150_magn_set_max_odr()
716 ret = bmc150_magn_set_odr(data, preset.odr); in bmc150_magn_init()
719 preset.odr); in bmc150_magn_init()
740 preset.odr); in bmc150_magn_init()
/drivers/char/ipmi/
Dkcs_bmc_aspeed.c231 { .idr = LPC_IDR1, .odr = LPC_ODR1, .str = LPC_STR1 },
232 { .idr = LPC_IDR2, .odr = LPC_ODR2, .str = LPC_STR2 },
233 { .idr = LPC_IDR3, .odr = LPC_ODR3, .str = LPC_STR3 },
234 { .idr = LPC_IDR4, .odr = LPC_ODR4, .str = LPC_STR4 },
311 ioreg.odr = be32_to_cpup(reg); in aspeed_kcs_probe_of_v2()
383 kcs_bmc->channel, kcs_bmc->ioreg.idr, kcs_bmc->ioreg.odr, in aspeed_kcs_probe()
Dkcs_bmc_npcm7xx.c162 kcs_bmc->ioreg.odr = priv->reg->dob; in npcm7xx_kcs_probe()
182 kcs_bmc->ioreg.idr, kcs_bmc->ioreg.odr, kcs_bmc->ioreg.str); in npcm7xx_kcs_probe()
/drivers/iio/imu/
Dfxos8700_core.c282 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/
Dad7780.c66 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()
Dad7124.c146 unsigned int odr; member
263 unsigned int odr) in ad7124_set_channel_odr() argument
276 odr_sel_bits = DIV_ROUND_CLOSEST(fclk, odr * 32); in ad7124_set_channel_odr()
288 st->channel_config[channel].odr = in ad7124_set_channel_odr()
319 fadc = st->channel_config[channel].odr; in ad7124_get_3db_filter_freq()
405 *val = st->channel_config[chan->address].odr; in ad7124_read_raw()
/drivers/iio/imu/bmi160/
Dbmi160_core.c192 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/
Dhts221_core.c146 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()
Dhts221.h39 u8 odr; member

12