On Fri, Jan 02, 2026 at 06:06:51PM +0100, Bartosz Golaszewski wrote: > On Fri, Jan 2, 2026 at 4:10 PM Dmitry Baryshkov > <[email protected]> wrote: > > > > On Fri, 2 Jan 2026 at 13:07, Bartosz Golaszewski <[email protected]> wrote: > > > > > > On Wed, Dec 31, 2025 at 12:36 AM Dmitry Baryshkov > > > <[email protected]> wrote: > > > > > > > > The WCN39xx family of WiFi/BT chips incorporates a simple PMU, spreading > > > > voltages over internal rails. Implement support for using powersequencer > > > > for this family of ATH10k devices in addition to using regulators. > > > > > > > > Signed-off-by: Dmitry Baryshkov <[email protected]> > > > > --- > > > > > > [snip] > > > > > > > > > > > static void ath10k_snoc_wlan_disable(struct ath10k *ar) > > > > @@ -1762,7 +1779,27 @@ static int ath10k_snoc_probe(struct > > > > platform_device *pdev) > > > > goto err_release_resource; > > > > } > > > > > > > > - ar_snoc->num_vregs = ARRAY_SIZE(ath10k_regulators); > > > > + /* > > > > + * Backwards compatibility, ignore the defer error from pwrseq, > > > > if it > > > > + * should be used, we will get an error from regulator get. > > > > + */ > > > > > > Can you elaborate on this? I'm not exactly following. I suppose you > > > mean the regulator_get() will return -EPROBE_DEFER? One of the > > > supplies exposed by the PMU? > > > > Yes. devm_pwrseq_get() can return -EPROBE_DEFER in two cases: > > - it is not supposed to be used > > - it is supposed to be used, but the driver hasn't probed yet. > > > > Yes but normally driver core would still create a devlink between the > device binding to the PMU node and the consumer of its regulators -
fw_devlink, which are not mandatory, time out, etc. So, no, it is not granted that the PMU is always available during the probe. > this device - so we can expect that it will always be the first one, > no? Unless we need this driver to be firmware-agnostic. > > > There is no simple way to distinguish between these two cases, but: > > - if it is not supposed to be used, then regulator_bulk_get() will > > return all regulators as expected, continuing the probe > > - if it is supposed to be used, but wasn't probed yet, we will get > > -EPROBE_DEFER from regulator_bulk_get() too. > > > > I can write that in a comment, if you think that it makes the code more > > obvious. > > > > Yes, please make it more descriptive. Ideally I'd like to improve the > API to avoid such confusion in the future. The prolem is that we can't (or I don't see a way to). Power sequencing core has no way to distinguish these two cases. -- With best wishes Dmitry
