mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge branch 'device-properties' into acpi-pci
This commit is contained in:
commit
5293fea28c
12 changed files with 760 additions and 194 deletions
|
|
@ -343,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;
|
||||
|
|
@ -378,6 +379,17 @@ 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 acpi_check_dma(struct acpi_device *adev, bool *coherent)
|
||||
{
|
||||
bool ret = false;
|
||||
|
|
@ -412,16 +424,33 @@ static inline bool acpi_check_dma(struct acpi_device *adev, bool *coherent)
|
|||
}
|
||||
|
||||
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 *to_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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue