Patch "mfd: ab8500-sysctrl: Handle probe deferral" has been added to the 4.9-stable tree
This is a note to let you know that I've just added the patch titled
mfd: ab8500-sysctrl: Handle probe deferral
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mfd-ab8500-sysctrl-handle-probe-deferral.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Nov 6 10:07:35 CET 2017
From: Linus Walleij <[email protected]>
Date: Sat, 7 Oct 2017 22:36:48 +0000
Subject: mfd: ab8500-sysctrl: Handle probe deferral
From: Linus Walleij <[email protected]>
[ 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.
--- drivers/mfd/ab8500-sysctrl.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/mfd/ab8500-sysctrl.c +11 -3
@@ -98,7 +98,7 @@ int ab8500_sysctrl_read(u16 reg, u8 *valu8 bank;if (sysctrl_dev ==NULL ) -return -EINVAL ; +return -EPROBE_DEFER ; bank = (reg >>8 );if (!valid_bank (bank))
@@ -114,11 +114,13 @@ int ab8500_sysctrl_write(u16 reg, u8 masu8 bank;if (sysctrl_dev ==NULL ) -return -EINVAL ; +return -EPROBE_DEFER ; bank = (reg >>8 ); -if (!valid_bank (bank)) +if (!valid_bank (bank)) { +pr_err ("invalid bank\n" );return -EINVAL ; + }return abx500_mask_and_set_register_interruptible (sysctrl_dev, bank, (u8)(reg &0xFF ), mask, value);
@@ -145,9 +147,15 @@ static int ab8500_sysctrl_remove(structreturn 0 ; } +static const struct of_device_id ab8500_sysctrl_match[] = { + { .compatible ="stericsson,ab8500-sysctrl" , }, + {} +}; +static struct platform_driver ab8500_sysctrl_driver = { .driver = { .name ="ab8500-sysctrl" , + .of_match_table = ab8500_sysctrl_match, }, .probe = ab8500_sysctrl_probe, .remove = ab8500_sysctrl_remove,
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/mfd-ab8500-sysctrl-handle-probe-deferral.patch queue-4.9/gpio-mcp23s08-select-regmap-regmap_i2c-to-fix-build-error.patch