Stable Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] ARM: dts: exynos: Fix GPIO polarity for thr GalaxyS3 CM36651 sensor's bus
       [not found] <CGME20200326142048eucas1p29aee56575f8b530fc2d83860f6185d6b@eucas1p2.samsung.com>
@ 2020-03-26 14:20 ` Marek Szyprowski
  2020-03-27 12:28   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Szyprowski @ 2020-03-26 14:20 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Simon Shields, stable

GPIO lines for the CM36651 sensor I2C bus use the normal not the inverted
polarity. This bug has been there since adding the CM36651 sensor by
commit 85cb4e0bd2294, but went unnoticed because the "i2c-gpio" driver
ignored the GPIO polarity specified in the device-tree.

The recent conversion of "i2c-gpio" driver to the new, descriptor based
GPIO API, automatically made it the DT-specified polarity aware, what
broke the CM36651 sensor operation.

Fixes: c769eaf7a85d ("ARM: dts: exynos: Split Trats2 DTS in preparation for Midas boards")
Fixes: c10d3290cbde ("ARM: dts: Use GPIO constants for flags cells in exynos4412 boards")
Fixes: 85cb4e0bd229 ("ARM: dts: add cm36651 light/proximity sensor node for exynos4412-trats2")
CC: stable@vger.kernel.org # 4.16+
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi b/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi
index 44f97546dd0a..f910aa924bfb 100644
--- a/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi
+++ b/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi
@@ -68,7 +68,7 @@
 
 	i2c_cm36651: i2c-gpio-2 {
 		compatible = "i2c-gpio";
-		gpios = <&gpf0 0 GPIO_ACTIVE_LOW>, <&gpf0 1 GPIO_ACTIVE_LOW>;
+		gpios = <&gpf0 0 GPIO_ACTIVE_HIGH>, <&gpf0 1 GPIO_ACTIVE_HIGH>;
 		i2c-gpio,delay-us = <2>;
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: dts: exynos: Fix GPIO polarity for thr GalaxyS3 CM36651 sensor's bus
  2020-03-26 14:20 ` [PATCH] ARM: dts: exynos: Fix GPIO polarity for thr GalaxyS3 CM36651 sensor's bus Marek Szyprowski
@ 2020-03-27 12:28   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2020-03-27 12:28 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-samsung-soc, Bartlomiej Zolnierkiewicz, Simon Shields, stable

On Thu, Mar 26, 2020 at 03:20:37PM +0100, Marek Szyprowski wrote:
> GPIO lines for the CM36651 sensor I2C bus use the normal not the inverted
> polarity. This bug has been there since adding the CM36651 sensor by
> commit 85cb4e0bd2294, but went unnoticed because the "i2c-gpio" driver
> ignored the GPIO polarity specified in the device-tree.
> 
> The recent conversion of "i2c-gpio" driver to the new, descriptor based
> GPIO API, automatically made it the DT-specified polarity aware, what
> broke the CM36651 sensor operation.
> 
> Fixes: c769eaf7a85d ("ARM: dts: exynos: Split Trats2 DTS in preparation for Midas boards")
> Fixes: c10d3290cbde ("ARM: dts: Use GPIO constants for flags cells in exynos4412 boards")
> Fixes: 85cb4e0bd229 ("ARM: dts: add cm36651 light/proximity sensor node for exynos4412-trats2")

Thanks, applied. I kept only last Fixes as this is the original error.
All later were just refactorings of the same bug.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200326142048eucas1p29aee56575f8b530fc2d83860f6185d6b@eucas1p2.samsung.com>
2020-03-26 14:20 ` [PATCH] ARM: dts: exynos: Fix GPIO polarity for thr GalaxyS3 CM36651 sensor's bus Marek Szyprowski
2020-03-27 12:28   ` Krzysztof Kozlowski

Stable Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://lore.kernel.org/stable \
		stable@vger.kernel.org
	public-inbox-index stable

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git