mfd: ab8500-sysctrl: Handle probe deferral
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 7 Oct 2017 22:36:48 +0000 (22:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2017 09:08:33 +0000 (10:08 +0100)
commitb15965b00686e3fb7c489f5cf10bba11ad74339a
tree336cb2e2cc7ee6e57b227c4d3b4ba0f80a938688
parent1bd47ceafbd72aa91a3ec00140bb35d495daf837
mfd: ab8500-sysctrl: Handle probe deferral

[ Upstream commit 7e9c40c63933a643908d686bd89dfc2315e8c70a ]

In the current boot, clients making use of the AB8500 sysctrl
may be probed before the ab8500-sysctrl driver. This gives them
-EINVAL, but should rather give -EPROBE_DEFER.

Before this, the abx500 clock driver didn't probe properly,
and as a result the codec driver in turn using the clocks did
not probe properly. After this patch, everything probes
properly.

Also add OF compatible-string probing. This driver is all
device tree, so let's just make a drive-by-fix of that as
well.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/ab8500-sysctrl.c