diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-08 21:50:17 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-08 21:50:17 +0300 |
commit | d3eaf5875e36b37f1386a4e3e7562c5a6c35abd2 (patch) | |
tree | 13f5b6c391ad74a072a4f77f74e958a6ac287032 /include/acpi | |
parent | b2776bf7149bddd1f4161f14f79520f17fc1d71d (diff) | |
parent | 29470ea8d828e4dec74e94f7f17b7479ff5ef276 (diff) | |
download | linux-d3eaf5875e36b37f1386a4e3e7562c5a6c35abd2.tar.xz |
Merge branch 'device-properties'
* device-properties:
leds: leds-gpio: Fix multiple instances registration without 'label' property
leds: leds-gpio: Fix legacy GPIO number case
ACPI / property: Drop size_prop from acpi_dev_get_property_reference()
leds: leds-gpio: Convert gpio_blink_set() to use GPIO descriptors
ACPI / GPIO: Document ACPI GPIO mappings API
net: rfkill: gpio: Add default GPIO driver mappings for ACPI
ACPI / GPIO: Driver GPIO mappings for ACPI GPIOs
input: gpio_keys_polled: Make use of device property API
leds: leds-gpio: Make use of device property API
gpio: Support for unified device properties interface
Driver core: Unified interface for firmware node properties
input: gpio_keys_polled: Add support for GPIO descriptors
leds: leds-gpio: Add support for GPIO descriptors
gpio: sch: Consolidate core and resume banks
gpio / ACPI: Add support for _DSD device properties
misc: at25: Make use of device property API
ACPI: Allow drivers to match using Device Tree compatible property
Driver core: Unified device properties interface for platform firmware
ACPI: Add support for device specific properties
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index f34a0835aa4f..7d1ce40e201e 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -27,6 +27,7 @@ #define __ACPI_BUS_H__ #include <linux/device.h> +#include <linux/property.h> /* TBD: Make dynamic */ #define ACPI_MAX_HANDLES 10 @@ -337,10 +338,20 @@ struct acpi_device_physical_node { bool put_online:1; }; +/* ACPI Device Specific Data (_DSD) */ +struct acpi_device_data { + const union acpi_object *pointer; + const union acpi_object *properties; + const union acpi_object *of_compatible; +}; + +struct acpi_gpio_mapping; + /* Device */ struct acpi_device { int device_type; acpi_handle handle; /* no handle for fixed hardware */ + struct fwnode_handle fwnode; struct acpi_device *parent; struct list_head children; struct list_head node; @@ -353,9 +364,11 @@ struct acpi_device { struct acpi_device_wakeup wakeup; struct acpi_device_perf performance; struct acpi_device_dir dir; + struct acpi_device_data data; struct acpi_scan_handler *handler; struct acpi_hotplug_context *hp; struct acpi_driver *driver; + const struct acpi_gpio_mapping *driver_gpios; void *driver_data; struct device dev; unsigned int physical_node_count; @@ -364,6 +377,21 @@ struct acpi_device { void (*remove)(struct acpi_device *); }; +static inline bool is_acpi_node(struct fwnode_handle *fwnode) +{ + return fwnode && fwnode->type == FWNODE_ACPI; +} + +static inline struct acpi_device *acpi_node(struct fwnode_handle *fwnode) +{ + return fwnode ? container_of(fwnode, struct acpi_device, fwnode) : NULL; +} + +static inline struct fwnode_handle *acpi_fwnode_handle(struct acpi_device *adev) +{ + return &adev->fwnode; +} + static inline void *acpi_driver_data(struct acpi_device *d) { return d->driver_data; |