static unsigned int startup_giuint(struct irq_data *data)
{
	if (gpiochip_lock_as_irq(&vr41xx_gpio_chip, data->hwirq))
		dev_err(vr41xx_gpio_chip.dev,
			"unable to lock HW IRQ %lu for IRQ\n",
			data->hwirq);
	/* Satisfy the .enable semantics by unmasking the line */
	unmask_giuint_low(data);
	return 0;
}
示例#2
0
static int em_gio_irq_reqres(struct irq_data *d)
{
	struct em_gio_priv *p = irq_data_get_irq_chip_data(d);

	if (gpiochip_lock_as_irq(&p->gpio_chip, irqd_to_hwirq(d))) {
		dev_err(p->gpio_chip.dev,
			"unable to lock HW IRQ %lu for IRQ\n",
			irqd_to_hwirq(d));
		return -EINVAL;
	}
	return 0;
}
示例#3
0
static void xgene_gpio_sb_domain_activate(struct irq_domain *d,
		struct irq_data *irq_data)
{
	struct xgene_gpio_sb *priv = d->host_data;
	u32 gpio = HWIRQ_TO_GPIO(priv, irq_data->hwirq);

	if (gpiochip_lock_as_irq(&priv->gc, gpio)) {
		dev_err(priv->gc.parent,
		"Unable to configure XGene GPIO standby pin %d as IRQ\n",
				gpio);
		return;
	}

	xgene_gpio_set_bit(&priv->gc, priv->regs + MPA_GPIO_SEL_LO,
			gpio * 2, 1);
}