• Chen-Yu Tsai's avatar
    regulator: mt6358: Merge VCN33_* regulators · 65bae54e
    Chen-Yu Tsai authored
    The VCN33_BT and VCN33_WIFI regulators are actually the same regulator,
    having the same voltage setting and output pin. There are simply two
    enable bits that are ORed together to enable the regulator.
    
    Having two regulators representing the same output pin is misleading
    from a design matching standpoint, and also error-prone in driver
    implementations. If consumers try to set different voltages on either
    regulator, the one set later would override the one set before. There
    are ways around this, such as chaining them together and having the
    downstream one act as a switch. But given there's only one output pin,
    such a workaround doesn't match reality.
    
    Remove the VCN33_WIFI regulator. During the probe phase, have the driver
    sync the enable status of VCN33_WIFI to VCN33_BT. Also drop the suffix
    so that the regulator name matches the pin name in the datasheet.
    Signed-off-by: default avatarChen-Yu Tsai <wenst@chromium.org>
    Link: https://lore.kernel.org/r/20230609083009.2822259-4-wenst@chromium.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    65bae54e
mt6358-regulator.c 24.5 KB