summaryrefslogtreecommitdiffstats
path: root/kernel/include/acpi/acpi_bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/acpi/acpi_bus.h')
-rw-r--r--kernel/include/acpi/acpi_bus.h52
1 files changed, 41 insertions, 11 deletions
diff --git a/kernel/include/acpi/acpi_bus.h b/kernel/include/acpi/acpi_bus.h
index 8de4fa90e..ad0a5ff3d 100644
--- a/kernel/include/acpi/acpi_bus.h
+++ b/kernel/include/acpi/acpi_bus.h
@@ -16,10 +16,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
@@ -133,7 +129,7 @@ static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile(
struct acpi_scan_handler {
const struct acpi_device_id *ids;
struct list_head list_node;
- bool (*match)(char *idstr, const struct acpi_device_id **matchid);
+ bool (*match)(const char *idstr, const struct acpi_device_id **matchid);
int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id);
void (*detach)(struct acpi_device *dev);
void (*bind)(struct device *phys_dev);
@@ -208,7 +204,10 @@ struct acpi_device_flags {
u32 visited:1;
u32 hotplug_notify:1;
u32 is_dock_station:1;
- u32 reserved:23;
+ u32 of_compatible_ok:1;
+ u32 coherent_dma:1;
+ u32 cca_seen:1;
+ u32 reserved:20;
};
/* File System */
@@ -228,7 +227,7 @@ typedef char acpi_device_class[20];
struct acpi_hardware_id {
struct list_head list;
- char *id;
+ const char *id;
};
struct acpi_pnp_type {
@@ -271,7 +270,6 @@ struct acpi_device_power_flags {
struct acpi_device_power_state {
struct {
u8 valid:1;
- u8 os_accessible:1;
u8 explicit_set:1; /* _PSx present? */
u8 reserved:6;
} flags;
@@ -345,6 +343,7 @@ struct acpi_device_data {
const union acpi_object *pointer;
const union acpi_object *properties;
const union acpi_object *of_compatible;
+ struct list_head subnodes;
};
struct acpi_gpio_mapping;
@@ -380,17 +379,45 @@ struct acpi_device {
void (*remove)(struct acpi_device *);
};
+/* Non-device subnode */
+struct acpi_data_node {
+ const char *name;
+ acpi_handle handle;
+ struct fwnode_handle fwnode;
+ struct acpi_device_data data;
+ struct list_head sibling;
+ struct kobject kobj;
+ struct completion kobj_done;
+};
+
static inline bool is_acpi_node(struct fwnode_handle *fwnode)
{
+ return fwnode && (fwnode->type == FWNODE_ACPI
+ || fwnode->type == FWNODE_ACPI_DATA);
+}
+
+static inline bool is_acpi_device_node(struct fwnode_handle *fwnode)
+{
return fwnode && fwnode->type == FWNODE_ACPI;
}
-static inline struct acpi_device *acpi_node(struct fwnode_handle *fwnode)
+static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
{
- return is_acpi_node(fwnode) ?
+ return is_acpi_device_node(fwnode) ?
container_of(fwnode, struct acpi_device, fwnode) : NULL;
}
+static inline bool is_acpi_data_node(struct fwnode_handle *fwnode)
+{
+ return fwnode && fwnode->type == FWNODE_ACPI_DATA;
+}
+
+static inline struct acpi_data_node *to_acpi_data_node(struct fwnode_handle *fwnode)
+{
+ return is_acpi_data_node(fwnode) ?
+ container_of(fwnode, struct acpi_data_node, fwnode) : NULL;
+}
+
static inline struct fwnode_handle *acpi_fwnode_handle(struct acpi_device *adev)
{
return &adev->fwnode;
@@ -535,6 +562,9 @@ struct acpi_pci_root {
/* helper */
+bool acpi_dma_supported(struct acpi_device *adev);
+enum dev_dma_attr acpi_get_dma_attr(struct acpi_device *adev);
+
struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
u64 address, bool check_children);
int acpi_is_root_bridge(acpi_handle);
@@ -601,7 +631,7 @@ static inline bool acpi_device_can_wakeup(struct acpi_device *adev)
static inline bool acpi_device_can_poweroff(struct acpi_device *adev)
{
- return adev->power.states[ACPI_STATE_D3_COLD].flags.os_accessible;
+ return adev->power.states[ACPI_STATE_D3_COLD].flags.valid;
}
#else /* CONFIG_ACPI */