Re: [PATCH v1 2/6] PCI: brcmstb: Add control of EP voltage regulator(s)

2020-11-30 Thread Mark Brown
On Fri, Nov 27, 2020 at 03:26:53PM -0500, Jim Quinlan wrote: > On Thu, Nov 26, 2020 at 6:49 AM Mark Brown wrote: > > Does PCI allow supplies to be physically absent? If not then the driver > > shouldn't be using regulator_get_optional() and much of the code here > > can be deleted. > First, as

Re: [PATCH v1 2/6] PCI: brcmstb: Add control of EP voltage regulator(s)

2020-11-27 Thread Jim Quinlan
On Thu, Nov 26, 2020 at 6:49 AM Mark Brown wrote: > > On Wed, Nov 25, 2020 at 02:24:19PM -0500, Jim Quinlan wrote: > > > + for (i = 0; i < PCIE_REGULATORS_MAX; i++) { > > + ep_reg = devm_regulator_get_optional(dev, > > ep_regulator_names[i]); > > + if (IS_ERR(ep_reg))

Re: [PATCH v1 2/6] PCI: brcmstb: Add control of EP voltage regulator(s)

2020-11-26 Thread Mark Brown
On Wed, Nov 25, 2020 at 02:24:19PM -0500, Jim Quinlan wrote: > + for (i = 0; i < PCIE_REGULATORS_MAX; i++) { > + ep_reg = devm_regulator_get_optional(dev, > ep_regulator_names[i]); > + if (IS_ERR(ep_reg)) { Does PCI allow supplies to be physically absent? If not

[PATCH v1 2/6] PCI: brcmstb: Add control of EP voltage regulator(s)

2020-11-25 Thread Jim Quinlan
Control of EP regulators by the RC is needed because of the chicken-and-egg situation: although the regulator is "owned" by the EP and would be best handled on its driver, the EP cannot be discovered and probed unless its regulator is already turned on. Signed-off-by: Jim Quinlan ---