* [PATCH 0/2] i2c: algos: bit: revert to fix regression (#200045)
@ 2018-06-16 13:37 Wolfram Sang
2018-06-16 13:37 ` [PATCH 1/2] Revert "i2c: algo-bit: init the bus to a known state" Wolfram Sang
2018-06-16 13:37 ` [PATCH 2/2] i2c: algos: bit: mention our experience about initial states Wolfram Sang
0 siblings, 2 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-06-16 13:37 UTC (permalink / raw)
To: linux-i2c; +Cc: linux-renesas-soc, Wolfram Sang, dri-devel, Sergey Larin
A regression was reported via Bugzilla and a revert seems to be the best choice
for now. Check patch 1 for details. To not make the same mistake again, patch 2
adds a comment sharing our experience.
Wolfram Sang (2):
Revert "i2c: algo-bit: init the bus to a known state"
i2c: algos: bit: mention our experience about initial states
drivers/i2c/algos/i2c-algo-bit.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.11.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] Revert "i2c: algo-bit: init the bus to a known state"
2018-06-16 13:37 [PATCH 0/2] i2c: algos: bit: revert to fix regression (#200045) Wolfram Sang
@ 2018-06-16 13:37 ` Wolfram Sang
2018-06-26 2:37 ` Wolfram Sang
2018-06-16 13:37 ` [PATCH 2/2] i2c: algos: bit: mention our experience about initial states Wolfram Sang
1 sibling, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2018-06-16 13:37 UTC (permalink / raw)
To: linux-i2c; +Cc: linux-renesas-soc, Wolfram Sang, dri-devel, Sergey Larin
This reverts commit 3e5f06bed72fe72166a6778f630241a893f67799. As per
bugzilla #200045, this caused a regression. I don't really see a way to
fix it without having the hardware. So, revert the patch and I will fix
the issue I was seeing originally in the i2c-gpio driver itself. I
couldn't find new users of this algorithm since, so there should be no
one depending on the new behaviour.
Reported-by: Sergey Larin <cerg2010cerg2010@mail.ru>
Fixes: 3e5f06bed72f ("i2c: algo-bit: init the bus to a known state")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/algos/i2c-algo-bit.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index 4a34f311e1ff..0c0eb16d710f 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -647,11 +647,6 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap,
if (bit_adap->getscl == NULL)
adap->quirks = &i2c_bit_quirk_no_clk_stretch;
- /* Bring bus to a known state. Looks like STOP if bus is not free yet */
- setscl(bit_adap, 1);
- udelay(bit_adap->udelay);
- setsda(bit_adap, 1);
-
ret = add_adapter(adap);
if (ret < 0)
return ret;
--
2.11.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] i2c: algos: bit: mention our experience about initial states
2018-06-16 13:37 [PATCH 0/2] i2c: algos: bit: revert to fix regression (#200045) Wolfram Sang
2018-06-16 13:37 ` [PATCH 1/2] Revert "i2c: algo-bit: init the bus to a known state" Wolfram Sang
@ 2018-06-16 13:37 ` Wolfram Sang
2018-06-18 16:03 ` Alex Deucher
2018-06-26 2:37 ` Wolfram Sang
1 sibling, 2 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-06-16 13:37 UTC (permalink / raw)
To: linux-i2c; +Cc: linux-renesas-soc, Wolfram Sang, dri-devel, Sergey Larin
So, if somebody wants to re-implement this in the future, we pinpoint to
a problem case.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/algos/i2c-algo-bit.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index 0c0eb16d710f..6ec65adaba49 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -647,6 +647,11 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap,
if (bit_adap->getscl == NULL)
adap->quirks = &i2c_bit_quirk_no_clk_stretch;
+ /*
+ * We tried forcing SCL/SDA to an initial state here. But that caused a
+ * regression, sadly. Check Bugzilla #200045 for details.
+ */
+
ret = add_adapter(adap);
if (ret < 0)
return ret;
--
2.11.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] i2c: algos: bit: mention our experience about initial states
2018-06-16 13:37 ` [PATCH 2/2] i2c: algos: bit: mention our experience about initial states Wolfram Sang
@ 2018-06-18 16:03 ` Alex Deucher
2018-06-26 2:37 ` Wolfram Sang
1 sibling, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2018-06-18 16:03 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Sergey Larin, Linux I2C,
Maling list - DRI developers
On Sat, Jun 16, 2018 at 9:37 AM, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> So, if somebody wants to re-implement this in the future, we pinpoint to
> a problem case.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Series is:
Acked-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/i2c/algos/i2c-algo-bit.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
> index 0c0eb16d710f..6ec65adaba49 100644
> --- a/drivers/i2c/algos/i2c-algo-bit.c
> +++ b/drivers/i2c/algos/i2c-algo-bit.c
> @@ -647,6 +647,11 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap,
> if (bit_adap->getscl == NULL)
> adap->quirks = &i2c_bit_quirk_no_clk_stretch;
>
> + /*
> + * We tried forcing SCL/SDA to an initial state here. But that caused a
> + * regression, sadly. Check Bugzilla #200045 for details.
> + */
> +
> ret = add_adapter(adap);
> if (ret < 0)
> return ret;
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Revert "i2c: algo-bit: init the bus to a known state"
2018-06-16 13:37 ` [PATCH 1/2] Revert "i2c: algo-bit: init the bus to a known state" Wolfram Sang
@ 2018-06-26 2:37 ` Wolfram Sang
0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-06-26 2:37 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-renesas-soc, dri-devel, linux-i2c, Sergey Larin
On Sat, Jun 16, 2018 at 10:37:56PM +0900, Wolfram Sang wrote:
> This reverts commit 3e5f06bed72fe72166a6778f630241a893f67799. As per
> bugzilla #200045, this caused a regression. I don't really see a way to
> fix it without having the hardware. So, revert the patch and I will fix
> the issue I was seeing originally in the i2c-gpio driver itself. I
> couldn't find new users of this algorithm since, so there should be no
> one depending on the new behaviour.
>
> Reported-by: Sergey Larin <cerg2010cerg2010@mail.ru>
> Fixes: 3e5f06bed72f ("i2c: algo-bit: init the bus to a known state")
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Applied to for-current, thanks!
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] i2c: algos: bit: mention our experience about initial states
2018-06-16 13:37 ` [PATCH 2/2] i2c: algos: bit: mention our experience about initial states Wolfram Sang
2018-06-18 16:03 ` Alex Deucher
@ 2018-06-26 2:37 ` Wolfram Sang
1 sibling, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-06-26 2:37 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-renesas-soc, dri-devel, linux-i2c, Sergey Larin
On Sat, Jun 16, 2018 at 10:37:57PM +0900, Wolfram Sang wrote:
> So, if somebody wants to re-implement this in the future, we pinpoint to
> a problem case.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Applied to for-current, thanks!
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-06-26 2:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-16 13:37 [PATCH 0/2] i2c: algos: bit: revert to fix regression (#200045) Wolfram Sang
2018-06-16 13:37 ` [PATCH 1/2] Revert "i2c: algo-bit: init the bus to a known state" Wolfram Sang
2018-06-26 2:37 ` Wolfram Sang
2018-06-16 13:37 ` [PATCH 2/2] i2c: algos: bit: mention our experience about initial states Wolfram Sang
2018-06-18 16:03 ` Alex Deucher
2018-06-26 2:37 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).