Em Tue, 29 Jun 2021 18:48:31 +0800 Axel Lin <axel.lin@xxxxxxxxxx> escreveu: > Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> 於 2021年6月29日 週二 下午6:31寫道: > > > platform drvdata can't be used inside the regulator driver, > > as this is already used by the MFD and SPMI drivers. > > > > Could you point out which part of the code set the platform drvdata? > My understanding is the mfd only set dev->platform_data rather than > dev->driver_data. > If you mean the dev_set_drvdata() call in hi6421_spmi_pmic_probe, it's the > parent device of the regulator pdev. It needs to be double-checked, but I guess the SPMI or the SPMI controller driver already uses it. See, there are 5 drivers involved, all of them using private data and passing data to child drivers, called on the order below: spmi hisi-spmi-controller hi6421-spmi-pmic mfd drivers: hi6421v600-irq hi6421-regulator If you're in doubt, try to apply this series, and then change the driver again to use platform data. You'll see that it will stop booting after initializing the first regulator. Thanks, Mauro