On śro, 2014-10-22 at 18:04 +0900, Chanwoo Choi wrote:
> Hi Krzysztof,
> 
> The extcon-max77693.c was tested by all cables (mhl, hdmi, usb, usb-host, 
> dock for audio play, dock for mhl).
> with default_init_data register setting. If you deletes legacy 
> default_init_data[] register setting,
> extcon-max77693.c can not guarantee the operation of upper cables.
> 
> So, I want to maintain 'default_init_data' register setting value.

I understand. Is this driver used anywhere without DTS? Because the
difference will be only in non-DTS board.

With DTS the driver receives the same interrupts (before/after patch).

However I do not insist on this patch. It is merely a cleanup.

Best regards,
Krzysztof

> 
> Thanks,
> Chanwoo Choi
> 
> On 10/22/2014 05:45 PM, Krzysztof Kozlowski wrote:
> > 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.kozlow...@samsung.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 */
> > 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to