Home
last modified time | relevance | path

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

12

/linux/drivers/iio/common/st_sensors/
A Dst_sensors_core.c60 if (sensor_settings->odr.odr_avl[i].hz == odr) { in st_sensors_match_odr()
78 if (!sdata->sensor_settings->odr.mask) in st_sensors_set_odr()
85 if ((sdata->sensor_settings->odr.addr == in st_sensors_set_odr()
87 (sdata->sensor_settings->odr.mask == in st_sensors_set_odr()
91 sdata->sensor_settings->odr.addr, in st_sensors_set_odr()
92 sdata->sensor_settings->odr.mask, in st_sensors_set_odr()
99 sdata->sensor_settings->odr.addr, in st_sensors_set_odr()
100 sdata->sensor_settings->odr.mask, in st_sensors_set_odr()
104 sdata->odr = odr_out.hz; in st_sensors_set_odr()
172 sdata->odr, &odr_out); in st_sensors_set_enable()
[all …]
/linux/drivers/iio/imu/inv_icm42600/
A Dinv_icm42600_core.c57 .odr = INV_ICM42600_ODR_50HZ,
63 .odr = INV_ICM42600_ODR_50HZ,
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()
228 oldconf->odr = conf->odr; in inv_icm42600_set_accel_conf()
259 if (conf->odr < 0) in inv_icm42600_set_gyro_conf()
260 conf->odr = oldconf->odr; in inv_icm42600_set_gyro_conf()
265 if (conf->fs != oldconf->fs || conf->odr != oldconf->odr) { in inv_icm42600_set_gyro_conf()
[all …]
A 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 …]
A 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()
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, &timestamp, &odr); in inv_icm42600_accel_parse_fifo()
771 if (odr & INV_ICM42600_SENSOR_ACCEL) in inv_icm42600_accel_parse_fifo()
A 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()
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, &timestamp, &odr); in inv_icm42600_gyro_parse_fifo()
783 if (odr & INV_ICM42600_SENSOR_GYRO) in inv_icm42600_gyro_parse_fifo()
/linux/drivers/iio/accel/
A Dadxl355_core.c170 enum adxl355_odr odr; member
223 u64 odr; in adxl355_fill_3db_frequency_table() local
226 odr = mul_u64_u32_shr(adxl355_odr_table[data->odr][0], MEGA, 0) + in adxl355_fill_3db_frequency_table()
227 adxl355_odr_table[data->odr][1]; in adxl355_fill_3db_frequency_table()
231 div = div64_u64_rem(mul_u64_u32_shr(odr, multiplier, 0), in adxl355_fill_3db_frequency_table()
321 enum adxl355_odr odr) in adxl355_set_odr() argument
327 if (data->odr == odr) { in adxl355_set_odr()
338 FIELD_PREP(ADXL355_FILTER_ODR_MSK, odr)); in adxl355_set_odr()
342 data->odr = odr; in adxl355_set_odr()
494 *val = adxl355_odr_table[data->odr][0]; in adxl355_read_raw()
[all …]
A Dst_accel_core.c126 .odr = {
208 .odr = {
287 .odr = {
377 .odr = {
449 .odr = {
521 .odr = {
591 .odr = {
649 .odr = {
724 .odr = {
805 .odr = {
[all …]
A 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()
A 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()
/linux/drivers/iio/imu/st_lsm6dsx/
A 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()
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()
645 err = odr; in st_lsm6dsx_shub_write_raw()
[all …]
A Dst_lsm6dsx_core.c1263 if (odr > 0) { in st_lsm6dsx_check_odr_dependency()
1265 return max_t(u32, ref->odr, odr); in st_lsm6dsx_check_odr_dependency()
1267 return odr; in st_lsm6dsx_check_odr_dependency()
1290 u32 odr; in st_lsm6dsx_set_odr() local
1305 if (odr != req_odr) in st_lsm6dsx_set_odr()
1331 u32 odr = enable ? sensor->odr : 0; in __st_lsm6dsx_sensor_set_enable() local
1334 err = st_lsm6dsx_set_odr(sensor, odr); in __st_lsm6dsx_sensor_set_enable()
1377 delay = 1000000000 / sensor->odr; in st_lsm6dsx_read_oneshot()
1412 *val = sensor->odr / 1000; in st_lsm6dsx_read_raw()
1413 *val2 = (sensor->odr % 1000) * 1000; in st_lsm6dsx_read_raw()
[all …]
/linux/drivers/iio/gyro/
A Dst_gyro_core.c77 .odr = {
155 .odr = {
229 .odr = {
303 .odr = {
396 *val = gdata->odr; in st_gyro_read_raw()
500 gdata->odr = gdata->sensor_settings->odr.odr_avl[0].hz; in st_gyro_common_probe()
A 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()
/linux/drivers/iio/pressure/
A Dst_pressure_core.c238 .odr = {
311 .odr = {
363 .odr = {
432 .odr = {
499 .odr = {
621 *val = press_data->odr; in st_press_read_raw()
703 press_data->odr = press_data->sensor_settings->odr.odr_avl[0].hz; in st_press_common_probe()
A 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()
/linux/drivers/iio/magnetometer/
A Dst_magn_core.c152 .odr = {
231 .odr = {
310 .odr = {
383 .odr = {
431 .odr = {
530 *val = mdata->odr; in st_magn_read_raw()
634 mdata->odr = mdata->sensor_settings->odr.odr_avl[0].hz; in st_magn_common_probe()
A Dbmc150_magn.c174 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()
/linux/drivers/iio/imu/
A Dfxos8700_core.c282 int odr; member
418 int odr, int uodr) in fxos8700_set_odr() argument
442 if (fxos8700_odr[i].odr == odr && fxos8700_odr[i].uodr == uodr) in fxos8700_set_odr()
455 int *odr, int *uodr) in fxos8700_get_odr() argument
473 *odr = fxos8700_odr[i].odr; in fxos8700_get_odr()
/linux/arch/powerpc/platforms/4xx/
A Dgpio.c33 __be32 odr; member
103 clrbits32(&regs->odr, GPIO_MASK(gpio)); in ppc4xx_gpio_dir_in()
136 clrbits32(&regs->odr, GPIO_MASK(gpio)); in ppc4xx_gpio_dir_out()
/linux/drivers/iio/adc/
A 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()
A Dad7124.c153 unsigned int odr; member
259 static void ad7124_set_channel_odr(struct ad7124_state *st, unsigned int channel, unsigned int odr) in ad7124_set_channel_odr() argument
271 odr_sel_bits = DIV_ROUND_CLOSEST(fclk, odr * 32); in ad7124_set_channel_odr()
281 st->channels[channel].cfg.odr = DIV_ROUND_CLOSEST(fclk, odr_sel_bits * 32); in ad7124_set_channel_odr()
290 fadc = st->channels[channel].cfg.odr; in ad7124_get_3db_filter_freq()
321 if (new_odr != st->channels[channel].cfg.odr) in ad7124_set_3db_filter_freq()
325 st->channels[channel].cfg.odr = new_odr; in ad7124_set_3db_filter_freq()
569 *val = st->channels[chan->address].cfg.odr; in ad7124_read_raw()
/linux/drivers/iio/imu/bmi160/
A 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()
/linux/include/linux/iio/common/
A Dst_sensors.h209 struct st_sensor_odr odr; member
252 unsigned int odr; member
298 int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr);
/linux/arch/powerpc/sysdev/
A Dcpm2.c325 u32 dir, par, sor, odr, dat; member
352 setbits32(&iop[port].odr, pin); in cpm2_set_pin()
354 clrbits32(&iop[port].odr, pin); in cpm2_set_pin()
/linux/drivers/iio/humidity/
A 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()

Completed in 95 milliseconds

12