]> git.baikalelectronics.ru Git - uboot.git/commit
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)
commitd4df0c932b23426a9249fe256d76870a0812e542
tree322647ee00bba89ef97d1b5b19f137aac4d572e3
parent6e4f0a6a66ab0acce5459c59f9e47d4a71729c0a
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