mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
Merge "drivers: irqchip: pdc: Do not toggle IRQ_ENABLE during mask/unmask"
This commit is contained in:
commit
1d1b326bd3
3 changed files with 64 additions and 2 deletions
|
|
@ -63,15 +63,25 @@ static void pdc_enable_intr(struct irq_data *d, bool on)
|
|||
raw_spin_unlock(&pdc_lock);
|
||||
}
|
||||
|
||||
static void qcom_pdc_gic_mask(struct irq_data *d)
|
||||
static void qcom_pdc_gic_disable(struct irq_data *d)
|
||||
{
|
||||
pdc_enable_intr(d, false);
|
||||
irq_chip_disable_parent(d);
|
||||
}
|
||||
|
||||
static void qcom_pdc_gic_enable(struct irq_data *d)
|
||||
{
|
||||
pdc_enable_intr(d, true);
|
||||
irq_chip_enable_parent(d);
|
||||
}
|
||||
|
||||
static void qcom_pdc_gic_mask(struct irq_data *d)
|
||||
{
|
||||
irq_chip_mask_parent(d);
|
||||
}
|
||||
|
||||
static void qcom_pdc_gic_unmask(struct irq_data *d)
|
||||
{
|
||||
pdc_enable_intr(d, true);
|
||||
irq_chip_unmask_parent(d);
|
||||
}
|
||||
|
||||
|
|
@ -148,6 +158,8 @@ static struct irq_chip qcom_pdc_gic_chip = {
|
|||
.irq_eoi = irq_chip_eoi_parent,
|
||||
.irq_mask = qcom_pdc_gic_mask,
|
||||
.irq_unmask = qcom_pdc_gic_unmask,
|
||||
.irq_disable = qcom_pdc_gic_disable,
|
||||
.irq_enable = qcom_pdc_gic_enable,
|
||||
.irq_retrigger = irq_chip_retrigger_hierarchy,
|
||||
.irq_set_type = qcom_pdc_gic_set_type,
|
||||
.flags = IRQCHIP_MASK_ON_SUSPEND |
|
||||
|
|
|
|||
|
|
@ -610,6 +610,12 @@ extern int irq_chip_pm_put(struct irq_data *data);
|
|||
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
|
||||
extern void handle_fasteoi_ack_irq(struct irq_desc *desc);
|
||||
extern void handle_fasteoi_mask_irq(struct irq_desc *desc);
|
||||
extern int irq_chip_set_parent_state(struct irq_data *data,
|
||||
enum irqchip_irq_state which,
|
||||
bool val);
|
||||
extern int irq_chip_get_parent_state(struct irq_data *data,
|
||||
enum irqchip_irq_state which,
|
||||
bool *state);
|
||||
extern void irq_chip_enable_parent(struct irq_data *data);
|
||||
extern void irq_chip_disable_parent(struct irq_data *data);
|
||||
extern void irq_chip_ack_parent(struct irq_data *data);
|
||||
|
|
|
|||
|
|
@ -1297,6 +1297,50 @@ EXPORT_SYMBOL_GPL(handle_fasteoi_mask_irq);
|
|||
|
||||
#endif /* CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS */
|
||||
|
||||
/**
|
||||
* irq_chip_set_parent_state - set the state of a parent interrupt.
|
||||
*
|
||||
* @data: Pointer to interrupt specific data
|
||||
* @which: State to be restored (one of IRQCHIP_STATE_*)
|
||||
* @val: Value corresponding to @which
|
||||
*
|
||||
* Conditional success, if the underlying irqchip does not implement it.
|
||||
*/
|
||||
int irq_chip_set_parent_state(struct irq_data *data,
|
||||
enum irqchip_irq_state which,
|
||||
bool val)
|
||||
{
|
||||
data = data->parent_data;
|
||||
|
||||
if (!data || !data->chip->irq_set_irqchip_state)
|
||||
return 0;
|
||||
|
||||
return data->chip->irq_set_irqchip_state(data, which, val);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(irq_chip_set_parent_state);
|
||||
|
||||
/**
|
||||
* irq_chip_get_parent_state - get the state of a parent interrupt.
|
||||
*
|
||||
* @data: Pointer to interrupt specific data
|
||||
* @which: one of IRQCHIP_STATE_* the caller wants to know
|
||||
* @state: a pointer to a boolean where the state is to be stored
|
||||
*
|
||||
* Conditional success, if the underlying irqchip does not implement it.
|
||||
*/
|
||||
int irq_chip_get_parent_state(struct irq_data *data,
|
||||
enum irqchip_irq_state which,
|
||||
bool *state)
|
||||
{
|
||||
data = data->parent_data;
|
||||
|
||||
if (!data || !data->chip->irq_get_irqchip_state)
|
||||
return 0;
|
||||
|
||||
return data->chip->irq_get_irqchip_state(data, which, state);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(irq_chip_get_parent_state);
|
||||
|
||||
/**
|
||||
* irq_chip_enable_parent - Enable the parent interrupt (defaults to unmask if
|
||||
* NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue