Lines Matching +full:sensor +full:- +full:gain

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * STMicroelectronics st_lsm6dsx sensor driver
27 #define ST_LSM6DS3TRC_DEV_NAME "lsm6ds3tr-c"
29 #define ST_LSM9DS1_DEV_NAME "lsm9ds1-imu"
152 u32 gain; member
165 * struct st_lsm6dsx_fifo_ops - ST IMU FIFO settings
170 * @max_size: Sensor max fifo length in FIFO words.
174 int (*update_fifo)(struct st_lsm6dsx_sensor *sensor, bool enable);
189 * struct st_lsm6dsx_hw_ts_settings - ST IMU hw timer settings
205 * struct st_lsm6dsx_shub_settings - ST IMU hw i2c controller settings
208 * @pullup_en: i2c controller pull-up register info (addr + mask).
209 * @aux_sens: aux sensor register info (addr + mask).
213 * @shub_out: sensor hub first output register info.
260 * struct st_lsm6dsx_ext_dev_settings - i2c controller slave settings
263 * @id: external sensor id.
264 * @odr_table: Output data rate of the sensor [Hz].
265 * @fs_table: Configured sensor sensitivity table depending on full scale.
296 * struct st_lsm6dsx_settings - ST IMU sensor settings
303 * @drdy_mask: register info for data-ready mask (addr + mask).
306 * @fs_table: Hw sensors gain table (gain + val).
309 * @fifo_ops: Sensor hw FIFO parameters.
363 * struct st_lsm6dsx_sensor - ST IMU sensor instance
364 * @name: Sensor name.
365 * @id: Sensor identifier.
367 * @gain: Configured sensor sensitivity.
368 * @odr: Output data rate of the sensor [Hz].
370 * @watermark: Sensor watermark level.
371 * @decimator: Sensor decimation factor.
373 * @ts_ref: Sensor timestamp reference for hw one.
374 * @ext_info: Sensor settings if it is connected to i2c controller
381 u32 gain; member
398 * struct st_lsm6dsx_hw - ST IMU MEMS hw instance
405 * @suspend_mask: Suspended sensor bitmask.
406 * @enable_mask: Enabled sensor bitmask.
416 * @settings: Pointer to the specific sensor settings in use.
417 * @orientation: sensor chip orientation relative to main hardware.
469 int st_lsm6dsx_sensor_set_enable(struct st_lsm6dsx_sensor *sensor,
473 int st_lsm6dsx_update_watermark(struct st_lsm6dsx_sensor *sensor,
475 int st_lsm6dsx_update_fifo(struct st_lsm6dsx_sensor *sensor, bool enable);
480 int st_lsm6dsx_check_odr(struct st_lsm6dsx_sensor *sensor, u32 odr, u8 *val);
482 int st_lsm6dsx_shub_set_enable(struct st_lsm6dsx_sensor *sensor, bool enable);
492 mutex_lock(&hw->page_lock); in st_lsm6dsx_update_bits_locked()
493 err = regmap_update_bits(hw->regmap, addr, mask, val); in st_lsm6dsx_update_bits_locked()
494 mutex_unlock(&hw->page_lock); in st_lsm6dsx_update_bits_locked()
505 mutex_lock(&hw->page_lock); in st_lsm6dsx_read_locked()
506 err = regmap_bulk_read(hw->regmap, addr, val, len); in st_lsm6dsx_read_locked()
507 mutex_unlock(&hw->page_lock); in st_lsm6dsx_read_locked()
518 mutex_lock(&hw->page_lock); in st_lsm6dsx_write_locked()
519 err = regmap_write(hw->regmap, addr, val); in st_lsm6dsx_write_locked()
520 mutex_unlock(&hw->page_lock); in st_lsm6dsx_write_locked()
529 struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev); in st_lsm6dsx_get_mount_matrix() local
530 struct st_lsm6dsx_hw *hw = sensor->hw; in st_lsm6dsx_get_mount_matrix()
532 return &hw->orientation; in st_lsm6dsx_get_mount_matrix()
536 st_lsm6dsx_device_set_enable(struct st_lsm6dsx_sensor *sensor, bool enable) in st_lsm6dsx_device_set_enable() argument
538 if (sensor->id == ST_LSM6DSX_ID_EXT0 || in st_lsm6dsx_device_set_enable()
539 sensor->id == ST_LSM6DSX_ID_EXT1 || in st_lsm6dsx_device_set_enable()
540 sensor->id == ST_LSM6DSX_ID_EXT2) in st_lsm6dsx_device_set_enable()
541 return st_lsm6dsx_shub_set_enable(sensor, enable); in st_lsm6dsx_device_set_enable()
543 return st_lsm6dsx_sensor_set_enable(sensor, enable); in st_lsm6dsx_device_set_enable()