Merge branches 'acpi-config', 'acpi-osl', 'acpi-utils' and 'acpi-tables'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Dec 2014 18:51:12 +0000 (19:51 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Dec 2014 18:51:12 +0000 (19:51 +0100)
* acpi-config:
  ACPI / Kconfig: Remove redundant depends on ACPI

* acpi-osl:
  ACPI / OSL: Add IRQ handler flushing support in the OSL.
  ACPI / osl: speedup grace period in acpi_os_map_cleanup

* acpi-utils:
  ACPI: remove unnecessary sizeof(u8)

* acpi-tables:
  ACPI / table: Always count matched and successfully parsed entries
  ACPI / table: Add new function to get table entries

1  2  3  4  5 
include/linux/acpi.h

diff --combined include/linux/acpi.h
     #include <linux/errno.h>
     #include <linux/ioport.h>  /* for struct resource */
     #include <linux/device.h>
 ++++#include <linux/property.h>
     
     #ifndef _LINUX
     #define _LINUX
@@@@@@ -124,6 -123,6 -123,6 -123,6 -123,10 +124,10 @@@@@@ int acpi_numa_init (void)
     
     int acpi_table_init (void);
     int acpi_table_parse(char *id, acpi_tbl_table_handler handler);
++++ int __init acpi_parse_entries(char *id, unsigned long table_size,
++++                          acpi_tbl_entry_handler handler,
++++                          struct acpi_table_header *table_header,
++++                          int entry_id, unsigned int max_entries);
     int __init acpi_table_parse_entries(char *id, unsigned long table_size,
                                    int entry_id,
                                    acpi_tbl_entry_handler handler,
@@@@@@ -424,8 -423,12 -423,12 -423,12 -427,12 +428,8 @@@@@@ extern int acpi_nvs_for_each_region(in
     const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids,
                                               const struct device *dev);
     
 ----static inline bool acpi_driver_match_device(struct device *dev,
 ----                                       const struct device_driver *drv)
 ----{
 ----   return !!acpi_match_device(drv->acpi_match_table, dev);
 ----}
 ----
 ++++extern bool acpi_driver_match_device(struct device *dev,
 ++++                                const struct device_driver *drv);
     int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
     int acpi_device_modalias(struct device *, char *, int);
     
@@@@@@ -440,23 -443,6 -443,6 -443,6 -447,6 +444,23 @@@@@@ struct platform_device *acpi_create_pla
     #define ACPI_COMPANION_SET(dev, adev)      do { } while (0)
     #define ACPI_HANDLE(dev)           (NULL)
     
 ++++struct fwnode_handle;
 ++++
 ++++static inline bool is_acpi_node(struct fwnode_handle *fwnode)
 ++++{
 ++++   return false;
 ++++}
 ++++
 ++++static inline struct acpi_device *acpi_node(struct fwnode_handle *fwnode)
 ++++{
 ++++   return NULL;
 ++++}
 ++++
 ++++static inline struct fwnode_handle *acpi_fwnode_handle(struct acpi_device *adev)
 ++++{
 ++++   return NULL;
 ++++}
 ++++
     static inline const char *acpi_dev_name(struct acpi_device *adev)
     {
        return NULL;
@@@@@@ -673,114 -659,4 -659,4 -659,4 -663,4 +677,114 @@@@@@ do {                                                                        
     #endif
     #endif
     
 ++++struct acpi_gpio_params {
 ++++   unsigned int crs_entry_index;
 ++++   unsigned int line_index;
 ++++   bool active_low;
 ++++};
 ++++
 ++++struct acpi_gpio_mapping {
 ++++   const char *name;
 ++++   const struct acpi_gpio_params *data;
 ++++   unsigned int size;
 ++++};
 ++++
 ++++#if defined(CONFIG_ACPI) && defined(CONFIG_GPIOLIB)
 ++++int acpi_dev_add_driver_gpios(struct acpi_device *adev,
 ++++                         const struct acpi_gpio_mapping *gpios);
 ++++
 ++++static inline void acpi_dev_remove_driver_gpios(struct acpi_device *adev)
 ++++{
 ++++   if (adev)
 ++++           adev->driver_gpios = NULL;
 ++++}
 ++++#else
 ++++static inline int acpi_dev_add_driver_gpios(struct acpi_device *adev,
 ++++                         const struct acpi_gpio_mapping *gpios)
 ++++{
 ++++   return -ENXIO;
 ++++}
 ++++static inline void acpi_dev_remove_driver_gpios(struct acpi_device *adev) {}
 ++++#endif
 ++++
 ++++/* Device properties */
 ++++
 ++++#define MAX_ACPI_REFERENCE_ARGS    8
 ++++struct acpi_reference_args {
 ++++   struct acpi_device *adev;
 ++++   size_t nargs;
 ++++   u64 args[MAX_ACPI_REFERENCE_ARGS];
 ++++};
 ++++
 ++++#ifdef CONFIG_ACPI
 ++++int acpi_dev_get_property(struct acpi_device *adev, const char *name,
 ++++                     acpi_object_type type, const union acpi_object **obj);
 ++++int acpi_dev_get_property_array(struct acpi_device *adev, const char *name,
 ++++                           acpi_object_type type,
 ++++                           const union acpi_object **obj);
 ++++int acpi_dev_get_property_reference(struct acpi_device *adev,
 ++++                               const char *name, size_t index,
 ++++                               struct acpi_reference_args *args);
 ++++
 ++++int acpi_dev_prop_get(struct acpi_device *adev, const char *propname,
 ++++                 void **valptr);
 ++++int acpi_dev_prop_read_single(struct acpi_device *adev, const char *propname,
 ++++                         enum dev_prop_type proptype, void *val);
 ++++int acpi_dev_prop_read(struct acpi_device *adev, const char *propname,
 ++++                  enum dev_prop_type proptype, void *val, size_t nval);
 ++++
 ++++struct acpi_device *acpi_get_next_child(struct device *dev,
 ++++                                   struct acpi_device *child);
 ++++#else
 ++++static inline int acpi_dev_get_property(struct acpi_device *adev,
 ++++                                   const char *name, acpi_object_type type,
 ++++                                   const union acpi_object **obj)
 ++++{
 ++++   return -ENXIO;
 ++++}
 ++++static inline int acpi_dev_get_property_array(struct acpi_device *adev,
 ++++                                         const char *name,
 ++++                                         acpi_object_type type,
 ++++                                         const union acpi_object **obj)
 ++++{
 ++++   return -ENXIO;
 ++++}
 ++++static inline int acpi_dev_get_property_reference(struct acpi_device *adev,
 ++++                           const char *name, const char *cells_name,
 ++++                           size_t index, struct acpi_reference_args *args)
 ++++{
 ++++   return -ENXIO;
 ++++}
 ++++
 ++++static inline int acpi_dev_prop_get(struct acpi_device *adev,
 ++++                               const char *propname,
 ++++                               void **valptr)
 ++++{
 ++++   return -ENXIO;
 ++++}
 ++++
 ++++static inline int acpi_dev_prop_read_single(struct acpi_device *adev,
 ++++                                       const char *propname,
 ++++                                       enum dev_prop_type proptype,
 ++++                                       void *val)
 ++++{
 ++++   return -ENXIO;
 ++++}
 ++++
 ++++static inline int acpi_dev_prop_read(struct acpi_device *adev,
 ++++                                const char *propname,
 ++++                                enum dev_prop_type proptype,
 ++++                                void *val, size_t nval)
 ++++{
 ++++   return -ENXIO;
 ++++}
 ++++
 ++++static inline struct acpi_device *acpi_get_next_child(struct device *dev,
 ++++                                                 struct acpi_device *child)
 ++++{
 ++++   return NULL;
 ++++}
 ++++
 ++++#endif
 ++++
     #endif     /*_LINUX_ACPI_H*/