]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mfd: tps65217: Fix mismatched interrupt number
authorMilo Kim <woogyom.kim@gmail.com>
Fri, 28 Oct 2016 12:37:02 +0000 (21:37 +0900)
committerTony Lindgren <tony@atomide.com>
Wed, 9 Nov 2016 21:37:24 +0000 (14:37 -0700)
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>
Signed-off-by: Tony Lindgren <tony@atomide.com>
include/linux/mfd/tps65217.h

index 4ccda8969639426d438404e526d690d754152f0e..3cbec4b2496a6a5cdbef0816aa92e157e8fcfd4a 100644 (file)
@@ -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