<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/i2c, branch v4.4.148</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.148</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.148'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-08-09T10:19:28Z</updated>
<entry>
<title>i2c: imx: Fix reinit_completion() use</title>
<updated>2018-08-09T10:19:28Z</updated>
<author>
<name>Esben Haabendal</name>
<email>eha@deif.com</email>
</author>
<published>2018-07-09T09:43:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a8ec97dbac9027f2f4158aadf86010edc2a9ea5d'/>
<id>urn:sha1:a8ec97dbac9027f2f4158aadf86010edc2a9ea5d</id>
<content type='text'>
commit 9f9e3e0d4dd3338b3f3dde080789f71901e1e4ff upstream.

Make sure to call reinit_completion() before dma is started to avoid race
condition where reinit_completion() is called after complete() and before
wait_for_completion_timeout().

Signed-off-by: Esben Haabendal &lt;eha@deif.com&gt;
Fixes: ce1a78840ff7 ("i2c: imx: add DMA support for freescale i2c driver")
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>i2c: rcar: fix resume by always initializing registers before transfer</title>
<updated>2018-07-11T14:03:47Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2017-04-18T18:38:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2aa465dbe267a09311560fcf4592db7689270f90'/>
<id>urn:sha1:2aa465dbe267a09311560fcf4592db7689270f90</id>
<content type='text'>
commit ae481cc139658e89eb3ea671dd00b67bd87f01a3 upstream.

Resume failed because of uninitialized registers. Instead of adding a
resume callback, we simply initialize registers before every transfer.
This lightweight change is more robust and will keep us safe if we ever
need support for power domains or dynamic frequency changes.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Acked-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: rcar: revoke START request early</title>
<updated>2018-06-06T14:46:22Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2015-11-19T15:56:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ea37818a5410d44b9e269372b917960e0c4dc6ba'/>
<id>urn:sha1:ea37818a5410d44b9e269372b917960e0c4dc6ba</id>
<content type='text'>
commit 52df445f29b79006d8b2dcd129152987c0d3bd64 upstream.

If we don't clear START generation as soon as possible, it may cause
another message to be generated, e.g. when receiving NACK in address
phase. To keep the race window as small as possible, we clear it right
at the beginning of the interrupt. We don't need any checks since we
always want to stop START and STOP generation on the next occasion after
we started it.

This patch improves the situation but sadly does not completely fix it.
It is still to be researched if we can do better given this HW design.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Reviewed-by: Biju Das &lt;biju.das@bp.renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: rcar: check master irqs before slave irqs</title>
<updated>2018-06-06T14:46:22Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2015-11-19T15:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fdcc1b764db0910ebd168a960247d409f0ce1340'/>
<id>urn:sha1:fdcc1b764db0910ebd168a960247d409f0ce1340</id>
<content type='text'>
commit c3be0af15959e11fa535d5332ab3d7cf34abd09b upstream.

Due to the HW design, master IRQs are timing critical, so give them
precedence over slave IRQ.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Reviewed-by: Biju Das &lt;biju.das@bp.renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: rcar: don't issue stop when HW does it automatically</title>
<updated>2018-06-06T14:46:22Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2015-11-19T15:56:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b414f20d848b786481a42a3c570cbfeedac61242'/>
<id>urn:sha1:b414f20d848b786481a42a3c570cbfeedac61242</id>
<content type='text'>
commit d89667b14f9d13b684287f6189ca209af5feee43 upstream.

The manual says (55.4.8.6) that HW does automatically send STOP after
NACK was received. My measuerments confirm that.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Reviewed-by: Biju Das &lt;biju.das@bp.renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: rcar: init new messages in irq</title>
<updated>2018-06-06T14:46:22Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2015-11-19T15:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=de427f7ee8255d1791e1b1c33e83a87035a778b4'/>
<id>urn:sha1:de427f7ee8255d1791e1b1c33e83a87035a778b4</id>
<content type='text'>
commit cc21d0b4b62e41e5013d763adade5ea4462c33a4 upstream.

Setting up new messages was done in process context while handling a
message was in interrupt context. Because of the HW design, this IP core
is sensitive to timing, so the context switches were too expensive. Move
this setup to interrupt context as well.

In my test setup, this fixed the occasional 'data byte sent twice' issue
which a number of people have seen. It also fixes to send REP_START
after a read message which was wrongly send as a STOP + START sequence
before.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Reviewed-by: Chris Paterson &lt;Chris.Paterson2@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: rcar: refactor setup of a msg</title>
<updated>2018-06-06T14:46:22Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2015-11-19T15:56:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d088d20380b04e4dcc5f3531387c6df13da86e8b'/>
<id>urn:sha1:d088d20380b04e4dcc5f3531387c6df13da86e8b</id>
<content type='text'>
commit b9d0684c79c4b9d30ce0d47d3270493dd0e76e59 upstream.

We want to reuse this function later.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Reviewed-by: Chris Paterson &lt;Chris.Paterson2@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: rcar: remove spinlock</title>
<updated>2018-06-06T14:46:22Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2015-11-19T15:56:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bc6909d79f211823ded993786a23bca1737f9386'/>
<id>urn:sha1:bc6909d79f211823ded993786a23bca1737f9386</id>
<content type='text'>
commit ff2316b87a336bff940939cd9fc56287ed48e578 upstream.

After making sure to reinit the HW and clear interrupts in the timeout
case, we know that interrupts are always disabled in the sections
protected by the spinlock. Thus, we can simply remove it which is a
preparation for further refactoring. While here, rename the timeout
variable to time_left which is way more readable.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Reviewed-by: Chris Paterson &lt;Chris.Paterson2@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: rcar: remove unused IOERROR state</title>
<updated>2018-06-06T14:46:22Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2015-11-19T15:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=90c9e4d18d785c3ae4ddd8df42a0cea5c3d05de2'/>
<id>urn:sha1:90c9e4d18d785c3ae4ddd8df42a0cea5c3d05de2</id>
<content type='text'>
commit 90f779e565bdc18dd4f79d81cf11f43a7266010b upstream.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Reviewed-by: Chris Paterson &lt;Chris.Paterson2@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: rcar: rework hw init</title>
<updated>2018-06-06T14:46:22Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2015-11-19T15:56:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7b72a3d26d990372a70280479b285f44e60337b6'/>
<id>urn:sha1:7b72a3d26d990372a70280479b285f44e60337b6</id>
<content type='text'>
commit 2c78cdc1c06308a59d6ed4145cdba73fdeff8c0d upstream.

We don't need to init HW before every transfer since we know the HW
state then. HW init at probe time is enough. While here, add setting the
clock register which belongs to init HW. Also, set MDBS bit since not
setting it is prohibited according to the manual.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Reviewed-by: Chris Paterson &lt;Chris.Paterson2@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
