i2c: sun8i_rsb: Initialize chips in .child_pre_probe
authorSamuel Holland <samuel@sholland.org>
Fri, 18 Mar 2022 04:52:35 +0000 (23:52 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 4 Apr 2022 22:24:17 +0000 (23:24 +0100)
commitc9dd3caae3119c9f77081b5c1ef42553b44ddf20
tree8e5b29feb7c2061b67ee4b2ba7681a74361ea41b
parent07c411346cb2493e4f59a8affbd35f5efc2ec736
i2c: sun8i_rsb: Initialize chips in .child_pre_probe

Chips attached to the RSB bus require an initialization command before
they can be used. (Specifically, this command programs the chip's
runtime address.) The driver does this in its .probe_chip hook, under
the assumption that .probe_chip is called during child probe. This is
not the case; .probe_chip is only called by dm_i2c_probe, which is
intended for use by board-level code, not for chips with OF nodes.

Since this initialization command must be run before a child chip can be
used, do it before probing each child.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
drivers/i2c/sun8i_rsb.c