]> 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)
commit5438dfc610408e2d820143e28940c99128e5c9de
tree1c88fd7932015ec090720491f3756b59d0988ee3
parent5f51a5f49ad900d5638979572a22838d2b294a95
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