All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Corna <nicola@corna.info>
To: Wolfram Sang <wsa@the-dreams.de>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Lee Jones <lee@kernel.org>, Eric Anholt <eric@anholt.net>,
	Jonathan Cameron <jic23@kernel.org>
Cc: Nicola Corna <nicola@corna.info>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-i2c@vger.kernel.org,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Hartmut Knaack <knaack.h@gmx.de>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] i2c: added I2C_AQ_NO_CLK_STRETCH to i2c-bcm2835.c
Date: Tue, 27 Oct 2015 21:11:57 +0100	[thread overview]
Message-ID: <1445976718-7449-3-git-send-email-nicola@corna.info> (raw)
In-Reply-To: <1445976718-7449-1-git-send-email-nicola@corna.info>

As reported here
http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html
the BCM2835 has a bug in its i2c implementation which prevents a correct
clock stretching.

Signed-off-by: Nicola Corna <nicola@corna.info>
---
 drivers/i2c/busses/i2c-bcm2835.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
index 3032b89..38d7102 100644
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -222,6 +222,10 @@ static const struct i2c_algorithm bcm2835_i2c_algo = {
 	.functionality	= bcm2835_i2c_func,
 };
 
+static const struct i2c_adapter_quirks bcm2835_i2c_quirks = {
+	.flags = I2C_AQ_NO_CLK_STRETCH,
+};
+
 static int bcm2835_i2c_probe(struct platform_device *pdev)
 {
 	struct bcm2835_i2c_dev *i2c_dev;
@@ -293,6 +297,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
 	adap->algo = &bcm2835_i2c_algo;
 	adap->dev.parent = &pdev->dev;
 	adap->dev.of_node = pdev->dev.of_node;
+	adap->quirks = &bcm2835_i2c_quirks;
 
 	bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, 0);
 
-- 
2.6.1

WARNING: multiple messages have this Message-ID (diff)
From: Nicola Corna <nicola@corna.info>
To: Wolfram Sang <wsa@the-dreams.de>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Lee Jones <lee@kernel.org>, Eric Anholt <eric@anholt.net>,
	Jonathan Cameron <jic23@kernel.org>
Cc: linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, Nicola Corna <nicola@corna.info>
Subject: [PATCH 3/4] i2c: added I2C_AQ_NO_CLK_STRETCH to i2c-bcm2835.c
Date: Tue, 27 Oct 2015 21:11:57 +0100	[thread overview]
Message-ID: <1445976718-7449-3-git-send-email-nicola@corna.info> (raw)
In-Reply-To: <1445976718-7449-1-git-send-email-nicola@corna.info>

As reported here
http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html
the BCM2835 has a bug in its i2c implementation which prevents a correct
clock stretching.

Signed-off-by: Nicola Corna <nicola@corna.info>
---
 drivers/i2c/busses/i2c-bcm2835.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
index 3032b89..38d7102 100644
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -222,6 +222,10 @@ static const struct i2c_algorithm bcm2835_i2c_algo = {
 	.functionality	= bcm2835_i2c_func,
 };
 
+static const struct i2c_adapter_quirks bcm2835_i2c_quirks = {
+	.flags = I2C_AQ_NO_CLK_STRETCH,
+};
+
 static int bcm2835_i2c_probe(struct platform_device *pdev)
 {
 	struct bcm2835_i2c_dev *i2c_dev;
@@ -293,6 +297,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
 	adap->algo = &bcm2835_i2c_algo;
 	adap->dev.parent = &pdev->dev;
 	adap->dev.of_node = pdev->dev.of_node;
+	adap->quirks = &bcm2835_i2c_quirks;
 
 	bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, 0);
 
-- 
2.6.1

WARNING: multiple messages have this Message-ID (diff)
From: nicola@corna.info (Nicola Corna)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] i2c: added I2C_AQ_NO_CLK_STRETCH to i2c-bcm2835.c
Date: Tue, 27 Oct 2015 21:11:57 +0100	[thread overview]
Message-ID: <1445976718-7449-3-git-send-email-nicola@corna.info> (raw)
In-Reply-To: <1445976718-7449-1-git-send-email-nicola@corna.info>

As reported here
http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html
the BCM2835 has a bug in its i2c implementation which prevents a correct
clock stretching.

Signed-off-by: Nicola Corna <nicola@corna.info>
---
 drivers/i2c/busses/i2c-bcm2835.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
index 3032b89..38d7102 100644
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -222,6 +222,10 @@ static const struct i2c_algorithm bcm2835_i2c_algo = {
 	.functionality	= bcm2835_i2c_func,
 };
 
+static const struct i2c_adapter_quirks bcm2835_i2c_quirks = {
+	.flags = I2C_AQ_NO_CLK_STRETCH,
+};
+
 static int bcm2835_i2c_probe(struct platform_device *pdev)
 {
 	struct bcm2835_i2c_dev *i2c_dev;
@@ -293,6 +297,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
 	adap->algo = &bcm2835_i2c_algo;
 	adap->dev.parent = &pdev->dev;
 	adap->dev.of_node = pdev->dev.of_node;
+	adap->quirks = &bcm2835_i2c_quirks;
 
 	bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, 0);
 
-- 
2.6.1

  parent reply	other threads:[~2015-10-27 20:11 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 20:11 [PATCH 1/4] i2c: added i2c quirk flag for unsupported clock stretching Nicola Corna
2015-10-27 20:11 ` Nicola Corna
2015-10-27 20:11 ` Nicola Corna
2015-10-27 20:11 ` [PATCH 2/4] i2c: added I2C_AQ_NO_CLK_STRETCH to i2c-algo-bit.c Nicola Corna
2015-10-27 20:11   ` Nicola Corna
2015-10-27 20:11   ` Nicola Corna
2015-10-27 20:11 ` Nicola Corna [this message]
2015-10-27 20:11   ` [PATCH 3/4] i2c: added I2C_AQ_NO_CLK_STRETCH to i2c-bcm2835.c Nicola Corna
2015-10-27 20:11   ` Nicola Corna
     [not found]   ` <1445976718-7449-3-git-send-email-nicola-V0pQiMyom5mh6J55Ss3d3w@public.gmane.org>
2015-10-28 19:16     ` Eric Anholt
2015-10-28 19:16       ` Eric Anholt
2015-10-28 19:16       ` Eric Anholt
2015-10-29  4:10   ` Stephen Warren
2015-10-29  4:10     ` Stephen Warren
2015-10-27 20:11 ` [PATCH v3 4/4] iio: humidity: si7020: added No Hold read mode Nicola Corna
2015-10-27 20:11   ` Nicola Corna
2015-10-27 20:11   ` Nicola Corna
2015-10-27 23:30   ` Wolfram Sang
2015-10-27 23:30     ` Wolfram Sang
2015-10-28  6:46   ` Nicola Corna
2015-10-28  6:46     ` Nicola Corna
2015-10-28  6:46     ` Nicola Corna
2015-10-28  6:58     ` [PATCH v4 " Nicola Corna
2015-10-28  6:58       ` Nicola Corna
2015-10-28  6:58       ` Nicola Corna
     [not found]       ` <1446015506-21371-1-git-send-email-nicola-V0pQiMyom5mh6J55Ss3d3w@public.gmane.org>
2015-10-28  9:38         ` Lars-Peter Clausen
2015-10-28  9:38           ` Lars-Peter Clausen
2015-10-28  9:38           ` Lars-Peter Clausen
2015-10-28 18:35       ` Nicola Corna
2015-10-28 18:35         ` Nicola Corna
2015-10-28 18:46         ` Lars-Peter Clausen
2015-10-28 18:46           ` Lars-Peter Clausen
2015-10-28 20:17         ` Nicola Corna
2015-10-28 20:17           ` Nicola Corna
2015-10-28 20:17           ` Nicola Corna
     [not found]         ` <563117FB.5030506-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2015-10-28 20:19           ` Nicola Corna
2015-10-28 20:19             ` Nicola Corna
2015-10-28 20:19             ` Nicola Corna
2015-10-29  9:17             ` Lars-Peter Clausen
2015-10-29  9:17               ` Lars-Peter Clausen
2015-10-29 11:34 ` [PATCH v2 1/5] i2c: add i2c quirk flag for unsupported clock stretching Nicola Corna
2015-10-29 11:34   ` Nicola Corna
2015-10-29 11:34   ` Nicola Corna
2015-10-29 11:34   ` [PATCH v2 2/5] i2c: add I2C_AQ_NO_CLK_STRETCH to i2c-algo-bit.c Nicola Corna
2015-10-29 11:34     ` Nicola Corna
2015-10-29 11:34     ` Nicola Corna
     [not found]     ` <1446118467-26453-2-git-send-email-nicola-V0pQiMyom5mh6J55Ss3d3w@public.gmane.org>
2015-11-30 17:26       ` Wolfram Sang
2015-11-30 17:26         ` Wolfram Sang
2015-11-30 17:26         ` Wolfram Sang
2015-10-29 11:34   ` [PATCH v2 3/5] i2c: add I2C_AQ_NO_CLK_STRETCH to i2c-bcm2835.c Nicola Corna
2015-10-29 11:34     ` Nicola Corna
2015-10-29 11:34     ` Nicola Corna
2015-11-30 17:27     ` Wolfram Sang
2015-11-30 17:27       ` Wolfram Sang
2015-10-29 11:34   ` [PATCH 4/5] i2c: add i2c_check_quirks helper function Nicola Corna
2015-10-29 11:34     ` Nicola Corna
2015-10-29 11:34     ` Nicola Corna
     [not found]     ` <1446118467-26453-4-git-send-email-nicola-V0pQiMyom5mh6J55Ss3d3w@public.gmane.org>
2015-10-31 10:18       ` Jonathan Cameron
2015-10-31 10:18         ` Jonathan Cameron
2015-10-31 10:18         ` Jonathan Cameron
     [not found]         ` <56349581.8070900-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-11-30 17:28           ` Wolfram Sang
2015-11-30 17:28             ` Wolfram Sang
2015-11-30 17:28             ` Wolfram Sang
2015-11-30 17:30     ` Wolfram Sang
2015-11-30 17:30       ` Wolfram Sang
2015-10-29 11:34   ` [PATCH v5 5/5] iio: humidity: si7020: add No Hold read mode Nicola Corna
2015-10-29 11:34     ` Nicola Corna
2015-10-29 11:34     ` Nicola Corna
2015-10-31 10:21     ` Jonathan Cameron
2015-10-31 10:21       ` Jonathan Cameron
     [not found]       ` <56349644.2060308-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-11-30 17:33         ` Wolfram Sang
2015-11-30 17:33           ` Wolfram Sang
2015-11-30 17:33           ` Wolfram Sang
2015-12-05 18:24           ` Jonathan Cameron
2015-12-05 18:24             ` Jonathan Cameron
2015-12-05 19:01             ` Wolfram Sang
2015-12-05 19:01               ` Wolfram Sang
2017-05-10 14:46             ` Andrea Galbusera
2015-11-30 17:24   ` [PATCH v2 1/5] i2c: add i2c quirk flag for unsupported clock stretching Wolfram Sang
2015-11-30 17:24     ` Wolfram Sang

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=1445976718-7449-3-git-send-email-nicola@corna.info \
    --to=nicola@corna.info \
    --cc=eric@anholt.net \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=swarren@wwwdotorg.org \
    --cc=wsa@the-dreams.de \
    /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.