From: Andrzej Hajda <a.hajda@samsung.com>
To: Archit Taneja <architt@codeaurora.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
dri-devel@lists.freedesktop.org,
linux-samsung-soc@vger.kernel.org
Subject: [PATCH 1/3] drm/bridge/sii8620: perform I2C bus recovery after reset
Date: Mon, 15 Jan 2018 18:33:55 +0100 [thread overview]
Message-ID: <20180115173357.31067-2-a.hajda@samsung.com> (raw)
In-Reply-To: <20180115173357.31067-1-a.hajda@samsung.com>
Chip has known bug which causes I2C client state machine to frequently
enter non-idle mode after chip reset. Let's ask I2C adapter to perform
bus recovery to mitigate this bug.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
drivers/gpu/drm/bridge/sil-sii8620.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/bridge/sil-sii8620.c b/drivers/gpu/drm/bridge/sil-sii8620.c
index 86789f8918a4..db93e5e0497c 100644
--- a/drivers/gpu/drm/bridge/sil-sii8620.c
+++ b/drivers/gpu/drm/bridge/sil-sii8620.c
@@ -978,6 +978,8 @@ static int sii8620_hw_off(struct sii8620 *ctx)
static void sii8620_hw_reset(struct sii8620 *ctx)
{
+ struct i2c_client *i2c = to_i2c_client(ctx->dev);
+
usleep_range(10000, 20000);
gpiod_set_value(ctx->gpio_reset, 0);
usleep_range(5000, 20000);
@@ -985,6 +987,9 @@ static void sii8620_hw_reset(struct sii8620 *ctx)
usleep_range(10000, 20000);
gpiod_set_value(ctx->gpio_reset, 0);
msleep(300);
+
+ /* I2C bus recovery prevents I2C errors due to known bug in the chip */
+ i2c_recover_bus(i2c->adapter);
}
static void sii8620_cbus_reset(struct sii8620 *ctx)
--
2.15.1
next prev parent reply other threads:[~2018-01-15 17:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180115173402eucas1p186d96eb61b61d6b94ca80a88027c9611@eucas1p1.samsung.com>
2018-01-15 17:33 ` [PATCH 0/3] drm/bridge/sil-sii8620: misc fixes Andrzej Hajda
[not found] ` <CGME20180115173404eucas1p11cd93514b1c6cefedca81b4d06de860e@eucas1p1.samsung.com>
2018-01-15 17:33 ` Andrzej Hajda [this message]
2018-01-26 14:05 ` [PATCH 1/3] drm/bridge/sii8620: perform I2C bus recovery after reset Andrzej Hajda
[not found] ` <CGME20180115173407eucas1p1584fb8b431e549cdd0ebdf057c1a512a@eucas1p1.samsung.com>
2018-01-15 17:33 ` [PATCH 2/3] drm/bridge/sii8620: simplify hardware reset procedure Andrzej Hajda
[not found] ` <CGME20180115173409eucas1p14248e60263dabb683ccd457fd89d4e69@eucas1p1.samsung.com>
2018-01-15 17:33 ` [PATCH 3/3] drm/bridge/sii8620: fix loops in EDID fetch logic Andrzej Hajda
2018-06-08 7:19 ` Marek Szyprowski
2018-06-13 13:12 ` Maciej Purski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180115173357.31067-2-a.hajda@samsung.com \
--to=a.hajda@samsung.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=architt@codeaurora.org \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.