]> git.baikalelectronics.ru Git - kernel.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)
commit3f46d5edce80ad7324d5f69a76212404e06990f6
tree1c88fd7932015ec090720491f3756b59d0988ee3
parent79fea7bf0294bdc1c0ad463b720acb962d83feb5
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