[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 3 Mar 2015 08:02:51 -0800
From: Bjorn Andersson <bjorn.andersson@...ymobile.com>
To: Mark Brown <broonie@...nel.org>
CC: Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Rutland <mark.rutland@....com>,
Pawel Moll <pawel.moll@....com>,
Rob Herring <robh+dt@...nel.org>,
Stephen Boyd <sboyd@...eaurora.org>,
Andy Gross <agross@...eaurora.org>,
Chanwoo Choi <cw00.choi@...sung.com>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH 1/4] mfd: devicetree: bindings: Add Qualcomm RPM
regulator subnodes
On Tue 03 Mar 04:47 PST 2015, Mark Brown wrote:
> On Mon, Mar 02, 2015 at 08:25:37PM -0800, Bjorn Andersson wrote:
>
> > +- compatible:
> > + Usage: required
> > + Value type: <string>
> > + Definition: must be one of:
> > + "qcom,rpm-pm8058-regulators"
> > + "qcom,rpm-pm8901-regulators"
> > + "qcom,rpm-pm8921-regulators"
>
> Why do these subnodes have a compatible - do they ever appear except as
> a child of a parent of the same type of device?
The relationship with the parent node is 1:M;
in the case of 8960/8064 there is only one PMIC controlled by the RPM,
hence the dt will look like:
rpm {
compatible = "qcom,rpm-apq8960";
regulators {
compatible = "qcom,rpm-pm8921-regulators";
...
};
};
But for 8660, and later for e.g. 8974 we have something like:
rpm {
compatible = "qcom,rpm-msm8660";
pm8058-regulators {
compatible = "qcom,rpm-pm8058-regulators";
vdd_xxx-supply = <&pm8058_s4>;
...
};
pm8901-regulators {
compatible = "qcom,rpm-pm8901-regulators";
...
};
};
I intended to match these by name, having one rpm-regulator device
instance and using desc->regulators_node to match regulators in the
right node - with of_node being the rpm node.
But this doesn't really map to reality, as supplies are a property of
pm8058 and pm8901 and not of the rpm. I ended up writing some custom
device registering code to instantiate the right number of regulator
children and give each of them the right of_node etc.
But as several other of-based platforms have a compatible in their
regulators node I consider that a viable and cleaner solution.
Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists