i2c: i2c-cadence: Initialize configuration before probing devices
authorMike Looijmans <mike.looijmans@topic.nl>
Mon, 16 Jan 2017 14:49:38 +0000 (15:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Dec 2017 21:01:53 +0000 (22:01 +0100)
commit6bd89953fb1f8e45dc9f93ab59f50c950ef44187
treec8b631e93dd78c39add280157a52e676d636a63e
parentfe8bdc9b79ee644177715a9f72a7b332dd881847
i2c: i2c-cadence: Initialize configuration before probing devices

[ 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.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-cadence.c