예제 #1
0
static void pm8xxx_irq_unmask(struct irq_data *d)
{
	struct pm_irq_chip *chip = irq_data_get_irq_chip_data(d);
	unsigned int pmirq = d->irq - chip->irq_base;
	int	master, irq_bit;
	u8	block, config, hw_conf;

	block = pmirq / 8;
	master = block / 8;
	irq_bit = pmirq % 8;

	config = chip->config[pmirq];
	pm8xxx_read_config_irq(chip, block, config, &hw_conf);
	/* check if it is masked */
	if ((hw_conf & PM_IRQF_MASK_ALL) == PM_IRQF_MASK_ALL)
		pm8xxx_write_config_irq(chip, block, config);
}
예제 #2
0
int pm8xxx_get_is_irq_masked(struct pm_irq_chip *chip, int irq)
{
	unsigned int pmirq = irq - chip->irq_base;
	int	master, irq_bit;
	u8	block, config, hw_conf;

	block = pmirq / 8;
	master = block / 8;
	irq_bit = pmirq % 8;

	config = chip->config[pmirq];
	pm8xxx_read_config_irq(chip, block, config, &hw_conf);
	
	if ((hw_conf & PM_IRQF_MASK_ALL) == PM_IRQF_MASK_ALL)
		return 1;

	return 0;
}