Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1511105 > unrolled thread

[PATCH v2 0/8] Support TPS65217 PMIC interrupt in DT

Started byMilo Kim <woogyom.kim@gmail.com>
First post2016-10-28 14:40 +0200
Last post2016-11-09 22:40 +0100
Articles 6 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/8] Support TPS65217 PMIC interrupt in DT Milo Kim <woogyom.kim@gmail.com> - 2016-10-28 14:40 +0200
    [PATCH v2 3/8] ARM: dts: tps65217: Add the power button device Milo Kim <woogyom.kim@gmail.com> - 2016-10-28 14:40 +0200
    [PATCH v2 2/8] ARM: dts: tps65217: Add the charger device Milo Kim <woogyom.kim@gmail.com> - 2016-10-28 14:40 +0200
    [PATCH v2 5/8] dt-bindings: mfd: Provide human readable defines for TPS65217 interrupts Milo Kim <woogyom.kim@gmail.com> - 2016-10-28 14:40 +0200
    [PATCH v2 8/8] mfd: tps65217: Fix mismatched interrupt number Milo Kim <woogyom.kim@gmail.com> - 2016-10-28 14:40 +0200
    Re: [PATCH v2 0/8] Support TPS65217 PMIC interrupt in DT Tony Lindgren <tony@atomide.com> - 2016-11-09 22:40 +0100

#1511105 — [PATCH v2 0/8] Support TPS65217 PMIC interrupt in DT

FromMilo Kim <woogyom.kim@gmail.com>
Date2016-10-28 14:40 +0200
Subject[PATCH v2 0/8] Support TPS65217 PMIC interrupt in DT
Message-ID<sxeBX-8kL-3@gated-at.bofh.it>
TPS65217 interrupt events include push button pressed/released, USB and AC 
voltage status change. AM335x bone based boards (like BB, BBB, BBG) have 
common PMIC interrupt pin (named NMI) of AM335x core.

This patchset support interrupts in device tree file.

v2:
  Add missing a dt-binding header
  Use #defines instead of enum type for interrupt numbers

Milo Kim (8):
  ARM: dts: tps65217: Specify the interrupt controller
  ARM: dts: tps65217: Add the charger device
  ARM: dts: tps65217: Add the power button device
  ARM: dts: am335x: Support the PMIC interrupt
  dt-bindings: mfd: Provide human readable defines for TPS65217
    interrupts
  ARM: dts: am335x: Add the charger interrupt
  ARM: dts: am335x: Add the power button interrupt
  mfd: tps65217: Fix mismatched interrupt number

 arch/arm/boot/dts/am335x-bone-common.dtsi | 17 +++++++++++++++++
 arch/arm/boot/dts/tps65217.dtsi           | 12 ++++++++++++
 include/dt-bindings/mfd/tps65217.h        | 26 ++++++++++++++++++++++++++
 include/linux/mfd/tps65217.h              | 11 +++++------
 4 files changed, 60 insertions(+), 6 deletions(-)
 create mode 100644 include/dt-bindings/mfd/tps65217.h

-- 
2.9.3

[toc] | [next] | [standalone]


#1511106 — [PATCH v2 3/8] ARM: dts: tps65217: Add the power button device

FromMilo Kim <woogyom.kim@gmail.com>
Date2016-10-28 14:40 +0200
Subject[PATCH v2 3/8] ARM: dts: tps65217: Add the power button device
Message-ID<sxeBY-8kL-25@gated-at.bofh.it>
In reply to#1511105
Support the power button driver and disable it by default.

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
---
 arch/arm/boot/dts/tps65217.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/tps65217.dtsi b/arch/arm/boot/dts/tps65217.dtsi
index 8f77d0d..02de56b 100644
--- a/arch/arm/boot/dts/tps65217.dtsi
+++ b/arch/arm/boot/dts/tps65217.dtsi
@@ -21,6 +21,11 @@
 		status = "disabled";
 	};
 
+	pwrbutton {
+		compatible = "ti,tps65217-pwrbutton";
+		status = "disabled";
+	};
+
 	regulators {
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1511107 — [PATCH v2 2/8] ARM: dts: tps65217: Add the charger device

FromMilo Kim <woogyom.kim@gmail.com>
Date2016-10-28 14:40 +0200
Subject[PATCH v2 2/8] ARM: dts: tps65217: Add the charger device
Message-ID<sxeBY-8kL-43@gated-at.bofh.it>
In reply to#1511105
Support the charger driver and disable it by default.

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
---
 arch/arm/boot/dts/tps65217.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/tps65217.dtsi b/arch/arm/boot/dts/tps65217.dtsi
index 27935f8..8f77d0d 100644
--- a/arch/arm/boot/dts/tps65217.dtsi
+++ b/arch/arm/boot/dts/tps65217.dtsi
@@ -16,6 +16,11 @@
 	interrupt-controller;
 	#interrupt-cells = <1>;
 
+	charger {
+		compatible = "ti,tps65217-charger";
+		status = "disabled";
+	};
+
 	regulators {
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1511108 — [PATCH v2 5/8] dt-bindings: mfd: Provide human readable defines for TPS65217 interrupts

FromMilo Kim <woogyom.kim@gmail.com>
Date2016-10-28 14:40 +0200
Subject[PATCH v2 5/8] dt-bindings: mfd: Provide human readable defines for TPS65217 interrupts
Message-ID<sxeBY-8kL-35@gated-at.bofh.it>
In reply to#1511105
TPS65217 supports three interrupt sources. This patch enables assigning
each IRQ number in the charger and power button node. Then corresponding
IRQ will be requested by each driver.

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
---
 include/dt-bindings/mfd/tps65217.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 include/dt-bindings/mfd/tps65217.h

diff --git a/include/dt-bindings/mfd/tps65217.h b/include/dt-bindings/mfd/tps65217.h
new file mode 100644
index 0000000..cafb9e6
--- /dev/null
+++ b/include/dt-bindings/mfd/tps65217.h
@@ -0,0 +1,26 @@
+/*
+ * This header provides macros for TI TPS65217 DT bindings.
+ *
+ * Copyright (C) 2016 Texas Instruments
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __DT_BINDINGS_TPS65217_H__
+#define __DT_BINDINGS_TPS65217_H__
+
+#define TPS65217_IRQ_USB	0
+#define TPS65217_IRQ_AC		1
+#define TPS65217_IRQ_PB		2
+
+#endif
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1511110 — [PATCH v2 8/8] mfd: tps65217: Fix mismatched interrupt number

FromMilo Kim <woogyom.kim@gmail.com>
Date2016-10-28 14:40 +0200
Subject[PATCH v2 8/8] mfd: tps65217: Fix mismatched interrupt number
Message-ID<sxeBY-8kL-47@gated-at.bofh.it>
In reply to#1511105
Enum value of 'tps65217_irq_type' is not matched with DT parsed hwirq
number[*].

The MFD driver gets the IRQ data by referencing hwirq, but the value is
different. So, irq_to_tps65217_irq() returns mismatched IRQ data.
Eventually, the power button driver enables not PB but USB interrupt
when it is probed.

According to the TPS65217 register map[**], USB interrupt is the LSB.
This patch defines synchronized IRQ value.

[*]  include/dt-bindings/mfd/tps65217.h
[**] http://www.ti.com/lit/ds/symlink/tps65217.pdf

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
---
 include/linux/mfd/tps65217.h | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h
index 4ccda89..3cbec4b 100644
--- a/include/linux/mfd/tps65217.h
+++ b/include/linux/mfd/tps65217.h
@@ -234,12 +234,11 @@ struct tps65217_bl_pdata {
 	int dft_brightness;
 };
 
-enum tps65217_irq_type {
-	TPS65217_IRQ_PB,
-	TPS65217_IRQ_AC,
-	TPS65217_IRQ_USB,
-	TPS65217_NUM_IRQ
-};
+/* Interrupt numbers */
+#define TPS65217_IRQ_USB		0
+#define TPS65217_IRQ_AC			1
+#define TPS65217_IRQ_PB			2
+#define TPS65217_NUM_IRQ		3
 
 /**
  * struct tps65217_board - packages regulator init data
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1518504

FromTony Lindgren <tony@atomide.com>
Date2016-11-09 22:40 +0100
Message-ID<sBIL7-4mX-1@gated-at.bofh.it>
In reply to#1511105
* Milo Kim <woogyom.kim@gmail.com> [161028 05:38]:
> TPS65217 interrupt events include push button pressed/released, USB and AC 
> voltage status change. AM335x bone based boards (like BB, BBB, BBG) have 
> common PMIC interrupt pin (named NMI) of AM335x core.
> 
> This patchset support interrupts in device tree file.

Applying into omap-for-v4.10/dt except the last patch I'll apply into
omap-for-v4.10/fixes-not-urgent.

Regards,

Tony

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web