diff mbox

[v2,1/2] ARM: dts: add dtsi for palmas

Message ID 1370855059-5342-2-git-send-email-j-keerthy@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

J, KEERTHY June 10, 2013, 9:04 a.m. UTC
Adds palmas mfd and palmas regulator nodes.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: J Keerthy <j-keerthy@ti.com>
---
 arch/arm/boot/dts/palmas.dtsi |   98 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 98 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/palmas.dtsi

Comments

J, KEERTHY June 10, 2013, 9:24 a.m. UTC | #1
Hi Laxman,

> -----Original Message-----
> From: Laxman Dewangan [mailto:ldewangan@nvidia.com]
> Sent: Monday, June 10, 2013 2:55 PM
> To: J, KEERTHY
> Cc: Cousson, Benoit; devicetree-discuss@lists.ozlabs.org; linux-
> omap@vger.kernel.org; linux-kernel@vger.kernel.org;
> grant.likely@secretlab.ca; swarren@wwwdotorg.org; Stephen Warren;
> sameo@linux.intel.com; gg@slimlogic.co.uk; lee.jones@linaro.org
> Subject: Re: [PATCH v2 1/2] ARM: dts: add dtsi for palmas
> 
> On Monday 10 June 2013 02:34 PM, J Keerthy wrote:
> > Adds palmas mfd and palmas regulator nodes.
> >
> > Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
> > Signed-off-by: J Keerthy <j-keerthy@ti.com>
> > ---
> >   arch/arm/boot/dts/palmas.dtsi |   98
> +++++++++++++++++++++++++++++++++++++++++
> 
> Hi Keerthy,
> Can you please add documentation for dt binding:
> Documentation/devicetree/bindings/mfd
> 

https://lkml.org/lkml/2013/6/6/25

It is based on this.

> Most of time we refer from this document for dt population.
> 
> Thanks,
> Laxman
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laxman Dewangan June 10, 2013, 9:25 a.m. UTC | #2
On Monday 10 June 2013 02:34 PM, J Keerthy wrote:
> Adds palmas mfd and palmas regulator nodes.
>
> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
> Signed-off-by: J Keerthy <j-keerthy@ti.com>
> ---
>   arch/arm/boot/dts/palmas.dtsi |   98 +++++++++++++++++++++++++++++++++++++++++

Hi Keerthy,
Can you please add documentation for dt binding:
Documentation/devicetree/bindings/mfd

Most of time we refer from this document for dt population.

Thanks,
Laxman
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren June 10, 2013, 4:29 p.m. UTC | #3
On 06/10/2013 03:04 AM, J Keerthy wrote:
> Adds palmas mfd and palmas regulator nodes.

Nits:

Well, you're really adding files that provide the nodes, not the nodes
themselves.

Palmas and MFD should be correctly capitalized.

> diff --git a/arch/arm/boot/dts/palmas.dtsi b/arch/arm/boot/dts/palmas.dtsi

> +&palmas {
...
> +	palmas_pmic {
...
> +		ti,ldo6-vibrator;

Isn't that board-specific? I don't know the HW well enough to say, but I
assume that since there's a property, the whole point must be that some
boards want it set and some don't.

> +		regulators {
> +			smps123_reg: smps123 {
> +				regulator-name = "smps123";
> +			};

So the node labels here duplicate those in omap5-uevm.dts in patch 2/2.
While dtc allows this, I don't think there's much point duplicating the
labels. I'd tend to only put the labels in omap5-uevm.dts and not put
them here. That will completely avoid the possibility of the labels in
this file from conflicting with any other labels in any top-level
board.dts file.

I also wonder if this file is actually terribly useful. The only thing
that this file provides is the regulator-name property. It seems simpler
just to put that into each board.dts file. The added advantage of doing
that, is that if a board doesn't use a particular regulator, the node
won't appear, and the regulator won't get registered.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
J, KEERTHY June 11, 2013, 4:10 a.m. UTC | #4
Hi Stephen,

> -----Original Message-----
> From: Stephen Warren [mailto:swarren@wwwdotorg.org]
> Sent: Monday, June 10, 2013 9:59 PM
> To: J, KEERTHY
> Cc: Cousson, Benoit; devicetree-discuss@lists.ozlabs.org; linux-
> omap@vger.kernel.org; linux-kernel@vger.kernel.org;
> ldewangan@nvidia.com; grant.likely@secretlab.ca; swarren@nvidia.com;
> sameo@linux.intel.com; gg@slimlogic.co.uk; lee.jones@linaro.org
> Subject: Re: [PATCH v2 1/2] ARM: dts: add dtsi for palmas
> 
> On 06/10/2013 03:04 AM, J Keerthy wrote:
> > Adds palmas mfd and palmas regulator nodes.
> 
> Nits:
> 
> Well, you're really adding files that provide the nodes, not the nodes
> themselves.
> 
> Palmas and MFD should be correctly capitalized.

Ok.

> 
> > diff --git a/arch/arm/boot/dts/palmas.dtsi
> > b/arch/arm/boot/dts/palmas.dtsi
> 
> > +&palmas {
> ...
> > +	palmas_pmic {
> ...
> > +		ti,ldo6-vibrator;
> 
> Isn't that board-specific? I don't know the HW well enough to say, but
> I assume that since there's a property, the whole point must be that
> some boards want it set and some don't.
> 

Yes. I will make this part of board file.

> > +		regulators {
> > +			smps123_reg: smps123 {
> > +				regulator-name = "smps123";
> > +			};
> 
> So the node labels here duplicate those in omap5-uevm.dts in patch 2/2.
> While dtc allows this, I don't think there's much point duplicating the
> labels. I'd tend to only put the labels in omap5-uevm.dts and not put
> them here. That will completely avoid the possibility of the labels in
> this file from conflicting with any other labels in any top-level
> board.dts file.
> 
> I also wonder if this file is actually terribly useful. The only thing
> that this file provides is the regulator-name property. It seems
> simpler just to put that into each board.dts file. The added advantage
> of doing that, is that if a board doesn't use a particular regulator,
> the node won't appear, and the regulator won't get registered.

Ok. I will transfer the entire code to omap5-uevm.dts.

Thanks for the review comments.

Regards,
Keerthy
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" 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/arch/arm/boot/dts/palmas.dtsi b/arch/arm/boot/dts/palmas.dtsi
new file mode 100644
index 0000000..4c5162f
--- /dev/null
+++ b/arch/arm/boot/dts/palmas.dtsi
@@ -0,0 +1,98 @@ 
+/*
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+&palmas {
+	compatible = "ti,palmas";
+	interrupt-controller;
+	#interrupt-cells = <2>;
+
+	palmas_pmic {
+		compatible = "ti,palmas-pmic";
+		interrupt-parent = <&palmas>;
+		interrupts = <14 IRQ_TYPE_NONE>;
+		interrupt-name = "short-irq";
+
+		ti,ldo6-vibrator;
+
+		regulators {
+			smps123_reg: smps123 {
+				regulator-name = "smps123";
+			};
+
+			smps45_reg: smps45 {
+				regulator-name = "smps45";
+			};
+
+			smps6_reg: smps6 {
+				regulator-name = "smps6";
+			};
+
+			smps7_reg: smps7 {
+				regulator-name = "smps7";
+			};
+
+			smps8_reg: smps8 {
+				regulator-name = "smps8";
+			};
+
+			smps9_reg: smps9 {
+				regulator-name = "smps9";
+			};
+
+			smps10_reg: smps10 {
+				regulator-name = "smps10";
+			};
+
+			ldo1_reg: ldo1 {
+				regulator-name = "ldo1";
+			};
+
+			ldo2_reg: ldo2 {
+				regulator-name = "ldo2";
+			};
+
+			ldo3_reg: ldo3 {
+				regulator-name = "ldo3";
+			};
+
+			ldo4_reg: ldo4 {
+				regulator-name = "ldo4";
+			};
+
+			ldo5_reg: ldo5 {
+				regulator-name = "ldo5";
+			};
+
+			ldo6_reg: ldo6 {
+				regulator-name = "ldo6";
+			};
+
+			ldo7_reg: ldo7 {
+				regulator-name = "ldo7";
+			};
+
+			ldo8_reg: ldo8 {
+				regulator-name = "ldo8";
+			};
+
+			ldo9_reg: ldo9 {
+				regulator-name = "ldo9";
+			};
+
+			ldoln_reg: ldoln {
+				regulator-name = "ldoln";
+			};
+
+			ldousb_reg: ldousb {
+				regulator-name = "ldousb";
+			};
+		};
+	};
+};