diff mbox

[1/2] PM / OPP: compatible is an optional property

Message ID be2c4fb0bb58f5b29facbc6f5aaf3dca13cf209e.1474450324.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Sept. 21, 2016, 9:32 a.m. UTC
It was never compulsory to have a compatible string in the OPP table.
Fix the documentation to mark it optional.

Also update its description a bit.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

---
 Documentation/devicetree/bindings/opp/opp.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.7.1.410.g6faf27b

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Viresh Kumar Sept. 23, 2016, 5:15 a.m. UTC | #1
On 22-09-16, 12:24, Stephen Boyd wrote:
> On 09/21/2016 02:32 AM, Viresh Kumar wrote:

> > It was never compulsory to have a compatible string in the OPP table.

> > Fix the documentation to mark it optional.

> >

> > Also update its description a bit.

> >

> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

> > ---

> 

> Why? I'd prefer the compatible string to be required so we know what

> sort of node it is.


Okay, the code doesn't have any checks for it then and that needs to be fixed.

Just for my clarity, for platforms with special OPP bindings and so a different
compatible string like: "operating-points-v2-XYZ", should the compatible string
contain both "operating-points-v2" and the above one? It would be easier to
check for "operating-points-v2" in that case from core code.

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Viresh Kumar Sept. 26, 2016, 5:07 a.m. UTC | #2
On 23-09-16, 14:59, Rob Herring wrote:
> On Wed, Sep 21, 2016 at 03:02:50PM +0530, Viresh Kumar wrote:

> > Multiple regulators per device aren't supported yet by the kernel code

> > and the bindings provided in documentation aren't sufficient to handle

> > that case (as there is no way for kernel code to link multiple

> > voltage/current values to a power supply).

> 

> What do you mean? Because the supplies are in the cpu node?


Not just that. For example if two supplies are present in CPU node like:
ABC-supply and XYZ-supply. And the values present in OPP node are like:

               opp00 {
                       opp-hz = /bits/ 64 <1700000000>;
                        /*                     ABC supply                XYZ        supply */
                       opp-microvolt = <1300000 1300000 1300000>, <1400000 1400000 1400000>;
                       opp-microamp = <70000>;
                       clock-latency-ns = <30>;
                       opp-suspend;
               };


Then the code can get regulators with those names (ABC and XYZ), but it can't
figure out which triplet in the "opp-microvolt" property belongs to which
supply.

I am working on some solution to that, but wanted to keep the entire series self
sufficient and so removing the leftovers first in this patch.

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
index ee91cbdd95ee..5eab6f0215d1 100644
--- a/Documentation/devicetree/bindings/opp/opp.txt
+++ b/Documentation/devicetree/bindings/opp/opp.txt
@@ -55,14 +55,14 @@  This describes the OPPs belonging to a device. This node can have following
 properties:
 
 Required properties:
-- compatible: Allow OPPs to express their compatibility. It should be:
-  "operating-points-v2".
-
 - OPP nodes: One or more OPP nodes describing voltage-current-frequency
   combinations. Their name isn't significant but their phandle can be used to
   reference an OPP.
 
 Optional properties:
+- compatible: Allow OPPs to express their compatibility. It should be
+  "operating-points-v2" or a vendor specific string.
+
 - opp-shared: Indicates that device nodes using this OPP Table Node's phandle
   switch their DVFS state together, i.e. they share clock/voltage/current lines.
   Missing property means devices have independent clock/voltage/current lines,