|
@@ -17,25 +17,6 @@ enum acpi_irq_model_id acpi_irq_model;
|
|
|
|
|
|
static struct fwnode_handle *acpi_gsi_domain_id;
|
|
static struct fwnode_handle *acpi_gsi_domain_id;
|
|
|
|
|
|
-static unsigned int acpi_gsi_get_irq_type(int trigger, int polarity)
|
|
|
|
-{
|
|
|
|
- switch (polarity) {
|
|
|
|
- case ACPI_ACTIVE_LOW:
|
|
|
|
- return trigger == ACPI_EDGE_SENSITIVE ?
|
|
|
|
- IRQ_TYPE_EDGE_FALLING :
|
|
|
|
- IRQ_TYPE_LEVEL_LOW;
|
|
|
|
- case ACPI_ACTIVE_HIGH:
|
|
|
|
- return trigger == ACPI_EDGE_SENSITIVE ?
|
|
|
|
- IRQ_TYPE_EDGE_RISING :
|
|
|
|
- IRQ_TYPE_LEVEL_HIGH;
|
|
|
|
- case ACPI_ACTIVE_BOTH:
|
|
|
|
- if (trigger == ACPI_EDGE_SENSITIVE)
|
|
|
|
- return IRQ_TYPE_EDGE_BOTH;
|
|
|
|
- default:
|
|
|
|
- return IRQ_TYPE_NONE;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* acpi_gsi_to_irq() - Retrieve the linux irq number for a given GSI
|
|
* acpi_gsi_to_irq() - Retrieve the linux irq number for a given GSI
|
|
* @gsi: GSI IRQ number to map
|
|
* @gsi: GSI IRQ number to map
|
|
@@ -82,7 +63,7 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger,
|
|
|
|
|
|
fwspec.fwnode = acpi_gsi_domain_id;
|
|
fwspec.fwnode = acpi_gsi_domain_id;
|
|
fwspec.param[0] = gsi;
|
|
fwspec.param[0] = gsi;
|
|
- fwspec.param[1] = acpi_gsi_get_irq_type(trigger, polarity);
|
|
|
|
|
|
+ fwspec.param[1] = acpi_dev_get_irq_type(trigger, polarity);
|
|
fwspec.param_count = 2;
|
|
fwspec.param_count = 2;
|
|
|
|
|
|
return irq_create_fwspec_mapping(&fwspec);
|
|
return irq_create_fwspec_mapping(&fwspec);
|