| /linux/drivers/iio/common/st_sensors/ |
| H A 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 …]
|
| /linux/drivers/iio/imu/inv_icm45600/ |
| H A D | inv_icm45600_core.c | 144 .odr = INV_ICM45600_ODR_800HZ_LN, 150 .odr = INV_ICM45600_ODR_800HZ_LN, 159 .odr = INV_ICM45600_ODR_800HZ_LN, 165 .odr = INV_ICM45600_ODR_800HZ_LN, 267 u32 inv_icm45600_odr_to_period(enum inv_icm45600_odr odr) in inv_icm45600_odr_to_period() argument 286 return odr_periods[odr]; in inv_icm45600_odr_to_period() 342 if (conf->odr == U8_MAX) in inv_icm45600_set_default_conf() 343 conf->odr = oldconf->odr; in inv_icm45600_set_default_conf() 360 if (conf->odr <= INV_ICM45600_ODR_800HZ_LN) { in inv_icm45600_set_accel_conf() 366 if (conf->odr == INV_ICM45600_ODR_400HZ) in inv_icm45600_set_accel_conf() [all …]
|
| H A D | inv_icm45600_gyro.c | 322 unsigned int odr; in inv_icm45600_gyro_read_odr() local 325 odr = st->conf.gyro.odr; in inv_icm45600_gyro_read_odr() 328 if (inv_icm45600_gyro_odr_conv[i] == odr) in inv_icm45600_gyro_read_odr() 340 static int _inv_icm45600_gyro_write_odr(struct iio_dev *indio_dev, int odr) in _inv_icm45600_gyro_write_odr() argument 348 conf.odr = odr; in _inv_icm45600_gyro_write_odr() 349 ret = inv_sensors_timestamp_update_odr(ts, inv_icm45600_odr_to_period(conf.odr), in _inv_icm45600_gyro_write_odr() 373 int odr; in inv_icm45600_gyro_write_odr() local 384 odr = inv_icm45600_gyro_odr_conv[idx / 2]; in inv_icm45600_gyro_write_odr() 391 ret = _inv_icm45600_gyro_write_odr(indio_dev, odr); in inv_icm45600_gyro_write_odr() 727 ts_chip.init_period = inv_icm45600_odr_to_period(st->conf.gyro.odr); in inv_icm45600_gyro_init() [all …]
|
| H A D | inv_icm45600_accel.c | 309 unsigned int odr; in inv_icm45600_accel_read_odr() local 312 odr = st->conf.accel.odr; in inv_icm45600_accel_read_odr() 315 if (inv_icm45600_accel_odr_conv[i] == odr) in inv_icm45600_accel_read_odr() 327 static int _inv_icm45600_accel_write_odr(struct iio_dev *indio_dev, int odr) in _inv_icm45600_accel_write_odr() argument 335 conf.odr = odr; in _inv_icm45600_accel_write_odr() 336 ret = inv_sensors_timestamp_update_odr(ts, inv_icm45600_odr_to_period(conf.odr), in _inv_icm45600_accel_write_odr() 360 int odr; in inv_icm45600_accel_write_odr() local 371 odr = inv_icm45600_accel_odr_conv[idx / 2]; in inv_icm45600_accel_write_odr() 378 ret = _inv_icm45600_accel_write_odr(indio_dev, odr); in inv_icm45600_accel_write_odr() 719 ts_chip.init_period = inv_icm45600_odr_to_period(st->conf.accel.odr); in inv_icm45600_accel_init() [all …]
|
| H A D | inv_icm45600_buffer.c | 51 const __le16 **timestamp, unsigned int *odr) in inv_icm45600_fifo_decode_packet() argument 64 *odr = 0; in inv_icm45600_fifo_decode_packet() 66 *odr |= INV_ICM45600_SENSOR_GYRO; in inv_icm45600_fifo_decode_packet() 68 *odr |= INV_ICM45600_SENSOR_ACCEL; in inv_icm45600_fifo_decode_packet() 107 period_gyro = inv_icm45600_odr_to_period(st->conf.gyro.odr); in inv_icm45600_buffer_update_fifo_period() 112 period_accel = inv_icm45600_odr_to_period(st->conf.accel.odr); in inv_icm45600_buffer_update_fifo_period() 190 period_gyro = inv_icm45600_odr_to_period(st->conf.gyro.odr) / NSEC_PER_USEC; in inv_icm45600_buffer_update_watermark() 191 period_accel = inv_icm45600_odr_to_period(st->conf.accel.odr) / NSEC_PER_USEC; in inv_icm45600_buffer_update_watermark() 403 unsigned int odr; in inv_icm45600_buffer_fifo_read() local 441 &temp, ×tamp, &odr); in inv_icm45600_buffer_fifo_read()
|
| /linux/drivers/iio/imu/st_lsm6dsx/ |
| H A 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() 403 u32 odr, u16 *val) in st_lsm6dsx_shub_get_odr_val() argument 410 if (settings->odr_table.odr_avl[i].milli_hz == odr) in st_lsm6dsx_shub_get_odr_val() 422 st_lsm6dsx_shub_set_odr(struct st_lsm6dsx_sensor *sensor, u32 odr) in st_lsm6dsx_shub_set_odr() argument 428 err = st_lsm6dsx_shub_get_odr_val(sensor, odr, &val); in st_lsm6dsx_shub_set_odr() 629 int odr; in __st_lsm6dsx_shub_write_raw() local 637 odr = st_lsm6dsx_check_odr(ref_sensor, val, &odr_val); in __st_lsm6dsx_shub_write_raw() 638 if (odr < 0) in __st_lsm6dsx_shub_write_raw() [all …]
|
| H A D | st_lsm6dsx_core.c | 1708 int st_lsm6dsx_check_odr(struct st_lsm6dsx_sensor *sensor, u32 odr, u8 *val) in st_lsm6dsx_check_odr() argument 1719 if (odr_table->odr_avl[i].milli_hz >= odr) in st_lsm6dsx_check_odr() 1731 st_lsm6dsx_check_odr_dependency(struct st_lsm6dsx_hw *hw, u32 odr, in st_lsm6dsx_check_odr_dependency() argument 1736 if (odr > 0) { in st_lsm6dsx_check_odr_dependency() 1738 return max_t(u32, ref->odr, odr); in st_lsm6dsx_check_odr_dependency() 1740 return odr; in st_lsm6dsx_check_odr_dependency() 1742 return (hw->enable_mask & BIT(id)) ? ref->odr : 0; in st_lsm6dsx_check_odr_dependency() 1763 u32 odr; in st_lsm6dsx_set_odr() local 1777 odr = st_lsm6dsx_check_odr_dependency(hw, req_odr, i); in st_lsm6dsx_set_odr() 1778 if (odr != req_odr) in st_lsm6dsx_set_odr() [all …]
|
| /linux/drivers/iio/accel/ |
| H A D | st_accel_core.c | 126 .odr = { 208 .odr = { 287 .odr = { 377 .odr = { 450 .odr = { 522 .odr = { 593 .odr = { 663 .odr = { 721 .odr = { 796 .odr = { [all …]
|
| H A D | adxl367.c | 169 enum adxl367_odr odr; member 520 int freq_hz = adxl367_samp_freq_tbl[st->odr][0]; in adxl367_time_ms_to_samples() 521 int freq_microhz = adxl367_samp_freq_tbl[st->odr][1]; in adxl367_time_ms_to_samples() 593 static int _adxl367_set_odr(struct adxl367_state *st, enum adxl367_odr odr) in _adxl367_set_odr() argument 600 odr)); in _adxl367_set_odr() 604 st->odr = odr; in _adxl367_set_odr() 614 static int adxl367_set_odr(struct iio_dev *indio_dev, enum adxl367_odr odr) in adxl367_set_odr() argument 625 ret = _adxl367_set_odr(st, odr); in adxl367_set_odr() 677 enum adxl367_odr *odr) in adxl367_find_odr() argument 690 *odr = i; in adxl367_find_odr() [all …]
|
| H A D | adxl380.c | 209 u8 odr; member 272 st->odr = ADXL380_ODR_VLP; in adxl380_set_measure_en() 274 if (st->odr == ADXL380_ODR_VLP) in adxl380_set_measure_en() 439 static int adxl380_get_odr(struct adxl380_state *st, int *odr) in adxl380_get_odr() argument 441 *odr = st->chip_info->samp_freq_tbl[st->odr]; in adxl380_get_odr() 453 int odr; in adxl380_fill_lpf_tbl() local 455 ret = adxl380_get_odr(st, &odr); in adxl380_fill_lpf_tbl() 460 st->lpf_tbl[i] = DIV_ROUND_CLOSEST(odr, adxl380_lpf_div[i]); in adxl380_fill_lpf_tbl() 473 u64 div, rem, odr; in adxl380_fill_hpf_tbl() local 480 odr = mul_u64_u32_shr(odr_hz, MEGA, 0); in adxl380_fill_hpf_tbl() [all …]
|
| H A D | bma400_core.c | 523 unsigned int odr; in bma400_get_accel_output_data_rate() local 545 odr = val & BMA400_ACC_CONFIG1_ODR_MASK; in bma400_get_accel_output_data_rate() 546 if (odr < BMA400_ACC_CONFIG1_ODR_MIN_RAW || in bma400_get_accel_output_data_rate() 547 odr > BMA400_ACC_CONFIG1_ODR_MAX_RAW) { in bma400_get_accel_output_data_rate() 552 bma400_output_data_rate_from_raw(odr, &data->sample_freq.hz, in bma400_get_accel_output_data_rate() 573 unsigned int odr; in bma400_set_accel_output_data_rate() local 599 odr = (~BMA400_ACC_CONFIG1_ODR_MASK & val) | idx; in bma400_set_accel_output_data_rate() 601 ret = regmap_write(data->regmap, BMA400_ACC_CONFIG1_REG, odr); in bma400_set_accel_output_data_rate()
|
| /linux/drivers/iio/imu/inv_icm42600/ |
| H A D | inv_icm42600_buffer.c | 47 const void **timestamp, unsigned int *odr) in inv_icm42600_fifo_decode_packet() argument 59 *odr = 0; in inv_icm42600_fifo_decode_packet() 64 *odr = 0; in inv_icm42600_fifo_decode_packet() 66 *odr |= INV_ICM42600_SENSOR_GYRO; in inv_icm42600_fifo_decode_packet() 68 *odr |= INV_ICM42600_SENSOR_ACCEL; in inv_icm42600_fifo_decode_packet() 107 period_gyro = inv_icm42600_odr_to_period(st->conf.gyro.odr); in inv_icm42600_buffer_update_fifo_period() 112 period_accel = inv_icm42600_odr_to_period(st->conf.accel.odr); in inv_icm42600_buffer_update_fifo_period() 215 period_gyro = inv_icm42600_odr_to_period(st->conf.gyro.odr) / 1000UL; in inv_icm42600_buffer_update_watermark() 216 period_accel = inv_icm42600_odr_to_period(st->conf.accel.odr) / 1000UL; in inv_icm42600_buffer_update_watermark() 448 unsigned int odr; in inv_icm42600_buffer_fifo_read() local [all …]
|
| H A D | inv_icm42600_gyro.c | 323 unsigned int odr; in inv_icm42600_gyro_read_odr() local 326 odr = st->conf.gyro.odr; in inv_icm42600_gyro_read_odr() 329 if (inv_icm42600_gyro_odr_conv[i] == odr) in inv_icm42600_gyro_read_odr() 360 conf.odr = inv_icm42600_gyro_odr_conv[idx / 2]; in inv_icm42600_gyro_write_odr() 361 if (conf.odr == st->conf.gyro.odr) in inv_icm42600_gyro_write_odr() 367 ret = inv_sensors_timestamp_update_odr(ts, inv_icm42600_odr_to_period(conf.odr), in inv_icm42600_gyro_write_odr() 763 ts_chip.init_period = inv_icm42600_odr_to_period(st->conf.accel.odr); in inv_icm42600_gyro_init() 796 unsigned int odr; in inv_icm42600_gyro_parse_fifo() local 804 &accel, &gyro, &temp, ×tamp, &odr); in inv_icm42600_gyro_parse_fifo() 814 if (odr & INV_ICM42600_SENSOR_GYRO) in inv_icm42600_gyro_parse_fifo()
|
| H A D | inv_icm42600_accel.c | 110 if (st->conf.accel.odr >= INV_ICM42600_ODR_6_25HZ_LP && in inv_icm42600_accel_power_mode_set() 111 st->conf.accel.odr <= INV_ICM42600_ODR_1_5625HZ_LP) in inv_icm42600_accel_power_mode_set() 116 if (st->conf.accel.odr <= INV_ICM42600_ODR_1KHZ_LN) in inv_icm42600_accel_power_mode_set() 616 unsigned int odr; in inv_icm42600_accel_read_odr() local 619 odr = st->conf.accel.odr; in inv_icm42600_accel_read_odr() 622 if (inv_icm42600_accel_odr_conv[i] == odr) in inv_icm42600_accel_read_odr() 653 conf.odr = inv_icm42600_accel_odr_conv[idx / 2]; in inv_icm42600_accel_write_odr() 654 if (conf.odr == st->conf.accel.odr) in inv_icm42600_accel_write_odr() 660 ret = inv_sensors_timestamp_update_odr(ts, inv_icm42600_odr_to_period(conf.odr), in inv_icm42600_accel_write_odr() 1178 ts_chip.init_period = inv_icm42600_odr_to_period(st->conf.accel.odr); in inv_icm42600_accel_init() [all …]
|
| /linux/drivers/iio/pressure/ |
| H A D | st_pressure_core.c | 238 .odr = { 311 .odr = { 363 .odr = { 432 .odr = { 499 .odr = { 568 .odr = { 687 *val = press_data->odr; in st_press_read_raw() 769 press_data->odr = press_data->sensor_settings->odr.odr_avl[0].hz; in st_press_common_probe()
|
| /linux/drivers/iio/gyro/ |
| H A D | st_gyro_core.c | 77 .odr = { 155 .odr = { 229 .odr = { 303 .odr = { 396 *val = gdata->odr; in st_gyro_read_raw() 493 gdata->odr = gdata->sensor_settings->odr.odr_avl[0].hz; in st_gyro_common_probe()
|
| /linux/drivers/iio/magnetometer/ |
| H A D | st_magn_core.c | 152 .odr = { 231 .odr = { 311 .odr = { 384 .odr = { 433 .odr = { 532 *val = mdata->odr; in st_magn_read_raw() 629 mdata->odr = mdata->sensor_settings->odr.odr_avl[0].hz; in st_magn_common_probe()
|
| /linux/drivers/iio/adc/ |
| H A 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()
|
| /linux/arch/powerpc/platforms/44x/ |
| H A D | gpio.c | 33 __be32 odr; member 104 clrbits32(®s->odr, GPIO_MASK(gpio)); in ppc4xx_gpio_dir_in() 136 clrbits32(®s->odr, GPIO_MASK(gpio)); in ppc4xx_gpio_dir_out()
|
| /linux/drivers/iio/imu/bmi160/ |
| H A D | bmi160_core.c | 197 int odr; member 388 int odr, int uodr) in bmi160_set_odr() argument 393 if (bmi160_odr_table[t].tbl[i].odr == odr && in bmi160_set_odr() 407 int *odr, int *uodr) in bmi160_get_odr() argument 424 *odr = bmi160_odr_table[t].tbl[i].odr; in bmi160_get_odr()
|
| /linux/include/linux/iio/common/ |
| H A D | st_sensors.h | 210 struct st_sensor_odr odr; member 250 unsigned int odr; member 298 int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr);
|
| /linux/arch/powerpc/sysdev/ |
| H A D | cpm2.c | 314 u32 dir, par, sor, odr, dat; member 341 setbits32(&iop[port].odr, pin); in cpm2_set_pin() 343 clrbits32(&iop[port].odr, pin); in cpm2_set_pin()
|
| /linux/drivers/char/ipmi/ |
| H A D | kcs_bmc_aspeed.c | 491 { .idr = LPC_IDR1, .odr = LPC_ODR1, .str = LPC_STR1 }, 492 { .idr = LPC_IDR2, .odr = LPC_ODR2, .str = LPC_STR2 }, 493 { .idr = LPC_IDR3, .odr = LPC_ODR3, .str = LPC_STR3 }, 494 { .idr = LPC_IDR4, .odr = LPC_ODR4, .str = LPC_STR4 }, 515 ioreg.odr = be32_to_cpup(reg); in aspeed_kcs_of_get_channel()
|
| H A D | kcs_bmc.h | 25 u32 odr; member
|
| /linux/drivers/iio/humidity/ |
| H A D | hts221_core.c | 147 static int hts221_update_odr(struct hts221_hw *hw, u8 odr) in hts221_update_odr() argument 152 if (hts221_odr_table[i].hz == odr) in hts221_update_odr() 165 hw->odr = odr; in hts221_update_odr() 435 *val = hw->odr; in __hts221_read_raw()
|