]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/acpi.h
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / include / linux / acpi.h
index 0510237565203e96b7466bd7f3b6617f2ee0044c..8e577c2cb0ced43e058201cd32ebdf9d2750e9b2 100644 (file)
@@ -56,6 +56,27 @@ static inline acpi_handle acpi_device_handle(struct acpi_device *adev)
        acpi_fwnode_handle(adev) : NULL)
 #define ACPI_HANDLE(dev)               acpi_device_handle(ACPI_COMPANION(dev))
 
+static inline struct fwnode_handle *acpi_alloc_fwnode_static(void)
+{
+       struct fwnode_handle *fwnode;
+
+       fwnode = kzalloc(sizeof(struct fwnode_handle), GFP_KERNEL);
+       if (!fwnode)
+               return NULL;
+
+       fwnode->type = FWNODE_ACPI_STATIC;
+
+       return fwnode;
+}
+
+static inline void acpi_free_fwnode_static(struct fwnode_handle *fwnode)
+{
+       if (WARN_ON(!fwnode || fwnode->type != FWNODE_ACPI_STATIC))
+               return;
+
+       kfree(fwnode);
+}
+
 /**
  * ACPI_DEVICE_CLASS - macro used to describe an ACPI device with
  * the PCI-defined class-code information
@@ -220,10 +241,6 @@ int __init acpi_table_parse_entries(char *id, unsigned long table_size,
                              int entry_id,
                              acpi_tbl_entry_handler handler,
                              unsigned int max_entries);
-int __init acpi_table_parse_entries(char *id, unsigned long table_size,
-                             int entry_id,
-                             acpi_tbl_entry_handler handler,
-                             unsigned int max_entries);
 int __init acpi_table_parse_entries_array(char *id, unsigned long table_size,
                              struct acpi_subtable_proc *proc, int proc_num,
                              unsigned int max_entries);
@@ -420,6 +437,8 @@ static inline int acpi_dev_filter_resource_type_cb(struct acpi_resource *ares,
        return acpi_dev_filter_resource_type(ares, (unsigned long)arg);
 }
 
+struct acpi_device *acpi_resource_consumer(struct resource *res);
+
 int acpi_check_resource_conflict(const struct resource *res);
 
 int acpi_check_region(resource_size_t start, resource_size_t n,
@@ -745,6 +764,11 @@ static inline enum dev_dma_attr acpi_get_dma_attr(struct acpi_device *adev)
        return DEV_DMA_NOT_SUPPORTED;
 }
 
+static inline void acpi_dma_configure(struct device *dev,
+                                     enum dev_dma_attr attr) { }
+
+static inline void acpi_dma_deconfigure(struct device *dev) { }
+
 #define ACPI_PTR(_ptr) (NULL)
 
 static inline void acpi_device_set_enumerated(struct acpi_device *adev)
@@ -765,6 +789,11 @@ static inline int acpi_reconfig_notifier_unregister(struct notifier_block *nb)
        return -EINVAL;
 }
 
+static inline struct acpi_device *acpi_resource_consumer(struct resource *res)
+{
+       return NULL;
+}
+
 #endif /* !CONFIG_ACPI */
 
 #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
@@ -1124,4 +1153,14 @@ int parse_spcr(bool earlycon);
 static inline int parse_spcr(bool earlycon) { return 0; }
 #endif
 
+#if IS_ENABLED(CONFIG_ACPI_GENERIC_GSI)
+int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res);
+#else
+static inline
+int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res)
+{
+       return -EINVAL;
+}
+#endif
+
 #endif /*_LINUX_ACPI_H*/