]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/iio/light/rpr0521.c
iio: light: rpr0521 poweroff for probe fails
authorMikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Thu, 18 May 2017 12:12:50 +0000 (15:12 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 21 May 2017 14:06:11 +0000 (15:06 +0100)
commit12d74949133e2450533894ea01ce0c56646ce006
treec34af63d36958d341fb26b3870dc5cd59c310f14
parentf87fa26177ac4dd5ebcc1e598a90142ecb4973cb
iio: light: rpr0521 poweroff for probe fails

Set sensor measurement off after probe fail in pm_runtime_set_active() or
iio_device_register(). Without this change sensor measurement stays on
even though probe fails on these calls.

This is maybe rare case, but causes constant power drain without any
benefits when it happens. Power drain is 20-500uA, typically 180uA.

Signed-off-by: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Acked-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/rpr0521.c