Home
last modified time | relevance | path

Searched hist:"3 c781190d11ca44752562867d76ccfb8d0a45ac3" (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/drivers/power/
H A Daxp221.c3c781190d11ca44752562867d76ccfb8d0a45ac3 Sun Jan 11 18:43:56 UTC 2015 Hans de Goede <hdegoede@redhat.com> sunxi: axp221: Protect axp221_init against multiple calls

The voltage setting code knows it needs to call axp221_init before calling
the various voltage setting functions.

But users of axp utility functions like axp221_get_sid() do not know this,
so the utility functions always call axp221_init() to ensure that the
p2wi / rsb setup magic has been done.

Since doing this repeatedly is quite expensive, add a check to axp221_init
so that it only does the initialization once.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>