Messages in this thread | | | From | "Pallala, Ramakrishna" <> | Subject | RE: [PATCH v3 2/2] extcon-axp288: Add axp288 extcon driver support | Date | Mon, 27 Apr 2015 13:19:53 +0000 |
| |
Hi Choi,
Please see my response below.
> >> > >>> + ret = PTR_ERR(info->otg); > >>> + return ret; > >>> + } > >>> + > >>> + for (i = 0; i < EXTCON_IRQ_END; i++) { > >>> + pirq = platform_get_irq(pdev, i); > >>> + info->irq[i] = regmap_irq_get_virq(info->regmap_irqc, pirq); > >>> + if (info->irq[i] < 0) { > >>> + dev_warn(&pdev->dev, > >>> + "regmap_irq get virq failed for IRQ %d: %d\n", > >>> + pirq, info->irq[i]); > >>> + info->irq[i] = -1; > >>> + goto intr_reg_failed; > >>> + } > >> > >> Need to add blank line > > Not sure how it came here...i don't see the line in vim > > I think that need the blank line between '}' and devm_request_threaded_irq() > sentence. Ok.
> >>> + > >>> + /* Unmask VBUS interrupt */ > >>> + regmap_write(info->regmap, AXP288_PWRSRC_IRQ_CFG_REG, > >>> + PWRSRC_IRQ_CFG_MASK); > >>> + regmap_update_bits(info->regmap, AXP288_BC_GLOBAL_REG, > >>> + BC_GLOBAL_RUN, 0); > >>> + /* Unmask the BC1.2 complte interrupts */ > >>> + regmap_write(info->regmap, AXP288_BC12_IRQ_CFG_REG, > >> BC12_IRQ_CFG_MASK); > >>> + /* Enable the charger detection logic */ > >>> + regmap_update_bits(info->regmap, AXP288_BC_GLOBAL_REG, > >>> + BC_GLOBAL_RUN, BC_GLOBAL_RUN); > >> > >> I think that you better to move the initialization code before extcon > registration. > >> The initialization should be executed before extcon and interrupt registration. > > My intention is to enable the interrupts once after setting all the interrupt and > extcon handlers. > > OK. > But, I'd like you to add following functions to include the init code for enabling > interrupt. > axp288_extcon_enable_irq() or axp288_extcon_init() > Ok I will move the interrupt enabling settings to axp288_extcon_enable_irq()
One more thing, mfd cell changes are already merged by Lee Jones so I will only push the extcon-axp288 driver patch under v4. Hope this is ok...
Thanks, Ram
| |