Thomas Petazzoni 9f4d6f1642 i2c: mv64xxx: handle probe deferral for the clock
If a clock is registered by a platform driver and not by the
OF_CLK_DECLARE() mechanism, it might show up after the first attempt
to probe i2c-mv64xxx. In order to solve this, we need to handle
-EPROBE_PREFER as a special return value of devm_clk_get(), and return
the same error code from probe().

This gives us three situations:

 - There is no reference to a clock in the DT. In this case,
   devm_clk_get() returns an error that is not -EPROBE_DEFER
   (something like -ENODEV), and we continue the probing without
   enabling the clock.

 - There is a reference to the clock in the DT, and the clock is
   ready. devm_clk_get() returns a valid reference to the clock, and
   we prepare/enable it.

 - There is a reference to the clock in the DT, but the clock is not
   ready. devm_clk_get() returns -EPROBE_DEFER, and we exit from
   probe() with the same error code so that probe() is tried again
   later.

This is needed for Marvell Armada 7K/8K, where the clock driver is a
platform driver.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2016-04-27 19:03:02 +02:00
..
2016-04-02 01:17:36 +02:00
2016-03-21 13:14:16 -07:00
2016-03-24 23:13:48 -07:00
2016-03-16 08:36:55 -07:00
2016-03-25 08:52:25 -07:00
2016-03-17 13:47:50 -07:00
2016-04-07 22:11:08 +02:00
2016-03-23 17:20:59 -07:00
2016-03-24 19:57:15 -07:00
2016-03-18 10:15:11 -07:00
2016-04-10 17:38:55 -07:00
2016-04-08 15:52:45 -04:00
2016-03-18 10:15:11 -07:00
2016-03-24 22:49:08 -07:00
2016-04-09 12:00:42 -07:00
2016-03-20 15:40:32 -07:00
2016-04-09 12:23:02 -07:00
2016-03-17 13:05:09 -07:00
2016-04-04 11:18:00 +01:00