Invensense 5.1 IIO driver release

        -- This cover letter is for the first release as well as this release
        -- Patches provided to handle poll function better in Kfifo situation in
                industrialio-buffer.c
        -- Kfifo poll funcion patch is provided by Jonathan Cameron, the creator of IIO.
        -- mpu.h is modified.
        -- This driver supports MPU6050/MPU3050/MPU9150 using IIO architecture.
        -- secondary bus support of AKM8975/8963/8972 is provided to MPU6050
        -- secondary bus support of BMA250 is provided to MPU3050.
        -- trigger is removed. Interrupt is directly used. This would work well when
                system load is heavy.
        -- update Kconfig and Makefile to make slave driver as compilation option.
        -- use IIO_DEV_ATTR in the attribute definition.
        -- fix various Linux style problem.
        -- add dmp_event_int_on entry to control the dmp event interrupt on/off.
        -- update new DMP image.
        -- use Macro for channel spec definition.
        -- add CRC check in DMP image load

Change-Id: I14d05cd8649bf48dec326b9d7d5d248e87324fe7
Signed-off-by: Ge Gao <ggao@invensense.com>

Conflicts:
	drivers/staging/iio/industrialio-core.c
	drivers/staging/iio/types.h
drivers: iio: Invensense mpu: kfifo fixes, better reset, MPU6500 support.

* fix kfifo overflow and zero len.
* reset at the beginning of probe to remove previous
 secondary compass state.
* Add MPU6500 support.
* add test hook.
* consolidate some non-dmp attribute function.

Change-Id: I879b05027528c559b32226f1b356fd30fe81c868
Signed-off-by: Ge Gao <ggao@invensense.com>
drivers: iio: Invensense mpu: PM + cleanup/fixes + MPU6500 stub functions.

* cleanup/fixes
* add place-holder for read silicon function for MPU6500.
* add Power management support.
* consolidate switch engine function.

Change-Id: I76edf46e4c676e40bd38dc8b24f609b89f6579d5
Signed-off-by: Ge Gao <ggao@invensense.com>
update Invensense 5.1 IIO driver.

--update README.
--fix the output rate for compass when dmp is on.
--fix the polling rate for compass when dmp is on.
--coding style fix.
--fix MPU3050 slave driver crash problem when slave is not
  selected.

Change-Id: Id25726b8c4d59d1411bf6ebfcefa3df93ed6f05e
Signed-off-by: Ge Gao <ggao@invensense.com>
drivers: iio: inv mpu: don't power up mpu unnecessarily

Previously it would always power it back on when resuming from suspend.
Now on resume, it restores the state it had on suspend.
This reduces the time spent resuming. The total resume time was 250ms,
130ms was in inv mpu power up.

Even when the mpu is on to handle screen rotation, it gets turned off
when the device screen is turned off before it goes to sleep.
So this change is sufficient to remove the 130ms.
Use cases where some other service keeps on running and needs the mpu
will add back the 130ms. If really needed, then we can do something
fancier with tasks.

Bug: 7139924, 7309244
Signed-off-by: JP Abgrall <jpa@google.com>
drivers: iio: inv mpu: Add shutdown function

MPU sometimes causes an I2C communication error when it is reset.
Shutdown function is added to clean up all the internal status and
power it down to make sure MPU runs in the next power cycle with
clean register values.

Bug : 7311220
Change-Id: If85bc585ae556ada9ea955a45af0bfe4144b0c82
Signed-off-by: Jinkyu Song <jksong@sta.samsung.com>
staging:iio:events: Don't copy data to user-space with a locked spinlock.

iio_event_chrdev_read would return -EFAULT if the user-space page was
not resident.

Change-Id: I4ac5d3bc791bb503d014d9db576b9d6d522505b2
Signed-off-by: Arve Hjønnevåg <arve@android.com>
iio: Invensense MPU: support mutiple DMP CRCs.

Instead of just hardcoding a single DMP CRC,
support an array to check against.
This makes transitioning HALs easier.

Signed-off-by: JP Abgrall <jpa@google.com>
bowser: fixup iio board info
drivers: iio: inv/mpu: split accel/gyro data
bowser: iio/mpu orient/accel data split