History

genirq: generic chip: Add irq_gc_mask_disable_and_ack_set()

The irq_gc_mask_disable_reg_and_ack() function name implies that it provides the combined functions of irq_gc_mask_disable_reg() and irq_gc_ack(). However, the implementation does not actually do that since it writes the mask instead of the disable register. It also does not maintain the mask cache which makes it inappropriate to use with other masking functions. In addition, commit 659fb32d1b67 ("genirq: replace irq_gc_ack() with {set,clr}_bit variants (fwd)") effectively renamed irq_gc_ack() to irq_gc_ack_set_bit() so this function probably should have also been renamed at that time. The generic chip code currently provides three functions for use with the irq_mask member of the irq_chip structure and two functions for use with the irq_ack member of the irq_chip structure. These functions could be combined into six functions for use with the irq_mask_ack member of the irq_chip structure. However, since only one of the combinations is currently used, only the function irq_gc_mask_disable_and_ack_set() is added by this commit. The '_reg' and '_bit' portions of the base function name were left out of the new combined function name in an attempt to keep the function name length manageable with the 80 character source code line length while still allowing the distinct aspects of each combination to be captured by the name. If other combinations are desired in the future please add them to the irq generic chip library at that time.

Doug Berger committed 9 years ago

Commit 20608921 parent 30ae9612 files · +26 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/irq.h+1−0
@@ -1010,6 +1010,7 @@ void irq_gc_unmask_enable_reg(struct irq_data *d); · 1009 unmodified lines
1010void irq_gc_ack_set_bit(struct irq_data *d);1010void irq_gc_ack_set_bit(struct irq_data *d);
1011void irq_gc_ack_clr_bit(struct irq_data *d);1011void irq_gc_ack_clr_bit(struct irq_data *d);
1012void irq_gc_mask_disable_reg_and_ack(struct irq_data *d);1012void irq_gc_mask_disable_reg_and_ack(struct irq_data *d);
1013void irq_gc_mask_disable_and_ack_set(struct irq_data *d);
1013void irq_gc_eoi(struct irq_data *d);1014void irq_gc_eoi(struct irq_data *d);
1014int irq_gc_set_wake(struct irq_data *d, unsigned int on);1015int irq_gc_set_wake(struct irq_data *d, unsigned int on);
1015 1016