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: NHans de Goede <hdegoede@redhat.com> Acked-by: NIan Campbell <ijc@hellion.org.uk>
Showing
想要评论请 注册 或 登录