]> asedeno.scripts.mit.edu Git - linux.git/commit
media: i2c: ov2659: Add powerdown/reset gpio handling
authorBenoit Parrot <bparrot@ti.com>
Mon, 30 Sep 2019 13:06:42 +0000 (10:06 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 1 Oct 2019 20:36:43 +0000 (17:36 -0300)
commit2b4a07a0dd336430097c410af33f342fb7931e42
tree1c88fd7932015ec090720491f3756b59d0988ee3
parent341f0960a87cad249c175a93bee4f27f4ab0b1af
media: i2c: ov2659: Add powerdown/reset gpio handling

On some board it is possible that the sensor 'powerdown' and or 'reset'
pin might be controlled by gpio instead of being tied.

To implement we add pm_runtime support which will handle the power
up/down sequence when it is available otherwise the sensor will be
powered on at module insertion/probe and powered off at module removal.

Now originally the driver assumed that the sensor would always stay
powered and keep its register setting. We cannot assume this anymore, so
every time we "power up" we need to re-program the initial registers
configuration first. This was previously done only at probe time.

[Sakari Ailus: Resolve a conflict in Kconfig]

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/Kconfig
drivers/media/i2c/ov2659.c