Patch "i2c: i2c-cadence: Initialize configuration before probing devices" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
i2c: i2c-cadence: Initialize configuration before probing devices
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
i2c-i2c-cadence-initialize-configuration-before-probing-devices.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Dec 6 17:39:55 CET 2017
From: Mike Looijmans <[email protected]>
Date: Mon, 16 Jan 2017 15:49:38 +0100
Subject: i2c: i2c-cadence: Initialize configuration before probing devices
From: Mike Looijmans <[email protected]>
[ Upstream commit 0e1929dedea36781e25902118c93edd8d8f09af1 ]
The cadence I2C driver calls cdns_i2c_writereg(..) to setup a workaround in the controller, but did so after calling i2c_add_adapter() which starts probing devices on the bus. Change the order so that the configuration is completely finished before using the adapter.
--- drivers/i2c/busses/i2c-cadence.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/i2c/busses/i2c-cadence.c +4 -4
@@ -962,10 +962,6 @@ static int cdns_i2c_probe(struct platfor goto err_clk_dis; } - ret =i2c_add_adapter (&id->adap); -if (ret <0 ) - goto err_clk_dis; -/* * Cadence I2C controller has a bug wherein it generates * invalid read transaction after HW timeout in master receiver mode.
@@ -975,6 +971,10 @@ static int cdns_i2c_probe(struct platfor*/ cdns_i2c_writereg (CDNS_I2C_TIMEOUT_MAX ,CDNS_I2C_TIME_OUT_OFFSET ); + ret =i2c_add_adapter (&id->adap); +if (ret <0 ) + goto err_clk_dis; +dev_info (&pdev->dev,"%u kHz mmio %08lx irq %d\n" , id->i2c_clk /1000 , (unsigned long )r_mem->start, id->irq);
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/i2c-i2c-cadence-initialize-configuration-before-probing-devices.patch