mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
Merge "spmi: pmic-arb: support updating interrupt type flags"
This commit is contained in:
commit
9dc21ae1ee
1 changed files with 9 additions and 2 deletions
|
|
@ -636,8 +636,12 @@ static int qpnpint_irq_set_type(struct irq_data *d, unsigned int flow_type)
|
|||
type.type |= BIT(irq);
|
||||
if (flow_type & IRQF_TRIGGER_RISING)
|
||||
type.polarity_high |= BIT(irq);
|
||||
else
|
||||
type.polarity_high &= ~BIT(irq);
|
||||
if (flow_type & IRQF_TRIGGER_FALLING)
|
||||
type.polarity_low |= BIT(irq);
|
||||
else
|
||||
type.polarity_low &= ~BIT(irq);
|
||||
|
||||
flow_handler = handle_edge_irq;
|
||||
} else {
|
||||
|
|
@ -646,10 +650,13 @@ static int qpnpint_irq_set_type(struct irq_data *d, unsigned int flow_type)
|
|||
return -EINVAL;
|
||||
|
||||
type.type &= ~BIT(irq); /* level trig */
|
||||
if (flow_type & IRQF_TRIGGER_HIGH)
|
||||
if (flow_type & IRQF_TRIGGER_HIGH) {
|
||||
type.polarity_high |= BIT(irq);
|
||||
else
|
||||
type.polarity_low &= ~BIT(irq);
|
||||
} else {
|
||||
type.polarity_low |= BIT(irq);
|
||||
type.polarity_high &= ~BIT(irq);
|
||||
}
|
||||
|
||||
flow_handler = handle_level_irq;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue