]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/iio/gyro/bmg160_core.c
iio: accel: bmg160: optimize transfers in trigger handler
authorIrina Tirdea <irina.tirdea@intel.com>
Thu, 24 Mar 2016 09:29:29 +0000 (11:29 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 3 Apr 2016 09:27:45 +0000 (10:27 +0100)
commit7e3d1eb123d804d2b1088782f458aed5eb36c684
treeed9802fe70bcfb51ab11e27081a167628ad7e64a
parentee8c5419e06e3a002995f5d1f57c9b5aead331e6
iio: accel: bmg160: optimize transfers in trigger handler

Some i2c busses (e.g.: Synopsys DesignWare I2C adapter) need to
enable/disable the bus at each i2c transfer and must wait for
the enable/disable to happen before sending the data.

When reading data in the trigger handler, the bmg160 gyro driver does
one bus transfer for each axis. This has an impact on the frequency
of the accelerometer at high sample rates due to additional delays
introduced by the bus at each transfer.

Reading all axis values in one bus transfer reduces the delays
introduced by the bus.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/gyro/bmg160_core.c