1 #include <linux/iio/iio.h>
2 #include <linux/mutex.h>
3 #include <linux/regmap.h>
4 #include <linux/regulator/consumer.h>
8 * enum mpu3050_fullscale - indicates the full range of the sensor in deg/sec
10 enum mpu3050_fullscale
{
18 * enum mpu3050_lpf - indicates the low pass filter width
21 /* This implicity sets sample frequency to 8 kHz */
23 /* All others sets the sample frequency to 1 kHz */
41 * struct mpu3050 - instance state container for the device
42 * @dev: parent device for this instance
43 * @orientation: mounting matrix, flipped axis etc
44 * @map: regmap to reach the registers
45 * @lock: serialization lock to marshal all requests
46 * @irq: the IRQ used for this device
47 * @regs: the regulators to power this device
48 * @fullscale: the current fullscale setting for the device
49 * @lpf: digital low pass filter setting for the device
50 * @divisor: base frequency divider: divides 8 or 1 kHz
51 * @calibration: the three signed 16-bit calibration settings that
52 * get written into the offset registers for each axis to compensate
54 * @trig: trigger for the MPU-3050 interrupt, if present
55 * @hw_irq_trigger: hardware interrupt trigger is in use
56 * @irq_actl: interrupt is active low
57 * @irq_latch: latched IRQ, this means that it is a level IRQ
58 * @irq_opendrain: the interrupt line shall be configured open drain
59 * @pending_fifo_footer: tells us if there is a pending footer in the FIFO
60 * that we have to read out first when handling the FIFO
61 * @hw_timestamp: latest hardware timestamp from the trigger IRQ, when in
63 * @i2cmux: an I2C mux reflecting the fact that this sensor is a hub with
64 * a pass-through I2C interface coming out of it: this device needs to be
65 * powered up in order to reach devices on the other side of this mux
69 struct iio_mount_matrix orientation
;
73 struct regulator_bulk_data regs
[2];
74 enum mpu3050_fullscale fullscale
;
78 struct iio_trigger
*trig
;
83 bool pending_fifo_footer
;
85 struct i2c_mux_core
*i2cmux
;
88 /* Probe called from different transports */
89 int mpu3050_common_probe(struct device
*dev
,
93 int mpu3050_common_remove(struct device
*dev
);
96 extern const struct dev_pm_ops mpu3050_dev_pm_ops
;