media: ccs: Request for "reset" GPIO
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 18 Jun 2020 11:12:51 +0000 (13:12 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Dec 2020 14:52:09 +0000 (15:52 +0100)
commitd0fbdcbe75950a4f93edcece34622888c4395133
tree62c57542a09bc7f7abd8ead911be2206841686ef
parentaab402ea9b4827f6d8d4a7c58d7492124b493e02
media: ccs: Request for "reset" GPIO

The DT bindings documented "reset-gpios" property but the driver never
made use of it. Instead it used a GPIO called "xshutdown", with apprently
wrong polarity.

Fix this by requesting "reset" GPIO with the right polarity first, and if
that fails, then request "xshutdown" GPIO with the old polarity. This way
it works for new users as expected while if someone, somewhere, depended
on "xshutdown" GPIO, that continues to work as well.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ccs/ccs-core.c
drivers/media/i2c/ccs/ccs.h