Re: [PATCH] i2c: exynos5: Preserve high speed master code

2021-02-17 Thread Krzysztof Kozlowski
On Wed, Feb 17, 2021 at 09:32:11AM +0100, Jesper Nilsson wrote: > On Wed, Feb 17, 2021 at 09:07:47AM +0100, Krzysztof Kozlowski wrote: > > On Tue, Feb 16, 2021 at 11:09:33PM +0100, Marten Lindahl wrote: > > > > Any reason why not "|= MASTER_ID(i2c->adap.nr)" here instead of more > > > > expensive

Re: [PATCH] i2c: exynos5: Preserve high speed master code

2021-02-17 Thread Jesper Nilsson
On Wed, Feb 17, 2021 at 09:07:47AM +0100, Krzysztof Kozlowski wrote: > On Tue, Feb 16, 2021 at 11:09:33PM +0100, Marten Lindahl wrote: > > > Any reason why not "|= MASTER_ID(i2c->adap.nr)" here instead of more > > > expensive IO read? It's quite important because your current code will > > >

Re: [PATCH] i2c: exynos5: Preserve high speed master code

2021-02-17 Thread Krzysztof Kozlowski
On Tue, Feb 16, 2021 at 11:09:33PM +0100, Marten Lindahl wrote: > > Any reason why not "|= MASTER_ID(i2c->adap.nr)" here instead of more > > expensive IO read? It's quite important because your current code will > > bitwise-or old I2C slave address with a new one... This should break > > during

Re: [PATCH] i2c: exynos5: Preserve high speed master code

2021-02-16 Thread Marten Lindahl
Hi Krzysztof! Thank you for your comments! Please see my reply below. I will send v2 in a moment. On Tue, Feb 16, 2021 at 08:51:41AM +0100, Krzysztof Kozlowski wrote: > On Mon, Feb 15, 2021 at 08:03:21PM +0100, Mårten Lindahl wrote: > > From: Mårten Lindahl > > > > When the controller starts

Re: [PATCH] i2c: exynos5: Preserve high speed master code

2021-02-15 Thread Krzysztof Kozlowski
On Mon, Feb 15, 2021 at 08:03:21PM +0100, Mårten Lindahl wrote: > From: Mårten Lindahl > > When the controller starts to send a message with the MASTER_ID field > set (high speed), the whole I2C_ADDR register is overwritten including > MASTER_ID as the SLV_ADDR_MAS field is set. Are you here

[PATCH] i2c: exynos5: Preserve high speed master code

2021-02-15 Thread Mårten Lindahl
From: Mårten Lindahl When the controller starts to send a message with the MASTER_ID field set (high speed), the whole I2C_ADDR register is overwritten including MASTER_ID as the SLV_ADDR_MAS field is set. This patch preserves already written fields in I2C_ADDR when writing SLV_ADDR_MAS.