All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milo Kim <woogyom.kim@gmail.com>
To: bcousson@baylibre.com, Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
	Robert Nelson <robertcnelson@gmail.com>,
	Milo Kim <woogyom.kim@gmail.com>
Subject: [PATCH v2 8/8] mfd: tps65217: Fix mismatched interrupt number
Date: Fri, 28 Oct 2016 21:37:02 +0900	[thread overview]
Message-ID: <20161028123702.21849-9-woogyom.kim@gmail.com> (raw)
In-Reply-To: <20161028123702.21849-1-woogyom.kim@gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: woogyom.kim@gmail.com (Milo Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 8/8] mfd: tps65217: Fix mismatched interrupt number
Date: Fri, 28 Oct 2016 21:37:02 +0900	[thread overview]
Message-ID: <20161028123702.21849-9-woogyom.kim@gmail.com> (raw)
In-Reply-To: <20161028123702.21849-1-woogyom.kim@gmail.com>

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

  parent reply	other threads:[~2016-10-28 12:37 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28 12:36 [PATCH v2 0/8] Support TPS65217 PMIC interrupt in DT Milo Kim
2016-10-28 12:36 ` Milo Kim
2016-10-28 12:36 ` Milo Kim
2016-10-28 12:36 ` [PATCH v2 1/8] ARM: dts: tps65217: Specify the interrupt controller Milo Kim
2016-10-28 12:36   ` Milo Kim
2016-10-28 12:36 ` [PATCH v2 2/8] ARM: dts: tps65217: Add the charger device Milo Kim
2016-10-28 12:36   ` Milo Kim
2016-10-28 12:36   ` Milo Kim
2016-10-28 12:36 ` [PATCH v2 3/8] ARM: dts: tps65217: Add the power button device Milo Kim
2016-10-28 12:36   ` Milo Kim
2016-10-28 12:36 ` [PATCH v2 4/8] ARM: dts: am335x: Support the PMIC interrupt Milo Kim
2016-10-28 12:36   ` Milo Kim
2016-10-28 12:36 ` [PATCH v2 5/8] dt-bindings: mfd: Provide human readable defines for TPS65217 interrupts Milo Kim
2016-10-28 12:36   ` Milo Kim
     [not found]   ` <20161028123702.21849-6-woogyom.kim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-18 14:53     ` Lee Jones
2016-11-18 14:53       ` Lee Jones
2016-11-18 14:53       ` Lee Jones
2016-11-18 15:10       ` Tony Lindgren
2016-11-18 15:10         ` Tony Lindgren
2016-11-21 13:05         ` Milo Kim
2016-11-21 13:05           ` Milo Kim
2016-10-28 12:37 ` [PATCH v2 6/8] ARM: dts: am335x: Add the charger interrupt Milo Kim
2016-10-28 12:37   ` Milo Kim
2016-10-28 12:37 ` [PATCH v2 7/8] ARM: dts: am335x: Add the power button interrupt Milo Kim
2016-10-28 12:37   ` Milo Kim
2016-10-28 12:37 ` Milo Kim [this message]
2016-10-28 12:37   ` [PATCH v2 8/8] mfd: tps65217: Fix mismatched interrupt number Milo Kim
     [not found] ` <20161028123702.21849-1-woogyom.kim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-09 21:38   ` [PATCH v2 0/8] Support TPS65217 PMIC interrupt in DT Tony Lindgren
2016-11-09 21:38     ` Tony Lindgren
2016-11-09 21:38     ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161028123702.21849-9-woogyom.kim@gmail.com \
    --to=woogyom.kim@gmail.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=robertcnelson@gmail.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.