Re: [PATCH v9 1/8] ASoC: dt-bindings: sun50i-codec-analog: Add headphone amp regulator supply

From: Mark Brown
Date: Fri Nov 23 2018 - 08:31:40 EST


On Thu, Nov 22, 2018 at 04:32:41PM +0100, Maxime Ripard wrote:
> On Thu, Nov 22, 2018 at 06:23:18PM +0800, Chen-Yu Tsai wrote:

> > +- cpvdd-supply: Regulator supply for the headphone amplifier

> I guess we should make this optional, since even if it's missing, it's
> going to create a dummy regulator. and that allows to have backward
> compatibility.

Regulators should never be marked as optional unless they can be
physically absent. It is true that Linux has code to handle partially
defined device trees but we shouldn't rely on other OSs having similar
code and it's better practice to have board device trees be fully
specified, it means that if we need the regulator information for some
future thing it's more likely to be there and it's less likely that bugs
which do things like cause the regulator to be powered off incorrectly
will be introduced in future.

Attachment: signature.asc
Description: PGP signature