diff options
author | Adriana Reus <adriana.reus@intel.com> | 2016-02-12 14:44:44 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-02-13 23:54:00 +0300 |
commit | b3eea8dacfb758baa0fe78e0cf24d5e5d288c5fe (patch) | |
tree | 32ab2ddc5f95be730faf3a050211baee78849059 /drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | |
parent | d430f3c36ca6e71f30c00757f5d43ca83b890ff4 (diff) | |
download | linux-b3eea8dacfb758baa0fe78e0cf24d5e5d288c5fe.tar.xz |
iio: imu: inv_mpu6050: Separate driver into core and i2c functionality.
Separate this driver into core and i2c functionality.
This is in preparation for adding spi support.
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h')
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h index 469cd1f011de..1bf65a0fd323 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h @@ -108,9 +108,10 @@ struct inv_mpu6050_hw { * @hw: Other hardware-specific information. * @chip_type: chip type. * @time_stamp_lock: spin lock to time stamp. - * @client: i2c client handle. * @plat_data: platform data. * @timestamps: kfifo queue to store time stamp. + * @map regmap pointer. + * @irq interrupt number. */ struct inv_mpu6050_state { #define TIMESTAMP_FIFO_SIZE 16 @@ -120,13 +121,13 @@ struct inv_mpu6050_state { const struct inv_mpu6050_hw *hw; enum inv_devices chip_type; spinlock_t time_stamp_lock; - struct i2c_client *client; struct i2c_adapter *mux_adapter; struct i2c_client *mux_client; unsigned int powerup_count; struct inv_mpu6050_platform_data plat_data; DECLARE_KFIFO(timestamps, long long, TIMESTAMP_FIFO_SIZE); struct regmap *map; + int irq; }; /*register and associated bit definition*/ @@ -255,5 +256,8 @@ int inv_reset_fifo(struct iio_dev *indio_dev); int inv_mpu6050_switch_engine(struct inv_mpu6050_state *st, bool en, u32 mask); int inv_mpu6050_write_reg(struct inv_mpu6050_state *st, int reg, u8 val); int inv_mpu6050_set_power_itg(struct inv_mpu6050_state *st, bool power_on); -int inv_mpu_acpi_create_mux_client(struct inv_mpu6050_state *st); -void inv_mpu_acpi_delete_mux_client(struct inv_mpu6050_state *st); +int inv_mpu_acpi_create_mux_client(struct i2c_client *client); +void inv_mpu_acpi_delete_mux_client(struct i2c_client *client); +int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name); +int inv_mpu_core_remove(struct device *dev); +extern const struct dev_pm_ops inv_mpu_pmops; |