diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-07-07 22:48:25 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-07-07 22:48:25 +0200 |
commit | 8076ca480f40c51ab87d8301c830a817b900b4d1 (patch) | |
tree | 63fec44892b0566f47102348f1c208fcabee513f /include | |
parent | Merge branches 'acpi-pnp', 'acpi-soc', 'pm-domains' and 'pm-sleep' (diff) | |
parent | ata: ahci_platform: Add ACPI _CLS matching (diff) | |
download | linux-8076ca480f40c51ab87d8301c830a817b900b4d1.tar.xz linux-8076ca480f40c51ab87d8301c830a817b900b4d1.zip |
Merge branch 'acpi-scan'
* acpi-scan:
ata: ahci_platform: Add ACPI _CLS matching
ACPI / scan: Add support for ACPI _CLS device matching
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/acpi.h | 14 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index fedfd1bea3bf..d2445fa9999f 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -58,6 +58,19 @@ 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)) +/** + * ACPI_DEVICE_CLASS - macro used to describe an ACPI device with + * the PCI-defined class-code information + * + * @_cls : the class, subclass, prog-if triple for this device + * @_msk : the class mask for this device + * + * This macro is used to create a struct acpi_device_id that matches a + * specific PCI class. The .id and .driver_data fields will be left + * initialized with the default value. + */ +#define ACPI_DEVICE_CLASS(_cls, _msk) .cls = (_cls), .cls_msk = (_msk), + static inline bool has_acpi_companion(struct device *dev) { return is_acpi_node(dev->fwnode); @@ -443,6 +456,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *); #define ACPI_COMPANION(dev) (NULL) #define ACPI_COMPANION_SET(dev, adev) do { } while (0) #define ACPI_HANDLE(dev) (NULL) +#define ACPI_DEVICE_CLASS(_cls, _msk) .cls = (0), .cls_msk = (0), struct fwnode_handle; diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 8183d6640ca7..34f25b7bf642 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -189,6 +189,8 @@ struct css_device_id { struct acpi_device_id { __u8 id[ACPI_ID_LEN]; kernel_ulong_t driver_data; + __u32 cls; + __u32 cls_msk; }; #define PNP_ID_LEN 8 |