diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2020-06-18 14:12:51 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-12-02 17:52:09 +0300 |
commit | d0fbdcbe75950a4f93edcece34622888c4395133 (patch) | |
tree | 62c57542a09bc7f7abd8ead911be2206841686ef /drivers/media/i2c/ccs/ccs.h | |
parent | aab402ea9b4827f6d8d4a7c58d7492124b493e02 (diff) | |
download | linux-d0fbdcbe75950a4f93edcece34622888c4395133.tar.xz |
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>
Diffstat (limited to 'drivers/media/i2c/ccs/ccs.h')
-rw-r--r-- | drivers/media/i2c/ccs/ccs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/i2c/ccs/ccs.h b/drivers/media/i2c/ccs/ccs.h index 8933f3d40fa5..bfe39e02f5e9 100644 --- a/drivers/media/i2c/ccs/ccs.h +++ b/drivers/media/i2c/ccs/ccs.h @@ -219,6 +219,7 @@ struct ccs_sensor { struct regulator *vana; struct clk *ext_clk; struct gpio_desc *xshutdown; + struct gpio_desc *reset; void *ccs_limits; u8 nbinning_subtypes; struct ccs_binning_subtype binning_subtypes[CCS_LIM_BINNING_SUB_TYPE_MAX_N + 1]; |