Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

regulator: mt6363: Fix interrmittent timeout

Sometimes, the mt6363 regulator would fail to initialize and return with
a TIMEOUT error, so add an extra instruction to wake up the bus before
issuing the commands.

Fixes: 3c36965df808 ("regulator: Add support for MediaTek MT6363 SPMI PMIC Regulators")
Signed-off-by: Adam Ford <aford173@gmail.com>
Link: https://patch.msgid.link/20260210053708.17239-4-aford173@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Adam Ford and committed by
Mark Brown
1a4b0c99 914809c6

+8 -1
+8 -1
drivers/regulator/mt6363-regulator.c
··· 861 861 struct irq_domain *domain; 862 862 struct irq_fwspec fwspec; 863 863 struct spmi_device *sdev; 864 - int i, ret; 864 + int i, ret, val; 865 865 866 866 config.regmap = mt6363_spmi_register_regmap(dev); 867 867 if (IS_ERR(config.regmap)) ··· 869 869 "Cannot get regmap\n"); 870 870 config.dev = dev; 871 871 sdev = to_spmi_device(dev->parent); 872 + 873 + /* 874 + * The first read may fail if the bootloader sets sleep mode: wake up 875 + * this PMIC with W/R on the SPMI bus and ignore the first result. 876 + * This matches the MT6373 driver behavior. 877 + */ 878 + regmap_read(config.regmap, MT6363_TOP_TRAP, &val); 872 879 873 880 interrupt_parent = of_irq_find_parent(dev->of_node); 874 881 if (!interrupt_parent)