Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d3dc9ad authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "genirq: Introduce irq_chip_get/set_parent_state calls"

parents 7a8e86c2 d9233146
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -599,6 +599,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);
+44 −0
Original line number Diff line number Diff line
@@ -1233,6 +1233,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
 *
 */
int irq_chip_set_parent_state(struct irq_data *data,
			      enum irqchip_irq_state which,
			      bool val)
{
	data = data->parent_data;
	if (!data)
		return 0;

	if (data->chip->irq_set_irqchip_state)
		return data->chip->irq_set_irqchip_state(data, which, val);

	return 0;
}
EXPORT_SYMBOL(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
 *
 */
int irq_chip_get_parent_state(struct irq_data *data,
			      enum irqchip_irq_state which,
			      bool *state)
{
	data = data->parent_data;
	if (!data)
		return 0;

	if (data->chip->irq_get_irqchip_state)
		return data->chip->irq_get_irqchip_state(data, which, state);

	return 0;
}
EXPORT_SYMBOL(irq_chip_get_parent_state);

/**
 * irq_chip_enable_parent - Enable the parent interrupt (defaults to unmask if
 * NULL)