]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd391ac40223104ce2954e7a42819b1a329fd68b2
tree62c57542a09bc7f7abd8ead911be2206841686ef
parent488d8ca65d36d3e62c1aca61d513552d8b202cde
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