Re: [PATCH 3/3] regulator: palmas: add support for external controlof rails

From: Stephen Warren
Date: Tue Aug 13 2013 - 15:11:40 EST

On 08/13/2013 01:33 AM, Laxman Dewangan wrote:
> Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable
> by register programming through I2C communication as well as it can be
> enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP.
> Add support for configuring these rails to be controlled by external control
> inputs. This is require to configure the rail's control register as well as
> configuration of resource register.
> Provide the external input names through parameter "roof-floor". Updated the
> DT binding document to details different value of the roof-floor.

> diff --git a/Documentation/devicetree/bindings/regulator/palmas-pmic.txt b/Documentation/devicetree/bindings/regulator/palmas-pmic.txt

> Optional sub-node properties:
> ti,warm-reset - maintain voltage during warm reset(boolean)
> - ti,roof-floor - control voltage selection by pin(boolean)
> + ti,roof-floor - control voltage selection by pin. If the
> + external pin is:
> + ENABLE1 then 0x1,
> + ENABLE2 then 0x2 or
> + NSLEEP then 0x4.

You can probably write 1, 2, 4 instead of 0x1, 0x2, 0x4.

This change doesn't look backwards-compatible and hence breaks the DT ABI.

Instead, can you allow an empty property to mean "yes" (in which case
the binding document must specify which pin), and *also* allow a
specific value to be provided as the enhancement? The binding document
would need to explicitly document both these options. Looking at the
code change, I think this property only applies to some pins. the
binding document should probably specify which, or at least mention this
fact and tell the reader to consult the HW documentation to see where
it's applicable.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at