[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201228125033.355269920@linuxfoundation.org>
Date: Mon, 28 Dec 2020 13:44:16 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jacopo Mondi <jacopo+renesas@...ndi.org>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.10 258/717] media: rdacm20: Enable GPIO1 explicitly
From: Jacopo Mondi <jacopo+renesas@...ndi.org>
[ Upstream commit 7fe1d4453fb6bf103d668a19d957a7b2fc21887c ]
The MAX9271 GPIO1 line that controls the sensor reset is by default
enabled after a serializer chip reset.
As rdacm20 does not go through an explicit serializer reset, make sure
GPIO1 is enabled to make the camera module driver more robust.
Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver")
Signed-off-by: Jacopo Mondi <jacopo+renesas@...ndi.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/media/i2c/rdacm20.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c
index 1ed928c4ca70f..16bcb764b0e0d 100644
--- a/drivers/media/i2c/rdacm20.c
+++ b/drivers/media/i2c/rdacm20.c
@@ -487,9 +487,18 @@ static int rdacm20_initialize(struct rdacm20_device *dev)
* Reset the sensor by cycling the OV10635 reset signal connected to the
* MAX9271 GPIO1 and verify communication with the OV10635.
*/
- max9271_clear_gpios(dev->serializer, MAX9271_GPIO1OUT);
+ ret = max9271_enable_gpios(dev->serializer, MAX9271_GPIO1OUT);
+ if (ret)
+ return ret;
+
+ ret = max9271_clear_gpios(dev->serializer, MAX9271_GPIO1OUT);
+ if (ret)
+ return ret;
usleep_range(10000, 15000);
- max9271_set_gpios(dev->serializer, MAX9271_GPIO1OUT);
+
+ ret = max9271_set_gpios(dev->serializer, MAX9271_GPIO1OUT);
+ if (ret)
+ return ret;
usleep_range(10000, 15000);
again:
--
2.27.0
Powered by blists - more mailing lists