On 5/27/2014 1:38 PM, Alexandre Courbot wrote: > On Fri, May 23, 2014 at 11:00 AM, Zhu, Lejun <lejun.zhu@xxxxxxxxxxxxxxx> wrote: >> +static void crystalcove_update_irq_type(int gpio, int type) >> +{ >> + u8 ctli = GPIO_TO_CTL(gpio, I); >> + >> + type &= IRQ_TYPE_EDGE_BOTH; >> + intel_soc_pmic_clearb(ctli, CTLI_INTCNT_BE); >> + >> + if (type == IRQ_TYPE_EDGE_BOTH) >> + intel_soc_pmic_setb(ctli, CTLI_INTCNT_BE); >> + else if (type == IRQ_TYPE_EDGE_RISING) >> + intel_soc_pmic_setb(ctli, CTLI_INTCNT_PE); >> + else if (type & IRQ_TYPE_EDGE_FALLING) >> + intel_soc_pmic_setb(ctli, CTLI_INTCNT_NE); > > Maybe a switch would be nicer here to choose the right value? And a > single call to intel_soc_pmic_setb() after the value is picked. Thank you. I will fix this in the next version. Best Regards Lejun -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html