]> git.baikalelectronics.ru Git - kernel.git/commit
media: i2c: imx412: Fix reset GPIO polarity
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Fri, 15 Apr 2022 11:59:51 +0000 (13:59 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 17 May 2022 07:07:03 +0000 (09:07 +0200)
commitb74b9525a30e90559426e0a4bab6f60b920692b0
tree85ea465c651270a4e3e96596432177a919a75901
parentf8e2662f3d4b398dd72f56f9e09d495e62df6607
media: i2c: imx412: Fix reset GPIO polarity

The imx412/imx577 sensor has a reset line that is active low not active
high. Currently the logic for this is inverted.

The right way to define the reset line is to declare it active low in the
DTS and invert the logic currently contained in the driver.

The DTS should represent the hardware does i.e. reset is active low.
So:
+               reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>;
not:
-               reset-gpios = <&tlmm 78 GPIO_ACTIVE_HIGH>;

I was a bit reticent about changing this logic since I thought it might
negatively impact @intel.com users. Googling a bit though I believe this
sensor is used on "Keem Bay" which is clearly a DTS based system and is not
upstream yet.

Fixes: 01013f4a026a ("media: i2c: Add imx412 camera sensor driver")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/imx412.c