/** * struct st_sensor_bdu - ST sensor device block data update * @addr: address of the register. * @mask: mask to write the block data update flag.
*/ struct st_sensor_bdu {
u8 addr;
u8 mask;
};
/** * struct st_sensor_das - ST sensor device data alignment selection * @addr: address of the register. * @mask: mask to write the das flag for left alignment.
*/ struct st_sensor_das {
u8 addr;
u8 mask;
};
/** * struct st_sensor_int_drdy - ST sensor device drdy line parameters * @addr: address of INT drdy register. * @mask: mask to enable drdy line. * @addr_od: address to enable/disable Open Drain on the INT line. * @mask_od: mask to enable/disable Open Drain on the INT line.
*/ struct st_sensor_int_drdy {
u8 addr;
u8 mask;
u8 addr_od;
u8 mask_od;
};
/** * struct st_sensor_data_ready_irq - ST sensor device data-ready interrupt * struct int1 - data-ready configuration register for INT1 pin. * struct int2 - data-ready configuration register for INT2 pin. * @addr_ihl: address to enable/disable active low on the INT lines. * @mask_ihl: mask to enable/disable active low on the INT lines. * struct stat_drdy - status register of DRDY (data ready) interrupt. * struct ig1 - represents the Interrupt Generator 1 of sensors. * @en_addr: address of the enable ig1 register. * @en_mask: mask to write the on/off value for enable.
*/ struct st_sensor_data_ready_irq { struct st_sensor_int_drdy int1; struct st_sensor_int_drdy int2;
u8 addr_ihl;
u8 mask_ihl; struct {
u8 addr;
u8 mask;
} stat_drdy; struct {
u8 en_addr;
u8 en_mask;
} ig1;
};
/** * struct st_sensor_settings - ST specific sensor settings * @wai: Contents of WhoAmI register. * @wai_addr: The address of WhoAmI register. * @sensors_supported: List of supported sensors by struct itself. * @ch: IIO channels for the sensor. * @odr: Output data rate register and ODR list available. * @pw: Power register of the sensor. * @enable_axis: Enable one or more axis of the sensor. * @fs: Full scale register and full scale list available. * @bdu: Block data update register. * @das: Data Alignment Selection register. * @drdy_irq: Data ready register of the sensor. * @sim: SPI serial interface mode register of the sensor. * @multi_read_bit: Use or not particular bit for [I2C/SPI] multi-read. * @bootime: samples to discard when sensor passing from power-down to power-up.
*/ struct st_sensor_settings {
u8 wai;
u8 wai_addr; char sensors_supported[ST_SENSORS_MAX_4WAI][ST_SENSORS_MAX_NAME]; struct iio_chan_spec *ch; int num_ch; struct st_sensor_odr odr; struct st_sensor_power pw; struct st_sensor_axis enable_axis; struct st_sensor_fullscale fs; struct st_sensor_bdu bdu; struct st_sensor_das das; struct st_sensor_data_ready_irq drdy_irq; struct st_sensor_sim sim; bool multi_read_bit; unsignedint bootime;
};
/** * struct st_sensor_data - ST sensor device status * @trig: The trigger in use by the core driver. * @mount_matrix: The mounting matrix of the sensor. * @sensor_settings: Pointer to the specific sensor settings in use. * @current_fullscale: Maximum range of measure by the sensor. * @regmap: Pointer to specific sensor regmap configuration. * @enabled: Status of the sensor (false->off, true->on). * @odr: Output data rate of the sensor [Hz]. * num_data_channels: Number of data channels used in buffer. * @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2). * @int_pin_open_drain: Set the interrupt/DRDY to open drain. * @irq: the IRQ number. * @edge_irq: the IRQ triggers on edges and need special handling. * @hw_irq_trigger: if we're using the hardware interrupt on the sensor. * @hw_timestamp: Latest timestamp from the interrupt handler, when in use. * @buffer_data: Data used by buffer part. * @odr_lock: Local lock for preventing concurrent ODR accesses/changes
*/ struct st_sensor_data { struct iio_trigger *trig; struct iio_mount_matrix mount_matrix; struct st_sensor_settings *sensor_settings; struct st_sensor_fullscale_avl *current_fullscale; struct regmap *regmap;
bool enabled;
unsignedint odr; unsignedint num_data_channels;
u8 drdy_int_pin; bool int_pin_open_drain; int irq;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.