iio: gyro: itg3200: add suspend/resume support.
authorNeilBrown <neilb@suse.de>
Tue, 24 Feb 2015 02:24:41 +0000 (13:24 +1100)
committerJonathan Cameron <jic23@kernel.org>
Mon, 9 Mar 2015 14:54:42 +0000 (14:54 +0000)
commit60d3e3bbd5992bb4478f9f99a4e4c5748a1a1ba7
tree44327c9e057a82b0001722f5d9eeca3885757b88
parentd1bd4867b0959d5221dc528ccf60c8534aae865d
iio: gyro: itg3200: add suspend/resume support.

Unless we put the device to sleep when not it use, it wastes
6mA.

If the device is asleep on probe, the 'id' register
sometimes mis-reads - so reset first.  If the device responds
at all a command sent to the address, it is almost certainly
the correct device already.

Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/gyro/itg3200_core.c