sandbox: pmic: Correct i2c pmic emulator platdata method
authorSimon Glass <sjg@chromium.org>
Mon, 27 Jan 2020 15:49:53 +0000 (08:49 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 6 Feb 2020 02:33:46 +0000 (19:33 -0700)
commiteb7387ae14ef88ecba85d569de978da776ea4f09
tree322647ee00bba89ef97d1b5b19f137aac4d572e3
parentb83994dec7addcd5fecd0bfd2f734223eb0462f0
sandbox: pmic: Correct i2c pmic emulator platdata method

This currently reads the uclass's private data in the ofdata_to_platdata
method which is not allowed, since the uclass has not read it from the
device tree. This happens in the probe method.

Fix it by adding a probe() method and moving the code there.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/power/pmic/i2c_pmic_emul.c