[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1413967540-27626-2-git-send-email-k.kozlowski@samsung.com>
Date: Wed, 22 Oct 2014 10:45:39 +0200
From: Krzysztof Kozlowski <k.kozlowski@...sung.com>
To: MyungJoo Ham <myungjoo.ham@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org
Cc: Kyungmin Park <kyungmin.park@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>
Subject: [PATCH RESEND 2/3] extcon: max77693: Request only specific interrupts
The driver was requesting all MUIC interrupts but then was masking most
of them manually at end of probe (with default_init_data). Since
default_init_data cannot be passed through DTS (no bindings for driver),
this was a conflicting behavior. First get everything, then mask what we
don't want.
This could change after adding DTS bindings for requesting specific
MUIC interrupts. Until then driver should request only these MUIC
interrupts which he is really interested in.
The commit does not introduce any functional change when the driver is
used with DTS (no platform data). However this changes the behavior with
platform data supplied. In such case the driver will request only 3
interrupts (ADC, ADC1K, ChgTyp). Platform data could still unmask other
interrupts but they won't be handled by the driver.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
---
drivers/extcon/extcon-max77693.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 863d088c9bdd..9d21e75a7032 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -44,19 +44,6 @@ static struct max77693_reg_data default_init_data[] = {
.addr = MAX77693_MUIC_REG_STATUS2,
.data = STATUS2_CHGDETRUN_MASK,
}, {
- /* INTMASK1 - Unmask [3]ADC1KM,[0]ADCM */
- .addr = MAX77693_MUIC_REG_INTMASK1,
- .data = INTMASK1_ADC1K_MASK
- | INTMASK1_ADC_MASK,
- }, {
- /* INTMASK2 - Unmask [0]ChgTypM */
- .addr = MAX77693_MUIC_REG_INTMASK2,
- .data = INTMASK2_CHGTYP_MASK,
- }, {
- /* INTMASK3 - Mask all of interrupts */
- .addr = MAX77693_MUIC_REG_INTMASK3,
- .data = 0x0,
- }, {
/* CDETCTRL2 */
.addr = MAX77693_MUIC_REG_CDETCTRL2,
.data = CDETCTRL2_VIDRMEN_MASK
@@ -135,21 +122,8 @@ struct max77693_muic_irq {
static struct max77693_muic_irq muic_irqs[] = {
{ MAX77693_MUIC_IRQ_INT1_ADC, "muic-ADC" },
- { MAX77693_MUIC_IRQ_INT1_ADC_LOW, "muic-ADCLOW" },
- { MAX77693_MUIC_IRQ_INT1_ADC_ERR, "muic-ADCError" },
{ MAX77693_MUIC_IRQ_INT1_ADC1K, "muic-ADC1K" },
{ MAX77693_MUIC_IRQ_INT2_CHGTYP, "muic-CHGTYP" },
- { MAX77693_MUIC_IRQ_INT2_CHGDETREUN, "muic-CHGDETREUN" },
- { MAX77693_MUIC_IRQ_INT2_DCDTMR, "muic-DCDTMR" },
- { MAX77693_MUIC_IRQ_INT2_DXOVP, "muic-DXOVP" },
- { MAX77693_MUIC_IRQ_INT2_VBVOLT, "muic-VBVOLT" },
- { MAX77693_MUIC_IRQ_INT2_VIDRM, "muic-VIDRM" },
- { MAX77693_MUIC_IRQ_INT3_EOC, "muic-EOC" },
- { MAX77693_MUIC_IRQ_INT3_CGMBC, "muic-CGMBC" },
- { MAX77693_MUIC_IRQ_INT3_OVP, "muic-OVP" },
- { MAX77693_MUIC_IRQ_INT3_MBCCHG_ERR, "muic-MBCCHG_ERR" },
- { MAX77693_MUIC_IRQ_INT3_CHG_ENABLED, "muic-CHG_ENABLED" },
- { MAX77693_MUIC_IRQ_INT3_BAT_DET, "muic-BAT_DET" },
};
/* Define supported accessory type */
--
1.9.1
--
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