Re: [PATCH 2/5] regulator: dt-bindings: mt6359: Drop bogus vcn33_[12]_* split regulators
From: Chen-Yu Tsai <wenst@chromium.org>
Date: 2026-03-24 03:42:36
Also in:
linux-devicetree, linux-mediatek
On Mon, Mar 23, 2026 at 4:31 PM Krzysztof Kozlowski [off-list ref] wrote:
On 23/03/2026 09:26, Chen-Yu Tsai wrote:quoted
On Fri, Mar 20, 2026 at 5:54 PM Krzysztof Kozlowski [off-list ref] wrote:quoted
On Fri, Mar 20, 2026 at 03:24:35PM +0800, Chen-Yu Tsai wrote:quoted
vcn33_[12]_bt and vcn33_[12]_wifi refer to the same output. There are two enable bits in the registers so that BT and WiFi drivers can toggle them separately without any coordination. If either bit is set, then the regulator output is enabled. Unfortunately some of them are already referenced by in-tree device trees. To keep backward compatibility with them, keep the vcn33_*_btSo you drop "_wifi" regulators breaking the ABI, no?Indeed it is a breakage. I kept the *_bt part to cover all in-tree device trees. But the representation itself is broken, as explained in the commit message. I leave it to the platform maintainers to decide whether this "breakage" to fix the broken representation is acceptable. Note that there is a similar issue with the *_sshub and non _sshub regulators: there is only one actual output for the two. I'm still asking the vendor for hardware behavior specifics.quoted
quoted
regulator. Also combine them for a shorten regular expression pattern.Instead the duplicates should be deprecated and driver should still support the "_wifi" variants.But it doesn't really work in the driver. You cannot set different constraints on the two, especially conflicting constraints, and expect them to work. And if you set the voltage on one of them, the other will change as well.Of course, but now imagine a DTB with only *_wifi regulators and no *_bt.quoted
If we want the driver to support both with _sane_ behavior, we would need to introduce some sort of alias lookup for both reading constraints and resolving supplies. The driver registers _just_ one regulator, and both DT nodes resolve to it.Yes, either alias lookup or adjusting the regulator_desc before registering them, depending on the nodes. If I understood old code correctly, the point is that ABI allowed *_wifi without *_bt and this would be a working setup. Now it won't work.
OK. I will drop this part for now and just add the supplies. I'll resend the cleanup once I figure out how to do it in the regulator driver. ChenYu