[U-Boot] [PATCH V2 08/13] sandbox: i2c: search child emul dev and check its uclass id

Simon Glass sjg at chromium.org
Fri May 15 15:56:34 CEST 2015


On 13 May 2015 at 05:38, Przemyslaw Marczak <p.marczak at samsung.com> wrote:
> The function get_emul() in sandbox i2c bus driver, always returns
> first child as i2c emul device. This may only work for i2c devices
> with a single child, which is an only i2c emul device.
>
> In case when i2c device has more than one child (e.g. PMIC), and
> one is i2c emul, then the function should search it by check uclass
> id for each child. This patch add this change to the get_emul().
>
> Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
> Cc: Simon Glass <sjg at chromium.org>
> Acked-by: Simon Glass <sjg at chromium.org>
> Tested on sandbox:
> Tested-by: Simon Glass <sjg at chromium.org>
> ---
> Changes V2:
> - none
>
> ---
>  drivers/i2c/sandbox_i2c.c | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list