mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-12 07:14:03 +08:00
Merge branch 'mark-irqs' into devel
Conflicts: drivers/gpio/gpio-em.c
This commit is contained in:
commit
33e0aae11e
@ -408,6 +408,27 @@ static void adnp_irq_bus_unlock(struct irq_data *data)
|
||||
mutex_unlock(&adnp->irq_lock);
|
||||
}
|
||||
|
||||
static unsigned int adnp_irq_startup(struct irq_data *data)
|
||||
{
|
||||
struct adnp *adnp = irq_data_get_irq_chip_data(data);
|
||||
|
||||
if (gpio_lock_as_irq(&adnp->gpio, data->hwirq))
|
||||
dev_err(adnp->gpio.dev,
|
||||
"unable to lock HW IRQ %lu for IRQ\n",
|
||||
data->hwirq);
|
||||
/* Satisfy the .enable semantics by unmasking the line */
|
||||
adnp_irq_unmask(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void adnp_irq_shutdown(struct irq_data *data)
|
||||
{
|
||||
struct adnp *adnp = irq_data_get_irq_chip_data(data);
|
||||
|
||||
adnp_irq_mask(data);
|
||||
gpio_unlock_as_irq(&adnp->gpio, data->hwirq);
|
||||
}
|
||||
|
||||
static struct irq_chip adnp_irq_chip = {
|
||||
.name = "gpio-adnp",
|
||||
.irq_mask = adnp_irq_mask,
|
||||
@ -415,6 +436,8 @@ static struct irq_chip adnp_irq_chip = {
|
||||
.irq_set_type = adnp_irq_set_type,
|
||||
.irq_bus_lock = adnp_irq_bus_lock,
|
||||
.irq_bus_sync_unlock = adnp_irq_bus_unlock,
|
||||
.irq_startup = adnp_irq_startup,
|
||||
.irq_shutdown = adnp_irq_shutdown,
|
||||
};
|
||||
|
||||
static int adnp_irq_map(struct irq_domain *domain, unsigned int irq,
|
||||
|
@ -449,12 +449,34 @@ static void bcm_kona_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
|
||||
chained_irq_exit(chip, desc);
|
||||
}
|
||||
|
||||
static unsigned int bcm_kona_gpio_irq_startup(struct irq_data *d)
|
||||
{
|
||||
struct bcm_kona_gpio *kona_gpio = irq_data_get_irq_chip_data(d);
|
||||
|
||||
if (gpio_lock_as_irq(&kona_gpio->gpio_chip, d->hwirq))
|
||||
dev_err(kona_gpio->gpio_chip.dev,
|
||||
"unable to lock HW IRQ %lu for IRQ\n",
|
||||
d->hwirq);
|
||||
bcm_kona_gpio_irq_unmask(d);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void bcm_kona_gpio_irq_shutdown(struct irq_data *d)
|
||||
{
|
||||
struct bcm_kona_gpio *kona_gpio = irq_data_get_irq_chip_data(d);
|
||||
|
||||
bcm_kona_gpio_irq_mask(d);
|
||||
gpio_unlock_as_irq(&kona_gpio->gpio_chip, d->hwirq);
|
||||
}
|
||||
|
||||
static struct irq_chip bcm_gpio_irq_chip = {
|
||||
.name = "bcm-kona-gpio",
|
||||
.irq_ack = bcm_kona_gpio_irq_ack,
|
||||
.irq_mask = bcm_kona_gpio_irq_mask,
|
||||
.irq_unmask = bcm_kona_gpio_irq_unmask,
|
||||
.irq_set_type = bcm_kona_gpio_irq_set_type,
|
||||
.irq_startup = bcm_kona_gpio_irq_startup,
|
||||
.irq_shutdown = bcm_kona_gpio_irq_shutdown,
|
||||
};
|
||||
|
||||
static struct __initconst of_device_id bcm_kona_gpio_of_match[] = {
|
||||
|
@ -99,6 +99,27 @@ static void em_gio_irq_enable(struct irq_data *d)
|
||||
em_gio_write(p, GIO_IEN, BIT(irqd_to_hwirq(d)));
|
||||
}
|
||||
|
||||
static unsigned int em_gio_irq_startup(struct irq_data *d)
|
||||
{
|
||||
struct em_gio_priv *p = irq_data_get_irq_chip_data(d);
|
||||
|
||||
if (gpio_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));
|
||||
em_gio_irq_enable(d);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void em_gio_irq_shutdown(struct irq_data *d)
|
||||
{
|
||||
struct em_gio_priv *p = irq_data_get_irq_chip_data(d);
|
||||
|
||||
em_gio_irq_disable(d);
|
||||
gpio_unlock_as_irq(&p->gpio_chip, irqd_to_hwirq(d));
|
||||
}
|
||||
|
||||
|
||||
#define GIO_ASYNC(x) (x + 8)
|
||||
|
||||
static unsigned char em_gio_sense_table[IRQ_TYPE_SENSE_MASK + 1] = {
|
||||
@ -338,6 +359,8 @@ static int em_gio_probe(struct platform_device *pdev)
|
||||
irq_chip->irq_mask = em_gio_irq_disable;
|
||||
irq_chip->irq_unmask = em_gio_irq_enable;
|
||||
irq_chip->irq_set_type = em_gio_irq_set_type;
|
||||
irq_chip->irq_startup = em_gio_irq_startup;
|
||||
irq_chip->irq_shutdown = em_gio_irq_shutdown;
|
||||
irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
|
||||
|
||||
p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
|
||||
|
@ -235,11 +235,33 @@ static void intel_mid_irq_mask(struct irq_data *d)
|
||||
{
|
||||
}
|
||||
|
||||
static unsigned int intel_mid_irq_startup(struct irq_data *d)
|
||||
{
|
||||
struct intel_mid_gpio *priv = irq_data_get_irq_chip_data(d);
|
||||
|
||||
if (gpio_lock_as_irq(&priv->chip, irqd_to_hwirq(d)))
|
||||
dev_err(priv->chip.dev,
|
||||
"unable to lock HW IRQ %lu for IRQ\n",
|
||||
irqd_to_hwirq(d));
|
||||
intel_mid_irq_unmask(d);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void intel_mid_irq_shutdown(struct irq_data *d)
|
||||
{
|
||||
struct intel_mid_gpio *priv = irq_data_get_irq_chip_data(d);
|
||||
|
||||
intel_mid_irq_mask(d);
|
||||
gpio_unlock_as_irq(&priv->chip, irqd_to_hwirq(d));
|
||||
}
|
||||
|
||||
static struct irq_chip intel_mid_irqchip = {
|
||||
.name = "INTEL_MID-GPIO",
|
||||
.irq_mask = intel_mid_irq_mask,
|
||||
.irq_unmask = intel_mid_irq_unmask,
|
||||
.irq_set_type = intel_mid_irq_type,
|
||||
.irq_startup = intel_mid_irq_startup,
|
||||
.irq_shutdown = intel_mid_irq_shutdown,
|
||||
};
|
||||
|
||||
static const struct intel_mid_gpio_ddata gpio_lincroft = {
|
||||
@ -417,6 +439,7 @@ static int intel_gpio_probe(struct pci_dev *pdev,
|
||||
|
||||
priv->reg_base = pcim_iomap_table(pdev)[0];
|
||||
priv->chip.label = dev_name(&pdev->dev);
|
||||
priv->chip.dev = &pdev->dev;
|
||||
priv->chip.request = intel_gpio_request;
|
||||
priv->chip.direction_input = intel_gpio_direction_input;
|
||||
priv->chip.direction_output = intel_gpio_direction_output;
|
||||
|
@ -301,6 +301,26 @@ static void lp_irq_disable(struct irq_data *d)
|
||||
spin_unlock_irqrestore(&lg->lock, flags);
|
||||
}
|
||||
|
||||
static unsigned int lp_irq_startup(struct irq_data *d)
|
||||
{
|
||||
struct lp_gpio *lg = irq_data_get_irq_chip_data(d);
|
||||
|
||||
if (gpio_lock_as_irq(&lg->chip, irqd_to_hwirq(d)))
|
||||
dev_err(lg->chip.dev,
|
||||
"unable to lock HW IRQ %lu for IRQ\n",
|
||||
irqd_to_hwirq(d));
|
||||
lp_irq_enable(d);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void lp_irq_shutdown(struct irq_data *d)
|
||||
{
|
||||
struct lp_gpio *lg = irq_data_get_irq_chip_data(d);
|
||||
|
||||
lp_irq_disable(d);
|
||||
gpio_unlock_as_irq(&lg->chip, irqd_to_hwirq(d));
|
||||
}
|
||||
|
||||
static struct irq_chip lp_irqchip = {
|
||||
.name = "LP-GPIO",
|
||||
.irq_mask = lp_irq_mask,
|
||||
@ -308,6 +328,8 @@ static struct irq_chip lp_irqchip = {
|
||||
.irq_enable = lp_irq_enable,
|
||||
.irq_disable = lp_irq_disable,
|
||||
.irq_set_type = lp_irq_type,
|
||||
.irq_startup = lp_irq_startup,
|
||||
.irq_shutdown = lp_irq_shutdown,
|
||||
.flags = IRQCHIP_SKIP_SET_WAKE,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user