• Tony Lindgren's avatar
    mfd: twl6040: Fix device init errors for ACCCTL register · 8bdd8793
    Tony Lindgren authored
    [ Upstream commit 48171d0ea7caccf21c9ee3ae75eb370f2a756062 ]
    
    I noticed that we can get a -EREMOTEIO errors on at least omap4 duovero:
    
    twl6040 0-004b: Failed to write 2d = 19: -121
    
    And then any following register access will produce errors.
    
    There 2d offset above is register ACCCTL that gets written on twl6040
    powerup. With error checking added to the related regcache_sync() call,
    the -EREMOTEIO error is reproducable on twl6040 powerup at least
    duovero.
    
    To fix the error, we need to wait until twl6040 is accessible after the
    powerup. Based on tests on omap4 duovero, we need to wait over 8ms after
    powerup before register write will complete without failures. Let's also
    make sure we warn about possible errors too.
    
    Note that we have twl6040_patch[] reg_sequence with the ACCCTL register
    configuration and regcache_sync() will write the new value to ACCCTL.
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    8bdd8793
Name
Last commit
Last update
..
88pm800.c Loading commit data...
88pm805.c Loading commit data...
88pm80x.c Loading commit data...
88pm860x-core.c Loading commit data...
88pm860x-i2c.c Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
aat2870-core.c Loading commit data...
ab3100-core.c Loading commit data...
ab3100-otp.c Loading commit data...
ab8500-core.c Loading commit data...
ab8500-debugfs.c Loading commit data...
ab8500-gpadc.c Loading commit data...
ab8500-sysctrl.c Loading commit data...
abx500-core.c Loading commit data...
ac100.c Loading commit data...
act8945a.c Loading commit data...
adp5520.c Loading commit data...
altera-a10sr.c Loading commit data...
arizona-core.c Loading commit data...
arizona-i2c.c Loading commit data...
arizona-irq.c Loading commit data...
arizona-spi.c Loading commit data...
arizona.h Loading commit data...
as3711.c Loading commit data...
as3722.c Loading commit data...
asic3.c Loading commit data...
atmel-flexcom.c Loading commit data...
atmel-hlcdc.c Loading commit data...
atmel-smc.c Loading commit data...
axp20x-i2c.c Loading commit data...
axp20x-rsb.c Loading commit data...
axp20x.c Loading commit data...
bcm590xx.c Loading commit data...
bd9571mwv.c Loading commit data...
cros_ec.c Loading commit data...
cros_ec_acpi_gpe.c Loading commit data...
cros_ec_i2c.c Loading commit data...
cros_ec_spi.c Loading commit data...
cs47l24-tables.c Loading commit data...
cs5535-mfd.c Loading commit data...
da903x.c Loading commit data...
da9052-core.c Loading commit data...
da9052-i2c.c Loading commit data...
da9052-irq.c Loading commit data...
da9052-spi.c Loading commit data...
da9055-core.c Loading commit data...
da9055-i2c.c Loading commit data...
da9062-core.c Loading commit data...
da9063-core.c Loading commit data...
da9063-i2c.c Loading commit data...
da9063-irq.c Loading commit data...
da9150-core.c Loading commit data...
davinci_voicecodec.c Loading commit data...
db8500-prcmu.c Loading commit data...
dbx500-prcmu-regs.h Loading commit data...
dln2.c Loading commit data...
dm355evm_msp.c Loading commit data...
exynos-lpass.c Loading commit data...
ezx-pcap.c Loading commit data...
fsl-imx25-tsadc.c Loading commit data...
hi6421-pmic-core.c Loading commit data...
hi655x-pmic.c Loading commit data...
htc-i2cpld.c Loading commit data...
htc-pasic3.c Loading commit data...
intel-lpss-acpi.c Loading commit data...
intel-lpss-pci.c Loading commit data...
intel-lpss.c Loading commit data...
intel-lpss.h Loading commit data...
intel_msic.c Loading commit data...
intel_quark_i2c_gpio.c Loading commit data...
intel_soc_pmic_bxtwc.c Loading commit data...
intel_soc_pmic_chtwc.c Loading commit data...
intel_soc_pmic_core.c Loading commit data...
intel_soc_pmic_core.h Loading commit data...
intel_soc_pmic_crc.c Loading commit data...
ipaq-micro.c Loading commit data...
janz-cmodio.c Loading commit data...
jz4740-adc.c Loading commit data...
kempld-core.c Loading commit data...
lm3533-core.c Loading commit data...
lm3533-ctrlbank.c Loading commit data...
lp3943.c Loading commit data...
lp873x.c Loading commit data...
lp87565.c Loading commit data...
lp8788-irq.c Loading commit data...
lp8788.c Loading commit data...
lpc_ich.c Loading commit data...
lpc_sch.c Loading commit data...
max14577.c Loading commit data...
max77620.c Loading commit data...
max77686.c Loading commit data...
max77693.c Loading commit data...
max77843.c Loading commit data...
max8907.c Loading commit data...
max8925-core.c Loading commit data...
max8925-i2c.c Loading commit data...
max8997-irq.c Loading commit data...
max8997.c Loading commit data...
max8998-irq.c Loading commit data...
max8998.c Loading commit data...
mc13xxx-core.c Loading commit data...
mc13xxx-i2c.c Loading commit data...
mc13xxx-spi.c Loading commit data...
mc13xxx.h Loading commit data...
mcp-core.c Loading commit data...
mcp-sa11x0.c Loading commit data...
menelaus.c Loading commit data...
menf21bmc.c Loading commit data...
mfd-core.c Loading commit data...
motorola-cpcap.c Loading commit data...
mt6397-core.c Loading commit data...
mxs-lradc.c Loading commit data...
omap-usb-host.c Loading commit data...
omap-usb-tll.c Loading commit data...
omap-usb.h Loading commit data...
palmas.c Loading commit data...
pcf50633-adc.c Loading commit data...
pcf50633-core.c Loading commit data...
pcf50633-gpio.c Loading commit data...
pcf50633-irq.c Loading commit data...
qcom-pm8xxx.c Loading commit data...
qcom-spmi-pmic.c Loading commit data...
qcom_rpm.c Loading commit data...
rc5t583-irq.c Loading commit data...
rc5t583.c Loading commit data...
rdc321x-southbridge.c Loading commit data...
retu-mfd.c Loading commit data...
rk808.c Loading commit data...
rn5t618.c Loading commit data...
rt5033.c Loading commit data...
rtl8411.c Loading commit data...
rts5209.c Loading commit data...
rts5227.c Loading commit data...
rts5229.c Loading commit data...
rts5249.c Loading commit data...
rtsx_pcr.c Loading commit data...
rtsx_pcr.h Loading commit data...
rtsx_usb.c Loading commit data...
sec-core.c Loading commit data...
sec-irq.c Loading commit data...
si476x-cmd.c Loading commit data...
si476x-i2c.c Loading commit data...
si476x-prop.c Loading commit data...
sky81452.c Loading commit data...
sm501.c Loading commit data...
smsc-ece1099.c Loading commit data...
ssbi.c Loading commit data...
sta2x11-mfd.c Loading commit data...
stm32-lptimer.c Loading commit data...
stm32-timers.c Loading commit data...
stmpe-i2c.c Loading commit data...
stmpe-spi.c Loading commit data...
stmpe.c Loading commit data...
stmpe.h Loading commit data...
stw481x.c Loading commit data...
sun4i-gpadc.c Loading commit data...
sun6i-prcm.c Loading commit data...
syscon.c Loading commit data...
t7l66xb.c Loading commit data...
tc3589x.c Loading commit data...
tc6387xb.c Loading commit data...
tc6393xb.c Loading commit data...
ti-lmu.c Loading commit data...
ti_am335x_tscadc.c Loading commit data...
timberdale.c Loading commit data...
timberdale.h Loading commit data...
tmio_core.c Loading commit data...
tps6105x.c Loading commit data...
tps65010.c Loading commit data...
tps6507x.c Loading commit data...
tps65086.c Loading commit data...
tps65090.c Loading commit data...
tps65217.c Loading commit data...
tps65218.c Loading commit data...
tps6586x.c Loading commit data...
tps65910.c Loading commit data...
tps65911-comparator.c Loading commit data...
tps65912-core.c Loading commit data...
tps65912-i2c.c Loading commit data...
tps65912-spi.c Loading commit data...
tps68470.c Loading commit data...
tps80031.c Loading commit data...
twl-core.c Loading commit data...
twl-core.h Loading commit data...
twl4030-audio.c Loading commit data...
twl4030-irq.c Loading commit data...
twl4030-power.c Loading commit data...
twl6030-irq.c Loading commit data...
twl6040.c Loading commit data...
ucb1400_core.c Loading commit data...
ucb1x00-assabet.c Loading commit data...
ucb1x00-core.c Loading commit data...
ucb1x00-ts.c Loading commit data...
vexpress-sysreg.c Loading commit data...
viperboard.c Loading commit data...
vx855.c Loading commit data...
wl1273-core.c Loading commit data...
wm5102-tables.c Loading commit data...
wm5110-tables.c Loading commit data...
wm831x-auxadc.c Loading commit data...
wm831x-core.c Loading commit data...
wm831x-i2c.c Loading commit data...
wm831x-irq.c Loading commit data...
wm831x-otp.c Loading commit data...
wm831x-spi.c Loading commit data...
wm8350-core.c Loading commit data...
wm8350-gpio.c Loading commit data...
wm8350-i2c.c Loading commit data...
wm8350-irq.c Loading commit data...
wm8350-regmap.c Loading commit data...
wm8400-core.c Loading commit data...
wm8994-core.c Loading commit data...
wm8994-irq.c Loading commit data...
wm8994-regmap.c Loading commit data...
wm8994.h Loading commit data...
wm8997-tables.c Loading commit data...
wm8998-tables.c Loading commit data...